Skip to content

Commit dbbfe57

Browse files
authored
Merge pull request #116 from GEOS-ESM/feature/borescan_fix_v12_branch
Add missing commits to GCMv12 branch
2 parents 539c82c + 141ed37 commit dbbfe57

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

pre/remap_restart/remap_command_line.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def parse_args(program_description):
8282
account = get_account()
8383
p_command.add_argument('-account', default=account, help="slurm_pbs account")
8484
p_command.add_argument('-partition', default='', help="slurm_pbs partition")
85+
8586
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'])
8687

8788
# Parse using parse_known_args so we can pass the rest to the remap scripts

pre/remap_restart/remap_questions.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def echo_bcs(x,opt):
3636
return False
3737

3838
def default_partition(x):
39-
if x['slurm_pbs:qos'] == 'debug':
40-
x['slurm_pbs:partition'] = 'compute'
41-
return False
42-
return True
39+
if x['slurm_pbs:qos'] == 'debug':
40+
x['slurm_pbs:partition'] = 'compute'
41+
return False
42+
return True
4343

4444
def validate_merra2_time(text):
4545
if len(text) == 10 :
@@ -121,6 +121,13 @@ def ask_questions():
121121
"validate": lambda text: validate_geosit_time(text),
122122
"when": lambda x: x.get("input:shared:GEOS-IT", False) and not x.get("input:shared:MERRA-2", False),
123123
},
124+
{
125+
"type": "confirm",
126+
"name": "input:air:hydrostatic",
127+
"message": "Is the upper air input hydrostatic? (If you are not sure, don't change the default 'True')\n",
128+
"default": True,
129+
"when": lambda x: not x['input:shared:MERRA-2'],
130+
},
124131
{
125132
"type": "path",
126133
"name": "output:shared:out_dir",
@@ -465,6 +472,7 @@ def ask_questions():
465472
answers["output:surface:remap_water"] = answers["output:surface:remap"]
466473
answers["output:surface:remap_catch"] = answers["output:surface:remap"]
467474
del answers["output:surface:remap"]
475+
if answers["input:shared:MERRA-2"] : answers["input:air:hydrostatic"] = True
468476

469477
return answers
470478

pre/remap_restart/remap_upper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ def find_rst(self):
423423
if len(files) >0:
424424
restarts_in.append(files[0])
425425
if (len(restarts_in) == 0) :
426-
print("\n try restart file names without time stamp\n")
426+
print("\n Try restart file names without time stamp or suffix (e.g., .nc4)\n")
427+
print("\n It expects restart file names as xx_internal_rst, e.g., fvcore_internal_rst \n")
427428
for f in self.air_restarts :
428429
fname = rst_dir+ '/'+f
429430
if os.path.exists(fname):

pre/remap_restart/remap_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119

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

122-
message_qos = "SLURM or PBS quality-of-service (qos)? (If resolution is c1440 or higher, enter 'allnccs' for NCCS or 'normal' for NAS.)\n"
122+
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"
123123

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

0 commit comments

Comments
 (0)