WRF
WRF copied to clipboard
Adaptive Time Step Completes Prematurely for Idealized Cases
If setting use_adaptive_time_step = .true., along with an idealized case simulation, the simulation will end (successfully) prematurely after 3 hours.
The issue is in adapt_timestep_em.F, where a bug fix was put in a while back (not sure when) so that now the time step must fall on boundary times. In this equation (line 286 in V4.3):
time_to_bc = grid%interval_seconds - grid%dtbc
- dtbc is the time from the last boundary read
- there aren’t boundary conditions for idealized cases
- we don’t set interval_seconds for ideal cases, so it takes the default (10800)
eventually this value (time_to_bc) leads to the simulation’s end and because of the 3 bulleted items above, idealized cases end after a single default interval_seconds time period.
The issue now is if/how/where should this be fixed.
- Should idealized cases be permitted to use adaptive time step?
- Should it be fixed in adapt_timestep_em.F - having an if test that sets interval_seconds to the length of the simulation if it’s an ideal case?
- Should this be in check-a-mundo?
- Somewhere else? And/or a different way to correct it?
In the meantime, users can move forward by setting interval_seconds in the namelist to the total length of the run.
@dudhia @weiwangncar @kkeene44 Kelly, Good detective work on this idealized failure with adaptive time steps.
Your question: "Should idealized cases be permitted to use adaptive time step?"
I'd say, based on the results - NO. Based on we have not seen this often, then most users are not doing idealized runs + adaptive dt, so again - we choose to smoothly NOT support ideal + adpaptive dt.
We can put in a test in check_a_mundo to stop idealized case from using adaptive dt. The simplest way would require a new namelist variable - something like "i_am_an_idealized_case", or "ideal=.true., or "real=.false." We make the default in the Registry to be an real case, and then add that new nml line to each idealized namelist. [Editor's note: we could go the other way, too: set idealized to true by default, and change only the nmls in test/em_real.]
Wei and Jimy, Opinions?
I would say 'No' too. I guess it took users 10+ years to try it in an idealized case....
@kkeene44 @liujake Kelly,
- Add a line in Registry.EM_COMMON that has either a namelist option "ideal=F" or "real=F".
- Add in the associated namelist option in the test/em_*/namelist files. If you went with "ideal=F", then each nml in the idealized cases is changed. If you went with "real=F", then all of the real namelists are changed.
- Update the check-a_mundo to see if this is an idealized case. If so, FAIL if there is a request for adpative dt.
Jake, For a namelist change, is there a need to also add this to Registry.EM_COMMON.var?