-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop running 0th time step if possible, or at least clean up its handling in history output #925
Comments
@Bill Sacks <[email protected]> - yes! I think getting rid of the 0th time
step would be a really good thing to do.
…On Wed, Feb 12, 2020 at 3:55 PM Bill Sacks ***@***.***> wrote:
Within CESM, we run CTSM for an extra 0th timestep at the start of a
simulation. If I remember correctly, this was done because of some need of
CAM's that I either never understood or have forgotten.
I'm thinking that we should *not* do this when running CTSM via LILAC.
This could be at least slightly important if you're trying to start at a
very exact time for a short weather prediction run.
In fact, it's questionable whether we should still be doing this in CESM.
@mvertens <https://github.com/mvertens> do you agree that we should
ideally change this behavior to avoid the 0th timestep when running with
LILAC?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#925?email_source=notifications&email_token=AB4XCE7RBOKR4WQJBJ76PM3RCR47BA5CNFSM4KUF6CKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INC7O3Q>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4XCE4KKZLAD2MFEP7P6RTRCR47BANCNFSM4KUF6CKA>
.
|
From a discussion yesterday - @mvertens thinks that the whole 0th timestep thing may be a historical artifact that should be removed even within CESM – but this probably needs a bit more analysis. |
If we don't completely remove the 0th time step, then we should at least fix history averaging / output to avoid the messy off-by-one issues that arise when doing non-monthly output: this 0th time step shifts all other history output and so makes the aggregation of history times non-intuitive. |
This came up again, and @mvertens expressed more certainty that the 0th time step is a historical artifact that should just be removed: it is a relic from when CLM was a subroutine call within CAM and CAM ran this 0th time step so CLM needed to as well. They kept it in place as they migrated CLM to its own component so that answers would stay the same across that migration, but that is far enough in the past that she feels it can (and should) be removed. It's unclear whether CAM needs to keep it or if the 0th time step can be removed on the CAM side, too, but it feels pretty clear that it can be removed on the CTSM side now. |
We have a number of uses of the function
Update (2022-02-03): I just added one more check of Update (2022-07-13) I noticed a check of |
Some other things we should do / check:
|
I'm tentatively assigning this issue to @olyson based on this morning's conversation. Assignment may change after we meet with @billsacks |
How to start with time step 1 instead of 0? A straightforward way is probably to add a call to advance_timestep at the end of timemgr_init. However, need to investigate logic for setting |
How to test to make sure we have this right? @slevis-lmwg suggests: after this change, we think that an initial (non-cold-start) run should be identical to a restart / continue_run. However, we might need to temporarily remove checks of is_first_step (or nstep == 1) to get identical results. |
@olyson points out: will want to do a short test in coupled mode to make sure nothing is messed up there. |
Created a branch for this work: https://github.com/olyson/ctsm/tree/zerothtstep Modified the code to start at nstep=1 by adding a call to advance_timestep at the end of timemgr_init in the clm time manager.
The changes to time_bounds for daily and timestep files look appropriate. The monthly file doesn't change. I think this is ok because the old monthly files didn't include nstep=0 in the average because of this code in hist_htapes_wrapup:
Note that the daily and timestep file names also change, e.g., for the first file in a run:
Per @slevis-lmwg suggestion that an initial run should now be bfb with a restart when using the same initial/restart file, I set up a pair of simulations to demonstrate that. These were not bfb initially. Per @billsacks suggestion that we might need to temporarily remove checks of is_first_step (or nstep==1) to get identical results, I found that two SourceMods were required for the startup/initial simulation, one in lnd_comp_nuopc to remove an nstep==1 statement related to doalb and one in WaterStateType to remove a is_first_step check for soil water bounds adjustment (actually accomplished by changing this to .not.is_first_step). Initially this resulted in bfb for all monthly average history fields except for methane related variables, and TWS, VOLR, VOLRMCH. However, when I prescribed the MOSART initial file to be the same in both runs, these variables were now bfb. Makes sense since TWS includes river water and the methane variables depend on TWS (through the inundated fraction I believe). Some open issues/questions we can discuss at some point:
|
@olyson - just catching up on some stuff from the last couple of weeks. This is amazing - thank you very much for doing this!!! Awesome work and I'm really happy to hear that things went smoothly according to @slevis-lmwg 's suggestion for testing! I'll be out again next week, but would be happy to be part of a discussion after that to go through the final questions. Wow, this just makes me so happy :-) |
@olyson and I looked into this today. It looks like we do not need to make any changes to the logic for |
@billsacks and I met on 7-25-23.
On the other hand, the atm log file indicates that CAM is still running the 0th time step, so similar changes will need to be made to CAM code, e.g., src/utils/time_manager.F90 |
Awesome - this is all great, @olyson - thank you!!! Can you please open a PR for this? Then I think I said I can do the final testing - for MOSART and RTM as well as CTSM - and I'm still happy to do that. |
Within CESM, we run CTSM for an extra 0th timestep at the start of a simulation. If I remember correctly, this was done because of some need of CAM's that I either never understood or have forgotten.
I'm thinking that we should not do this when running CTSM via LILAC. This could be at least slightly important if you're trying to start at a very exact time for a short weather prediction run.
In fact, it's questionable whether we should still be doing this in CESM.
@mvertens do you agree that we should ideally change this behavior to avoid the 0th timestep when running with LILAC?
[(2020-07-14) I have removed this from the LILAC project because it is potentially a broader issue than just LILAC, but I am keeping a reference to it in that project.]
The text was updated successfully, but these errors were encountered: