Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions pre/remap_restart/remap_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def parse_args(program_description):
account = get_account()
p_command.add_argument('-account', default=account, help="slurm_pbs account")
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
16 changes: 12 additions & 4 deletions pre/remap_restart/remap_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ 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':
x['slurm_pbs:partition'] = 'compute'
return False
return True

def validate_merra2_time(text):
if len(text) == 10 :
Expand Down Expand Up @@ -121,6 +121,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 +472,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
3 changes: 2 additions & 1 deletion pre/remap_restart/remap_upper.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ def find_rst(self):
if len(files) >0:
restarts_in.append(files[0])
if (len(restarts_in) == 0) :
print("\n try restart file names without time stamp\n")
print("\n Try restart file names without time stamp or suffix (e.g., .nc4)\n")
print("\n It expects restart file names as xx_internal_rst, e.g., fvcore_internal_rst \n")
for f in self.air_restarts :
fname = rst_dir+ '/'+f
if os.path.exists(fname):
Expand Down
2 changes: 1 addition & 1 deletion pre/remap_restart/remap_utils.py
Original file line number Diff line number Diff line change
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