[Wrf-users] CFL criterion - general question

Kevin Matthew Nuss wrf at nusculus.com
Thu Nov 1 19:54:54 MDT 2012


Hi,

Just to clarify the implementation in WRF versus the theoretical mentioned
in Anders reply:

The CFL errors that people see coming out of WRF and mentioned in Elena's
email, seem to only apply to vertical winds.

And as stated in the error messages themselves (e.g. "5  points exceeded
cfl=2 in domain ..."), they are only shown if the CFL is greater than 2,
rather than 1.


>From the source code:

vert_cfl = abs(ww(i,k,j)/mut(i,j)*rdnw(k)*dt)
'
'
'
if ( vert_cfl > 2. ) some = some + 1
'
'
'
IF ( some .GT. 0 ) THEN
     CALL get_current_time_string( time_str )
     CALL get_current_grid_name( grid_str )
     WRITE(temp,*)some,                                            &
            ' points exceeded cfl=2 in domain '//TRIM(grid_str)//' at time
'//TRIM(time_str)//' hours'
     CALL wrf_debug ( 0 , TRIM(temp) )
     WRITE(temp,*)'MAX AT i,j,k: ',maxi,maxj,maxk,'
vert_cfl,w,d(eta)=',max_vert_cfl, &
                             maxdub,maxdeta
     CALL wrf_debug ( 0 , TRIM(temp) )
   ENDIF

Hope that helps,
Kevin


On Thu, Nov 1, 2012 at 2:48 PM, Anders Nottrott <anottrot at ucsd.edu> wrote:

>  Hi All,
>
> The maximum value of the CFL number is set by the Courant-Friedrichs-Lewy
> condition (see WRF Description, Section 3.3 Stability Constraints). It is a
> necessary condition for the convergence of the finite difference
> integration schemes.
>
> Generally CFL = u_i*dt/dx_i, where u_i is the maximum velocity in the ith
> direction, dt is the timestep and  dx_i is the grid spacing in the ith
> direction. For a simple 1D advection equation with an explicit solver the
> requirement is CFL < 1 everywhere in the domain. The limiting value is
> different for other equations and higher order finite difference schemes.
>
> If you get an error message saying that the CFL was violated you should
> consider the solution associated with that simulation to be spurious. To
> resolve this problem you can either reduce dt (which increases the
> computation time) or you can increase dx (which reduces resolution) and
> rerun the simulation. Keep in mind that u_i is the maximum velocity in the
> ith direction so a large velocity event at even one grid point can cause
> you simulation to "blow up" in just a couple of time steps. Thus it is
> important to consider the CFL in three dimensions and then allow some small
> factor of safety in the design of dt or dx.
>
> Regards,
>
> Anders
>
>
> --
> Anders Nottrott
> *PhD Student, Mechanical and Environmental Engineering*
> University of California, San Diego
> Department of Mechanical and Aerospace Engineering
> Website: solar.ucsd.edu/nottrott
>
> On 11/1/2012 11:37 AM, Kevin Matthew Nuss wrote:
>
> Hi Elena,
>
>  I have had the same thing happen. I don't know exactly how that affects
> the results, so when it has happened to me, I did not trust the results.
>
>  Yes, reducing the time step is the standard way to avoid CFL errors.
> There are some alternatives like using restart files: when CFLs appear,
> stop, go back a little way in time, use small time steps for a while, stop
> and continue forward using the larger timesteps. That is mostly done for
> very long runs like climate downscaling when it is not practical to use
> small timesteps for an entire run.
>
>  If CFLs always appear at the same coordinates such as a mountain peak,
> EPSSM can be adjusted or the grid changed.
>
>  If you need more information and detail about what I do to avoid CFL
> errors, I have some on my website: http://www.nusculus.com/wrf-errors
>
>  I don't claim to be an expert; I have simply suffered through a lot of
> bad WRF runs.
>
>  But most people just keep reducing the time step until the CFL errors go
> away.
>
>  Kevin
>
> On Wed, Oct 31, 2012 at 11:51 PM, Elena Maria Pison San Pedro <
> emp at dhi.com.sg> wrote:
>
>>
>>
>> Hello,
>>
>>
>>
>> I’ve remarked that sometimes when I run a simulation (WRF3.4) I got
>> messages saying “ x points exceeded cfl=2 at time…” *but the simulation
>> run to completion*.
>>
>>
>>
>>
>>
>> How can this affect the results? What can I do to solve this
>> instabilities, run a higher time step?
>>
>>
>>
>> Thanks a lot in advance!
>>
>>
>>
>> Best regards,
>>
>> Elena
>>
>>
>>
>>
>>
>> Elena Pison San Pedro
>>
>> M.Sc. in Atmospheric Sciences
>>
>>
>>
>> [image: Description:
>> C:\Users\mmc\AppData\Roaming\Microsoft\Signatures\dhi_logo.gif]
>>
>>
>>
>> DHI-NTU Research Centre and Education Hub,
>>
>> DHI Water & Environment (S) Pte Ltd
>>
>> 1 Clean Tech Loop
>>
>> #03-05 CleanTech One
>>
>> Singapore 637141
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Tel:
>>
>>
>>
>> +65-6777-6330
>>
>>
>>
>> emp at dhi.com.sg
>>
>> www.dhigroup.com
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Wrf-users mailing list
>> Wrf-users at ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/wrf-users
>>
>>
>
>
> _______________________________________________
> Wrf-users mailing listWrf-users at ucar.eduhttp://mailman.ucar.edu/mailman/listinfo/wrf-users
>
>
> _______________________________________________
> Wrf-users mailing list
> Wrf-users at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/wrf-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20121101/e8a06c09/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2148 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/wrf-users/attachments/20121101/e8a06c09/attachment-0001.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 141589 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/wrf-users/attachments/20121101/e8a06c09/attachment-0001.jpe 


More information about the Wrf-users mailing list