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

Bug in the adaptive time step code in WRFV4.0 (and probably earlier versions)

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

LouisMarelle

New member
Hello,

I found a bug related to the adaptive time step in WRFV4.0. I found very high spurious T2 differences (up to several Kelvins) between sensitivity runs using almost similar setups when using the adaptive time step. These differences are not caused by normal differences in internal model variability between the runs. They are instead due to differences in the calculated incident solar radiation between the runs, which is obvious when looking at the very different accumulated total downwelling radiation (i.e. ACSWDNT) at the end of the different runs. This has a large direct influence on the calculated TSK and T2. When running "what if" scenarios these spurious differences between runs can unfortunately erroneously be interpreted as meaningful signal.

I found that this was due to the implicit asumption in the radiation driver that the radiative code is called every radt exactly (the zenith angle is calculated at time+radt/2, time being the time when the radiation code is called). However, when the adaptive time step enabled, the call to the radiation code is not performed exactly every radt, but after a time greater than radt has elapsed since the last radiation call. This is a relatively minor difference but it is apparently enough to cause these high temperature difference at some time steps.

I fixed this issue by syncing the adaptive time step to radt in dyn_em/adapt_timestep_em.F, so that the radiation code is called exactly every radt (similar to what is already done to sync the adaptive time step with the ouptut timestep). This correction makes the spurious T2 and TSK differences disappear. I am happy to share the corrected code with the development team if they need it.

Louis Marelle
Postdoc at LATMOS/IPSL
 
Louis,
Thank you for the detailed description of the problem related to adaptive time step. Would you please send me your modified code to take a look?
Please also send me your namelist.wps and nameless.input for the test case. I would like to repeat your problem here in NCAR.
Ming
 
@LouisMarelle I know it has been several years now since this post, but I was wondering, would you be willing to share your code fix?

Thanks,
Joshua
 
Hello Joshua,
Here is a link to the updated adaptive time step module on github:
https://github.com/lmarelle/WRF-halogens/blob/dev/halogens/dyn_em/adapt_timestep_em.F
And the corresponding git commit
https://github.com/lmarelle/WRF-halogens/commit/fe245c2baee36c6273aa4b1ef03e74a8bed03a19
My changes are also marked with a !LMarelle flag. I hope this helps!
 
Top