Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

CFL error, Cournant Number and Segmentation Fault

Khin Myat

Hi everyone,

Now I am running a simulation and facing CFL errors. Although I have read the previous thread, changed namelsit setting and run the simulation again, I still couldn't solve my problem. When I reduced time step, it worked for the first one and half hour and then it stopped with CLF error and segmentation fault. But, As far as I understand, according to manual there are two time steps, RK3 time step and acoustic time step. These time steps are limited according to Courant numbers to avoid CFL error. If i set up according to recommended namelist, the set-up time step is less than maximum time step. But, I am still wondering why there is still CFL error although I set up the model time step which is smaller than maximum time step. I would like to know why there is still error. is there any other points I need to consider for that kind of problem?

When I read previous thread, I found smooth_cg_topo = .true function. Now I am running the simulation with 30m resolution geogrid data. The error is also found in domain 4 where 30m resolution is applied. I would like to know how this function works. How can I find whether the error occurs in the boundary region? I don't understand what smoothing really means. Does it means " this function removes the data of 30 m resolution data in the boundary region"? How does it affect on calculation of wind and other variable?

Any help or comment is appreciated.
Thank you in advance for your time.

Best regard,


  • namelist.input
    11.2 KB · Views: 5
  • rsl.error.0002.txt
    18.7 KB · Views: 1
  • rsl.error.0009.txt
    18.3 KB · Views: 1
  • rsl.error.0006.txt
    19.6 KB · Views: 1
  • rsl.error.0000
    4 MB · Views: 1
  • namelist.wps
    1.1 KB · Views: 2
To determine if your CFL errors are happening in the boundary, you can use something like ncview to view the domain. If you look at a variable and move through the output times, you should hopefully start to see some sort of irregular looking pattern in the location where the CFL error is occurring. Then by the next time step, you should see that it's all white. Sometimes you have to output more often (e.g., every time step) to catch it.

Regarding your question about how smoothing works, this is the comment in the code that discusses it (found in dyn_em/module_initialize_real.F):

 !  A user could request that the most coarse grid has the
         !  topography along the outer boundary smoothed.  This smoothing
         !  is similar to the coarse/nest interface.  The outer rows and
         !  cols come from the existing large scale topo, and then the
         !  next several rows/cols are a linear ramp of the large scale
         !  model and the hi-res topo from WPS.  We only do this for the
         !  coarse grid since we are going to make the interface consistent
         !  in the model betwixt the CG and FG domains.

         !  An important point is to inform the user if their request cannot
         !  be satisfied. Do not skip over this quietly.

So since your cfl errors are happening on domain 4, this option won't work for you. Does this error occur if you only use the "default" static data fields, or does it only happen when you use the "astergdem_5s+default" data?
Hi @kwerner,
Thank you very much for your reply.
At first I run the simulation with multi-input file setting. Then, I faced CFL error. After I have read the thread regarding cfl error, I run simulation again by reducing time step. Although I reduced the timestep up to 10s, the simulation worked at first and stopped after producing first 1.5hour wrfout file of do4 with CFL error. I saved wrfout file every 30 minutes for d04. But,I did not save the wrfout file for each timestep of d04. In that case, can I find the source of my problem? I still haven't understood well your point. So, do you mean " if I have CFL problem in the boundary region, I should see white line in the domain when I look at variable value from wrfout file"? Please, could you tell me which variable i should check for CFL error? or Could you tell me which document should I read? What do you mean " irregular looking pattern"?
Now I am running the simulation with one-input file setting again. The simulation is still running and there is no error still now. So, I think that there will be no error when I run the simulation with default static data.
But I haven't tried the simulation with the setting that " run the WPS with all domain with default static data and run WRF with Multi input file" .
However, my target point is that how wind flow is effected by the terrain near my interested location. So, I need to use higher resolution static data the inner nested domain to represent accurate terrain condition.
What will be the solution for my case? How should I find?

Thank you very much in advance for your time and helping me whenever I have problem.
Have a great day.

Best regard,
Last edited:

Regarding the "irregular pattern," take a look at slide 24 (ncview) in this presentation. The two images show how, at first, there is some pixelation near the top of the boundary, then by the next time step, white color is taking over. That is what I was referring to. You can look at several different variables, using the ncview tool, and I would advise to first check MU (column pressure).

Are you able to run WRF with namelist.input setting
input_from_file = .true.,.true.,.true.,.true.

when using met_em files that were created with the following namelist.wps setting?
geog_data_res = 'default','default','default','default',
Hi @kwerner ,
I am so sorry for my very late reply.
I am doing some test at the same time so, it took more time than i expected. Now, I am also running the simulation with the setting you mentioned in the above, I compared some results and attached the ppt here. 30m resolution data simulation stopped at 1:44 hr.
d04 2019-08-10_01:44:20+20/27 1 points exceeded v_cfl = 2 in domain d04 at time 2019-08-10_01:44:20+20/27 hours
I also want to know what +20/27 means. What does it mean?
Now default resolution data simulation has produced wrfout 2hr file. So, I think the simulation can run successfully with default resolution.

