Skip to content
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

Non-Reynolds END_DATE code triggered erroneously in Coupled runs #409

Open
mathomp4 opened this issue Feb 15, 2023 · 2 comments
Open

Non-Reynolds END_DATE code triggered erroneously in Coupled runs #409

mathomp4 opened this issue Feb 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mathomp4
Copy link
Member

Recently @zhaobin74 found an issue with this code in gcm_run.j when running coupled:

GEOSgcm_App/gcm_run.j

Lines 649 to 660 in 3323d12

# For Non-Reynolds SST, Modify local CAP.rc Ending date if Finish time exceeds Current year boundary
# --------------------------------------------------------------------------------------------------
if( @OCEANtag != DE0360xPE0180 ) then
if( $yearf > $yearc ) then
@ yearf = $yearc + 1
@ nymdf = $yearf * 10000 + 0101
set oldstring = `grep '^\s*END_DATE:' CAP.rc`
set newstring = "END_DATE: $nymdf $nhmsf"
/bin/mv CAP.rc CAP.tmp
cat CAP.tmp | sed -e "s?$oldstring?$newstring?g" > CAP.rc
endif
endif

The issue is that this code was intended for the non-Reynolds Data Oceans which have their SST and ICE data in yearly files. As such, you can't have an experiment that crosses a year boundary. So, gcm_run.j makes sure things stop at the end of the year, then the next submission will continue on with the next year's data.

But, the coupled ocean's grid is also not a Reynolds ocean, so it triggers this for no good reason. If you are running MOM6, you don't need to stop at yearly boundaries since you aren't reading yearly SST/ICE files.

The simple solution is that "if coupled" we delete this code from the resulting gcm_run.j that gcm_setup makes (we do this in other places).

But there are some scenarios which might need this per @zhaobin74. Not sure if that means we'd want to just comment it out?

@mathomp4 mathomp4 added the bug Something isn't working label Feb 15, 2023
@zhaobin74
Copy link
Contributor

@mathomp4, thanks for opening this issue. Here are a bit more contexts.

There are a couple of scenarios where coupled runs will also need this protection. One is the ODAS run which uses segments length longer than 12 days or so. Currently ODAS runs in 5-day segments. Since all the yearly SST files extend further to Jan 10 or 11 of the following year, the days beyond Jan 1 are covered.

Another type of coupled runs are called NOASSIM runs in REPLAY mode. The segments could vary but typically are 1-month. Often these runs start and end at the 1st day of the month so they are not affected by presence or absence of the block. Should one makes NOASSIM runs not ending at the end of the month with longer segments, the run could fail; so that protection is needed.

Maybe using both running coupled and doing replay as the condition for this block is worth considering.

@mathomp4
Copy link
Member Author

@zhaobin74 Hmm. Unfortunately, while we know if we run COUPLED at setup time, we don't know about replay until run time. I'll have to figure out if that logic is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants