courant

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

courant

#1 Unread post by fereshteh »

Dear
how can i become sure that computed Courant Number is a nice value for my model. in my model dt=80s and model grid sizes are as:
Minimum X-grid spacing, DXmin = 3.33514538E+00 km
Maximum X-grid spacing, DXmax = 3.98831267E+00 km
Minimum Y-grid spacing, DYmin = 3.33800882E+00 km
Maximum Y-grid spacing, DYmax = 3.98739982E+00 km
Minimum Z-grid spacing, DZmin = 1.01057987E-01 m
Maximum Z-grid spacing, DZmax = 1.83012378E+02 m
Maximum grid stiffness ratios: rx0 = 2.334384E-01 (Beckmann and Haidvogel)
rx1 = 2.465125E+00 (Haney)

computed Courant numbers are:
Minimum barotropic Courant Number = 7.91482742E-03
Maximum barotropic Courant Number = 9.61417822E-02
Maximum Coriolis Courant Number = 8.52012048E-03

model runs without problem but please give me help that how i can find that Courant number is in good range.

Cheers
fereshte

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: courant

#2 Unread post by kate »

Those numbers all look good, well under 1.0. If the model is running, it's time to look elsewhere for issues. Do the flows and other fields look sensible?

User avatar
jivica
Posts: 172
Joined: Mon May 05, 2003 2:41 pm
Location: The University of Western Australia, Perth, Australia
Contact:

Re: courant

#3 Unread post by jivica »

From my point of view it is waste of CPU time to have CFL 0.1, but should look at the dynamics and make a few tests to be sure how far with dt you can go.
I believe Kate once wrote that for Rutgers version CFL should be less than 0.85.
Quick and dirty way you can compute it by yourself, for barotropic gravity wave it is function of minimum grid size and max depth.
dt=0.85./sqrt(9.81*grid.h.*(grid.pm.^2+grid.pn.^2))

Or as in ROMS code using real velocities:
search for Courant definition i.e on linux: grep Courant ~/roms/src/ROMS/Nonlinear/*.F
then look at the
Nonlinear/diag.F
and you will see:

Code: Select all

              my_Cu=0.5_r8*ABS(u(i,j,k,nstp)+u(i+1,j,k,nstp))*          &
     &              dt(ng)*pm(i,j)
              my_Cv=0.5_r8*ABS(v(i,j,k,nstp)+v(i,j+1,k,nstp))*          &
     &              dt(ng)*pn(i,j)
              my_Cw=0.5_r8*ABS(wvel(i,j,k-1)+wvel(i,j,k))*              &
     &              dt(ng)/Hz(i,j,k)
              my_C=my_Cu+my_Cv+my_Cw
Which is like dirty way I wrote but instead gravity speed sqrt(g*h)you use real one from the model.

Cheers,
Ivica

fereshteh
Posts: 79
Joined: Sun Dec 30, 2012 2:58 pm
Location: inio:Iranian National Institute for Oceanography

Re: courant

#4 Unread post by fereshteh »

Dear jivica
it is function of minimum grid size and max depth
dt=0.85./sqrt(9.81*grid.h.*(grid.pm.^2+grid.pn.^2))
do you mean
grid.h= hmax
grid.pm=dx or 1/dx
grid.pn=dy or 1/dy
in both states dx and dy minimum?
thanks

Post Reply