Useful CFL number based ROMS diagnostic

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Posts: 157
Joined: Mon Apr 28, 2003 5:12 pm
Location: NOAA

Useful CFL number based ROMS diagnostic

#1 Post by lanerolle » Tue Mar 17, 2009 4:08 pm

I have modified the diag.F routine in ROMS/Nonlinear (in ROMS version 3.0) to compute the CFL number (CFL = |u|*dt/dx + |v|*dt/dy + |w|*dt/dz) in both serial mode and in MPI and then write it out to the screen output along with the usual quantities (such as iteration number, volume averaged kinetic, potential and total energies, etc.). These computations are activated via a CPP option and when invoked, the typical screen output looks like :

Code: Select all

4320040  5650.00694  2.685656E-02  8.367442E+01  8.370127E+01  6.171147E+11   0
      CFL information [Max,u-,v-,w-,I,J,K] :    0.307   0.012   0.000   0.295    178    234      4
4320041  5650.00712  2.685716E-02  8.367124E+01  8.369809E+01  6.171052E+11   0
      CFL information [Max,u-,v-,w-,I,J,K] :    0.308   0.012   0.000   0.296    178    234      4

So, following a line of regular ROMS screen output, it writes the CFL info - the total maximum CFL number over all of the wet points, a break down of its u- , v- and w- components and the location in (I, J, K) grid index space where this CFL number occurs.

I have found this information to be extremely useful in setting up new ROMS applications when model blow-ups are frequently encountered. I use the CFL info in the following manner (when there is a blow-up) :

(1) if the largest contribution to the total maximum CFL number is from the u- and/or v- components, it tells me to cut my time step down and then I tend to achieve stable runs or

(2) if the largest contribution to the total maximum CFL number is from the w- component, it tells me that either (i) the local bathymetry in that region (which can be located from the [I, J, K] info also written out) is too steep or too unsmooth and needs smoothing or (ii) the flow is highly stratified and we need to add more vertical resolution/vertical levels to resolve it.

This routine has saved me a lot of trouble and stress and has helped me to achieve stable model set-ups relatively quickly and efficiently.

Obviously, if horizontal viscosity/diffusivity is being employed (in addition to the ROMS advection schemes) then the CFL info written out to the screen is strictly not valid (because the stability restrictions also have contributions from the viscosity/diffusivity terms) and this is ideally suited when the upstream-biased advections schemes are being invoked on their own. I have also assumed that as the vertical eddy-viscosity/diffusivity is treated implicitly, it does not contribute to the CFL restriction.

Post Reply