Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

The restart setting of MOSART

Dong Peng

Dong Peng
Member
Hello, everyone. I met something weird about mosart r file. I add 3 tracers into MOSART. But only 2 of 3 can be written into the r file, although other output nc files were correct. I double checked the nt_rtm was 5 and the subroutine RTMrestart were correct. Does anyone has insights of this? Thanks.
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
Hmmm. This is something that will take some effort for you to dig into and debug. Offhand it sounds like you've got this correct. But, possibly a different variable than nt_rtm is being used in the restart mechanism and shouldn't be. So you'll need to dig into the code and understand how it's currently being done and hopefully you can see what's wrong. You might also need to do some debugging work where you run it in a debugger and/or add print statements to see values of important variables at restart.

Since, we don't change the number of tracers and always only run with 1 or 2, it's likely we've never seen this problem. It also might be that there are use of hardcoded integers of a "2" in the restart code that should use the nt_rtm variable.
 

Dong Peng

Dong Peng
Member
Hmmm. This is something that will take some effort for you to dig into and debug. Offhand it sounds like you've got this correct. But, possibly a different variable than nt_rtm is being used in the restart mechanism and shouldn't be. So you'll need to dig into the code and understand how it's currently being done and hopefully you can see what's wrong. You might also need to do some debugging work where you run it in a debugger and/or add print statements to see values of important variables at restart.

Since, we don't change the number of tracers and always only run with 1 or 2, it's likely we've never seen this problem. It also might be that there are use of hardcoded integers of a "2" in the restart code that should use the nt_rtm variable.
I adapted the changes from E3SM_MOSART to CESM2_MOSART. Having more than 4 tracers could be normal after joining BGC processes. 2 for liq and ice; 2 for mud and sand; else for BGC like C/N. The bug was fixed after I changed the nt_rtm into 5 in module RtmRestFile subroutine RtmRestart rather than import nt_rtm from rof_cpl_indices. But the nt_rtm was changed into 5 before I debug, and other module files can correctly read the value of nt_rtm like RTMmod.
 
Top