Run a standard CESM simulation and output daily initial conditions files: relatively simple task, but one that managed to go quickly awry.
First of all, it’s relatively easy to tell the model to change its default output frequency of inic files and restart files; INITHIST can be set to ‘DAILY’ in your user_nl_cam file, and REST_N can be set along with REST_OPTION to save restart files at a frequency different than the default. I chose (I thought) to output initial conditions files every day, and save full restart information once a month. Using a script I’ve used for the last year successfully, I submitted my run to the queue and waited.
Lo and behold, a few hours later, the run finished. But there was one major error – the archive directory only showed restart files (and initial conditions files) for the last day of my two-month simulation. I checked the run directory as well, but again, no sign of my inic files. Thinking I must have done something very wrong, I began poking around the internet.
This doesn’t seem to be a very common problem. There were many helpful suggestions (like checking the run directory instead of the archive one; or checking archive/atm instead of archive/rest), but the files just weren’t anywhere to be found. A bit more digging though, and I came across a variable in env_run.xml that can be changed to turn on archiving of interim files: DOUT_S_SAVE_INT_REST_FILES can be set to true, and this seems to solve the problem. In a short debug run, I can now see that the inic files are saved within the archive/atm directory. I’m not sure why I had to set this variable, when in theory changing INITHIST should have been all that was necessary. If anyone has some insight as to why this had to be done, please let me know! Otherwise, I hope this helps anyone with a similar problem in the future.