Bug in Horizontal viscosity

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
User avatar
Site Admin
Posts: 1128
Joined: Wed Feb 26, 2003 4:41 pm
Location: IMCS, Rutgers University

Bug in Horizontal viscosity

#1 Post by arango » Fri Dec 05, 2003 6:13 am

Dear all,

We found a bug in ROMS horizontal viscosity for momentum. This only affect applications with explicit horizontal viscosity. Actually, any value of viscosity chosen does not seem to do anything and the simulation remains inviscid.

This bug has been in ROMS for very long time. We did not noticed it before because by default ROMS uses 3rd-order upstream bias horizontal advection which includes implicit hyper-viscosity in its leading truncation term. In the past, all the horizontal dissipation was mainly specified for the tracer equations.

The problem was that the horizontal stress tensor terms were not included in the residual vertical-integrated terms rufrc and rvfrc used in the split-explicit coupling between baroclinic and barotropic momentum equations. Therefore, the barotropic equations remained horizontally inviscid and the net viscosity was canceled during the barotropic/baroclinic coupling. We corrected this bug and are now getting the correct damping of barotropic Rossby waves and viscous boundary layers.

The next release of ROMS will include the corrections for this bug. In the mean time, get the following tar file:


and substitute the following files with the new ones:

Code: Select all

Notice that in rhs3d.F the CPP option DIAGNOSTIC has been renamed to TS_FIXED. The new version of the code has a new NetCDF output file for model diagnostics like term balances and budgets. I am using the CPP flag DIAGNOGTICS for this type of new output. The model diagnostics will be available in the future.

Many thanks to Genta Mizuta (WHOI) for pointing out this bug.

Good Luck,

Hernan G. Arango

User avatar
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#2 Post by m.hadfield » Thu Jan 08, 2004 11:24 pm

Hi Hernan

I added your files to my ROMS directory and tried to rebuild a ROMS job. The make process failed because a couple of files were missing: mod_eclight.f90 and mod_diags.f90.

Perhaps a new release is in order :)

Post Reply