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
Restart files are read back in again right after being written out, unnecessarily #4513
Comments
The drv_resume string is part of the partially implemented pause/resume capability. This capability allows for the just written restart file to be manipulated by some external process (DA) before being read back into the model. The drv_resume variable should be '' unless the pause/resume functionality is invoked. If you are finding this not to be the case then I think you have identified a bug that should be corrected. |
Some more context:
|
Thanks @jedwards4b and @jayeshkrishna. Appears that we have a bug then, as the timers (via list of PIO routines called and time spent in the timer I added around seq_rest_read) and the cpl.log output both indicate that restart files are being read back in immediately following each restart write. Note that the case I ran is
|
In the current logic ... a) drv_resume is not initialized. b) drv_resume is first set in the call to cime_run_write_restart, to
if restart_alarm is not true and drv_pause is not true. c) If a restart_alarm is true (or drv_pause is true), then drv_resume is set to a file path in the call to seq_rest_write. It retains this value upon exit from this routine, which then triggers the following call to seq_rest_read . I do not know what the logic is supposed to be here (set drv_resume = '' at the end of seq_rest_write?), so someone else needs to make the fix. Also note that the immediately preceding logic associated with "RUN ESP MODEL" can also leave drv_resume set to a nonzero length string, but perhaps this is what is wanted there. @rljacob, any suggestion on who to assign to fix this bug? |
I'll work on it. Yes when ESP model is run then drv_resume should be a nonblank string. |
Make drv_resume a logical and use it to determine if a restart file should be read. Introduce drv_resume_file and use it where drv_resume was assumed to be a filename. Also add a log message for the real restart read at the start of a run. Fixes #4513
Make drv_resume a logical and set it to FALSE to prevent read of restart immediately after it is written. Introduce drv_resume_file to use where a filename is really needed. Also add a log message for the real restart read and make the seq_io_read_avs log messages more informative. Fixes #4513
Make drv_resume a logical and set it to FALSE to prevent read of restart immediately after it is written. Introduce drv_resume_file to use where a filename is really needed. Also add a log message for the real restart read and make the seq_io_read_avs log messages more informative. Fixes #4513
In cime_comp._mod.F90 is the following code:
...
In a 1 month initial run (with restart write), the restart files are read back in immediately after being written out, after which the job ends. Also occurs for a continuation run. For a 2 month initial run with restart writes every month, the restart files are read back in immediately after being written out each time (twice, once per month). So, perhaps this is needed to verify the restart write? If not, does it makes sense to read it back in right before the job ends?
The text was updated successfully, but these errors were encountered: