-
Notifications
You must be signed in to change notification settings - Fork 17
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
Facilitate hybrid runs #159
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -526,10 +526,10 @@ Global: | |
datatype: logical | ||
units: Boolean | ||
value: | ||
$OCN_GRID == "gx1v6": True | ||
$OCN_GRID == "tx0.66v1": True | ||
$OCN_GRID == "tx2_3v2": True | ||
$OCN_GRID == "tx0.25v1": True | ||
$RUN_TYPE != "hybrid" or $CONTINUE_RUN == True and $OCN_GRID in ["gx1v6", "tx0.66v1", "tx2_3v2", "tx0.25v1"]: | ||
True | ||
else: | ||
False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add parenthesis to these? Just checked, and I guessed right: >>> True or True and False
True
>>> True or (True and False)
True
>>> (True or True) and False
False So if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reading through MOM_state_initialization module, it actually looks like the check for |
||
TEMP_SALT_Z_INIT_FILE: | ||
description: | | ||
"default = 'temp_salt_z.nc' | ||
|
@@ -3006,7 +3006,16 @@ Global: | |
USER - call a user modified routine." | ||
datatype: string | ||
value: | ||
$OCN_GRID == "MISOMIP": "ISOMIP" | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: | ||
"thickness_file" | ||
else: | ||
$OCN_GRID == "MISOMIP": "ISOMIP" | ||
THICKNESS_FILE: | ||
description: "The name of the thickness file" | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: | ||
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc' | ||
SPONGE_CONFIG: | ||
description: | | ||
"default = 'file' | ||
|
@@ -3054,7 +3063,45 @@ Global: | |
USER - call a user modified routine." | ||
datatype: string | ||
value: | ||
$OCN_GRID == "MISOMIP": "ISOMIP" | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: | ||
"file" | ||
else: | ||
$OCN_GRID == "MISOMIP": "ISOMIP" | ||
TS_FILE: | ||
description: "The initial condition file for the temperature and salinity." | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: | ||
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc' | ||
TEMP_IC_VAR: | ||
description: "The initial condition variable for potential temperature" | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: "Temp" | ||
SALT_IC_VAR: | ||
description: "The initial condition variable for the salinity." | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: "Salt" | ||
VELOCITY_CONFIG: | ||
description: "A string that determines how the initial velocities are specified for a new run." | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: "file" | ||
VELOCITY_FILE: | ||
description: "The name of the velocity initial condition file." | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: | ||
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc' | ||
AGE_IC_FILE: | ||
description: | | ||
"The file in which the age-tracer initial values can be found, or an empty | ||
string for internal initialization." | ||
datatype: string | ||
value: | ||
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False: | ||
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc' | ||
T_REF: | ||
description: | | ||
"[degC] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you creating the
restart_file
from the case instead of reading therpointer
file? Alternatively, why are you checking for the existence of anrpointer
file if you aren't reading it here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For continuation runs, MOM6 reads the rpointer file regardless of run type. Therefore, a check is performed to confirm its existence.
However, in the case of initial hybrid runs, MOM6 does not read rpointer but instead reads the initial condition files listed in MOM_input. So, for an initial hybrid run (and for initial branch runs too), the above block disregards the rpointer file and determines the required restart file name from the reference case properties. Maybe for initial branch runs, a check may be added to confirm that reference case and rpointer are consistent.
The reason I check for the existence of rpointer file when it's an initial hybrid run is because of CESM conventions, but I am happy to update the check to be performed only for continuation runs and branch runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! I think this block of code makes sense given the structure of updates in the companion MOM6 PR.