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 Xgrid spacing, DXmin = 3.33514538E+00 km
Maximum Xgrid spacing, DXmax = 3.98831267E+00 km
Minimum Ygrid spacing, DYmin = 3.33800882E+00 km
Maximum Ygrid spacing, DYmax = 3.98739982E+00 km
Minimum Zgrid spacing, DZmin = 1.01057987E01 m
Maximum Zgrid spacing, DZmax = 1.83012378E+02 m
Maximum grid stiffness ratios: rx0 = 2.334384E01 (Beckmann and Haidvogel)
rx1 = 2.465125E+00 (Haney)
computed Courant numbers are:
Minimum barotropic Courant Number = 7.91482742E03
Maximum barotropic Courant Number = 9.61417822E02
Maximum Coriolis Courant Number = 8.52012048E03
model runs without problem but please give me help that how i can find that Courant number is in good range.
Cheers
fereshte
courant
Re: courant
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?
 jivica
 Posts: 135
 Joined: Mon May 05, 2003 2:41 pm
 Location: The University of Western Australia, Perth, Australia
Re: courant
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
Which is like dirty way I wrote but instead gravity speed sqrt(g*h)you use real one from the model.
Cheers,
Ivica
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
and you will see:Nonlinear/diag.F
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,k1)+wvel(i,j,k))* &
& dt(ng)/Hz(i,j,k)
my_C=my_Cu+my_Cv+my_Cw
Cheers,
Ivica

 Posts: 79
 Joined: Sun Dec 30, 2012 2:58 pm
 Location: inio:Iranian National Institute for Oceanography
Re: courant
Dear jivica
grid.h= hmax
grid.pm=dx or 1/dx
grid.pn=dy or 1/dy
in both states dx and dy minimum?
thanks
do you meanit is function of minimum grid size and max depth
dt=0.85./sqrt(9.81*grid.h.*(grid.pm.^2+grid.pn.^2))
grid.h= hmax
grid.pm=dx or 1/dx
grid.pn=dy or 1/dy
in both states dx and dy minimum?
thanks