But, I did not find white colour pattern in the wrfout file of 30m resolution simulation. However, when i compare the results of two simulation, I found some strange pattern in D03 and D02 instead of D04 which CFL error was found. I found the strange pattern of the MU and PBLH variable in D03 and D02. Although i set up the domain 2 with default geogrid resolution for two simulations, MU and PBLH value are significantly different. Does that relate to CFL error? Does the problem occur because of geogrid data?
I also found that some research paper mentioned that the ratio of vertical grid spacing and horizontal grid spacing ratio should be smaller than 1 below PBL height in the innermost domain to avoid model crash due to abrupt topography changes. So, how should I consider the vertical spacing in model to avoid the problem? Please, could you explain or mention some documents regarding vertical grid spacing and how I can set up finer vertical grid spacing? Now in these simulations, I set up with automatic vertical grid spacing.

Thank you in advance for your time.
Have a great day!

Best regard,


  • kmw cfl.pdf
    821.7 KB · Views: 4
Thanks for sending those images. For the plots using ASTER data, it looks like the weird rectangular area in the d02 and d03 plots are the same area - it's just shows up larger in d03 since that domain covers a smaller area. I assume that this does actually occur because of 2-way nesting (feedback). Are you able to see anything weird in that same area in a d01 output file? What do those same plots for d02 and d03 look like at the initial time? It's unclear to me if that issue is causing all of the other issues.

As for vertical grid spacing, take a look at this FAQ and see if it provides any helpful information.

Can you tell me what type of input meteorological data you're using? Thanks!
Last edited:
Dear @kwerner ,

Thank you very much for your reply. I also think that this is because of two way nesting option.
Now I am using GFS data for input of meteorological data.
Unfortunately, I think I mistakenly deleted my wrfout fie of the beginning of simulation. Before that simulation, i also run the simulation with the same setting with the grid spacing 15 km. I also found the same condition. But at that time, the simulation could run successfully. I attached the result of that simulation. I also found same condition. This is strange. When I reduced the grid size to 7.5km, I faced the CFL error.
I think this may be when I set WPS , I set geogrid resolution for d03 with default + ASTER resolution. But the ASTER resolution did not cover the whole d03 area. At that time, I think if there is no higher resolution data, the program will use the default data for the rest of d03. That's why I thought there would be no problem. I think that may stop the simulation. Is there any other reasons for CFL error? Could you please share your opinion?
Thank you in advance for your time.



  • Kmw MU.pdf
    266.5 KB · Views: 1
Hi Khin,
Can you share the following files so I can test out your case?
1) your Aster static data file(s) - if it's too large to attach here, take a look at the home page of this forum for instructions on sharing large data files.
2) your index file for the Aster data
3) GEOGRID.TBL for use with the updated static data.
4) your latest rsl files (for the run that resulted in cfl errors) - please package all rsl* files together into a single *.tar file and attach that
5) your most recent namelist.wps and namelist.input.
Dear @kwerner ,

Thank you very much for your reply and time in advance. I uploaded the file with the name "Khin CFL error.tar.xz " here .
Yesterday, I also tried the simulation again with new setting. I also faced cfl error. I remembered that CFL error can solve when the boundary region change or when we relocate the domain. When i change grid point location of d04, cfl errror has solved after I have tried three or four cases. But I still could not solve the previous case. I also put namelist.input and namelist .wps of new setting in the file of new setting and cfl. But ,I did not save rsl file of the case. I am sorry for that. Now, I am wondering how we can know whether the boundary region is in complex terrain area or not. Please, could you tell me about that when you have free time?
Thank you very much for your time and help.
Wishing you happy new year and merry Christmas.

Best regard,


  • 20231219_174917.jpg
    5.3 MB · Views: 7
  • 20231219_225238.jpg
    2.1 MB · Views: 7
I would like to apologize for the extremely long delay in response. Due to the holidays and other reasons, I have been out of the office much of the past month, and am trying to get caught up, and the email notification for your response seems to have gotten lost in the pile until now. Can you let me know if you have resolved this issue, and/or whether you have made any progress? Thank you for your patience.
Dear Kwerner,

I understand the situation. It's okay, no problem. I am so thankful to you for giving your time among your busy schedule.
As I mentioned in the previous talk ,I tried with the new wps set-up with four domains. In the new simulation setup, At first, I reduced the domain 1 area and kept the same condition for other domains. When I compare the results with the previous case, it gave the better result at my interest location compared to previous case. Then I continued to run the simulation with small domain area. I tried to reduce the grid size with the new simulation set up. But it still had CFL error. Then, I tried to move a little the region of d04. Then it worked upto 4 hour. I think there will be no error but i have not finished the simulation for the whole simulation time.
But I am still wondering how we can avoid that sensitive region. And how can we know where is the sensitive region for the error like CFL.I think the new simulation set up is not solution. When the boundary region set up in the sensitive region, it still has CFL errror.
I also noticed one thing, when i check elevation data of TS list, grid start point change (e-we,e-sn) of domain 4 may affect on the elevation value of one of my interest location although I keep the same for other domain. Could you share your opinion on that case when you have free time?
These are all my current condition now.
Thank you very much for your time and helping me whenever I have difficulties.
Have a great day!

Best regard,