Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pre/remap_restart/remap_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def parse_args(program_description):
p_command.add_argument('-qos', default="", help="slurm_pbs quality-of-service", choices=['', 'debug', 'allnccs', 'normal'])
account = get_account()
p_command.add_argument('-account', default=account, help="slurm_pbs account")
p_command.add_argument('-partition', default='', help="slurm_pbs partition")

if (BUILT_ON_SLES15):
p_command.add_argument('-partition', default='scutest',help="slurm_pbs partition")
else:
p_command.add_argument('-partition', default='', help="slurm_pbs partition")

p_command.add_argument('-rs', default='3', help="Flag indicating which restarts to regrid: 1 (upper air); 2 (surface); 3 (both)", choices=['1','2','3'])

# Parse using parse_known_args so we can pass the rest to the remap scripts
Expand Down
19 changes: 15 additions & 4 deletions pre/remap_restart/remap_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ def echo_bcs(x,opt):
return False

def default_partition(x):
if x['slurm_pbs:qos'] == 'debug':
x['slurm_pbs:partition'] = 'compute'
return False
return True
if x['slurm_pbs:qos'] == 'debug':
if BUILT_ON_SLES15:
x['slurm_pbs:partition'] = 'scutest'
else:
x['slurm_pbs:partition'] = 'compute'
return False
return True

def validate_merra2_time(text):
if len(text) == 10 :
Expand Down Expand Up @@ -121,6 +124,13 @@ def ask_questions():
"validate": lambda text: validate_geosit_time(text),
"when": lambda x: x.get("input:shared:GEOS-IT", False) and not x.get("input:shared:MERRA-2", False),
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh. This one is tricky. By default, GEOSgcm v12 is non-hydrostatic. So, anyone remapping from v12 to v12+ would prefer this to be True by default. But then, anyone remapping anything older (v11, say) would want True

I am not sure what to do here. @wmputman might have more insight.

Copy link
Contributor Author

@biljanaorescanin biljanaorescanin Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think this makes also issues for coupled runs from older restarts. Coupled restarts are always hydrostatic I think.
@wmputman what should be our defaults?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biljanaorescanin "Coupled restarts are always hydrostatic" well...huh. I did not know that. I've been doing any test MOM6 runs with v12 as non-hydro.

Maybe @wmputman has FV3 setup in such a way now that it doesn't matter? If not, I know MERRA-2 is hydrostatic but what about GEOS-IT? I assume it is, but since @biljanaorescanin added GEOS-IT we'd probably want some default for that too.

"type": "confirm",
"name": "input:air:hydrostatic",
"message": "Is the upper air input hydrostatic? (If you are not sure, don't change the default 'True')\n",
"default": True,
"when": lambda x: not x['input:shared:MERRA-2'],
},
{
"type": "path",
"name": "output:shared:out_dir",
Expand Down Expand Up @@ -465,6 +475,7 @@ def ask_questions():
answers["output:surface:remap_water"] = answers["output:surface:remap"]
answers["output:surface:remap_catch"] = answers["output:surface:remap"]
del answers["output:surface:remap"]
if answers["input:shared:MERRA-2"] : answers["input:air:hydrostatic"] = True

return answers

Expand Down
6 changes: 3 additions & 3 deletions pre/remap_restart/remap_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#During cmake step, the string will be changed according to the system

BUILT_ON_SLES15 = "@BUILT_ON_SLES15@"
GEOS_SITE = "@GEOS_SITE@"
BUILT_ON_SLES15 = "TRUE"
GEOS_SITE = "NCCS"

if BUILT_ON_SLES15 == "TRUE":
BUILT_ON_SLES15 = True
Expand Down Expand Up @@ -119,7 +119,7 @@

message_ogrid_new = "Select data ocean grid/resolution of output restarts:\n"

message_qos = "SLURM or PBS quality-of-service (qos)? (If resolution is c1440 or higher, enter 'allnccs' for NCCS or 'normal' for NAS.)\n"
message_qos = "SLURM or PBS quality-of-service (qos)? (Use default 'debug' to get resource faster; or Enter 'allnccs' for NCCS or 'normal' for NAS if resolution is c1440 or higher; or leave it blank)\n"

message_account = "Select/enter SLURM or PBS account:\n"

Expand Down
Loading