-
Notifications
You must be signed in to change notification settings - Fork 92
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
Branch runs fail at double allocation of FATES structures #653
Comments
@aldivi does this happen if you do a hybrid run too? I just realized (because @jkshuman told me) that a hybrid run is necessary if turning on fire using a restart from a case where fire is off, and I managed to get it to work; normally I've always just used the |
@ckoven I haven't tried a hybrid run, but I don't think this happens for hybrid runs because they are flagged as startup runs, so they shouldn't trigger the reading/initializing of restart files/structures. One usually (always?) provides an initial file (via finidat through run_refcase and run_refdate) for a hybrid run so that it isn't a cold start. In the code there generally isn't a distinction between a hybrid run and a startup run, just a distinction as to whether or not there is a finidat file. I think there are some namelist checks for things that can or cannot be set with hybrid vs startup, but some of these are just superficial restrictions such as a cold start cannot be set if finidat is set (not sure why two separate run types are needed for this). I think that runs starting from the end of spinups are always configured as a hybrid run with an initial conditions file. |
@aldivi is this still a live issue? |
@glemieux |
Thanks for the clarification. CTSM still uses the same checks as far as I can tell, so this should be addressed. For others, here is the e3sm PR that includes the updates @aldivi applied: E3SM-Project/E3SM#4024
|
I have a local "fix" for this in my harvest branch aldivi/elm/fates-harvest in the aldivi/fates github fork. I am not sure how this relates to the rest of the host model restart code, or to the best way to start runs from other runs.
In clm_initiallizeMod (line 914) alm_fates%init_coldstart is called if is_restart() is false. But is_restart() is false for branch runs, which act as restarts. So the both coldstart and restart functions allocate FATES structures.
Locally, I added an additional .and. condition for coldstart: nsrest /= nsrBranch
Likewise, in clmfates_interfaceMod (line 310), pass_is_restart passes the is_restart() value to FATES, which is then used by set_site_properties to determine whether to set some initial values or not (if not, later the values are set from a restart file).
Locally, I added the condition: .or. nsrest .eq. nsrBranch to pass a restart flag if it is a branch run.
The text was updated successfully, but these errors were encountered: