Skip to content

Commit 40cb805

Browse files
committed
Fix multi-instance hybrid run initial conditions (restart) files by adding inst_suffix
Also rename RESTARTFILE_APPENDIX_PREFIX as ENSEMBLE_APPENDIX_PREFIX
1 parent 4b3b4eb commit 40cb805

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

param_templates/MOM_input.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3107,7 +3107,7 @@ Global:
31073107
datatype: string
31083108
value:
31093109
$RUN_TYPE == "hybrid":
3110-
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
3110+
= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
31113111
SPONGE_CONFIG:
31123112
description: |
31133113
"default = 'file'
@@ -3173,7 +3173,7 @@ Global:
31733173
datatype: string
31743174
value:
31753175
$RUN_TYPE == "hybrid":
3176-
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
3176+
= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
31773177
TEMP_IC_VAR:
31783178
description: "The initial condition variable for potential temperature"
31793179
datatype: string
@@ -3194,15 +3194,15 @@ Global:
31943194
datatype: string
31953195
value:
31963196
$RUN_TYPE == "hybrid":
3197-
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
3197+
= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
31983198
AGE_IC_FILE:
31993199
description: |
32003200
"The file in which the age-tracer initial values can be found, or an empty
32013201
string for internal initialization."
32023202
datatype: string
32033203
value:
32043204
$RUN_TYPE == "hybrid" and $CONTINUE_RUN == False:
3205-
= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
3205+
= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'
32063206
T_REF:
32073207
description: |
32083208
"[degC]
@@ -3754,7 +3754,7 @@ Global:
37543754
checksums will not match and cause crash.
37553755
datatype: logical
37563756
value: $TEST
3757-
RESTARTFILE_APPENDIX_PREFIX:
3757+
ENSEMBLE_APPENDIX_PREFIX:
37583758
description: |
37593759
"default = ''
37603760
The prefix for the restart file appendix (i.e., ensemble id for ensemble

param_templates/json/MOM_input.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,7 +2482,7 @@
24822482
"description": "The name of the thickness file",
24832483
"datatype": "string",
24842484
"value": {
2485-
"$RUN_TYPE == \"hybrid\"": "= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
2485+
"$RUN_TYPE == \"hybrid\"": "= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
24862486
}
24872487
},
24882488
"SPONGE_CONFIG": {
@@ -2529,7 +2529,7 @@
25292529
"description": "The initial condition file for the temperature and salinity.",
25302530
"datatype": "string",
25312531
"value": {
2532-
"$RUN_TYPE == \"hybrid\"": "= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
2532+
"$RUN_TYPE == \"hybrid\"": "= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
25332533
}
25342534
},
25352535
"TEMP_IC_VAR": {
@@ -2557,14 +2557,14 @@
25572557
"description": "The name of the velocity initial condition file.",
25582558
"datatype": "string",
25592559
"value": {
2560-
"$RUN_TYPE == \"hybrid\"": "= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
2560+
"$RUN_TYPE == \"hybrid\"": "= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
25612561
}
25622562
},
25632563
"AGE_IC_FILE": {
25642564
"description": "\"The file in which the age-tracer initial values can be found, or an empty\nstring for internal initialization.\"\n",
25652565
"datatype": "string",
25662566
"value": {
2567-
"$RUN_TYPE == \"hybrid\" and $CONTINUE_RUN == False": "= f'./{$RUN_REFCASE}.mom6.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
2567+
"$RUN_TYPE == \"hybrid\" and $CONTINUE_RUN == False": "= f'./{$RUN_REFCASE}.mom6{$INST_SUFFIX}.r.{$RUN_REFDATE}-{$RUN_REFTOD}.nc'"
25682568
}
25692569
},
25702570
"T_REF": {
@@ -3055,7 +3055,7 @@
30553055
"datatype": "logical",
30563056
"value": "$TEST"
30573057
},
3058-
"RESTARTFILE_APPENDIX_PREFIX": {
3058+
"ENSEMBLE_APPENDIX_PREFIX": {
30593059
"description": "\"default = ''\nThe prefix for the restart file appendix (i.e., ensemble id for ensemble\nruns). If this prefix is found in the restart file name, the appendix is added\nright after the first occurrence of the prefix. If not found, the appendix is\nadded to the end of the file name. This parameter is ignored for non-ensemble runs.\"\n",
30603060
"datatype": "string",
30613061
"value": ".mom6"

0 commit comments

Comments
 (0)