Skip to content

Commit c89dedf

Browse files
authored
Merge pull request #970 from karsenau/support/lisf-557ww-7.4
Updates to S2S LDT-based python script
2 parents a68dcee + 00d8599 commit c89dedf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ldt/utils/usaf/s2s_ensrst/generate_ldtconfig_files_ensrst_nrt.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# * 15 Nov 2021: K. Arsenault/SAIC, made minor fixes and added config entries.
1919
# * 19 Nov 2021: Eric Kemp/SSAI, fixed typos reported by K. Arsenault and
2020
# R. Zamora.
21+
# * 18 Jan 2022: K. Arsenault/SAIC, fixed prev to current year in naming convention
2122
#
2223
#------------------------------------------------------------------------------
2324
"""
@@ -37,13 +38,13 @@
3738
_INPUT_NUMFCSTMONS = 9
3839

3940
# NMME model names
40-
_NMME_MODELS = ["CCM4", "CCSM4", "CFSv2", "GEOSv2", "GFDL", "GNEMO"]
41+
_NMME_MODELS = ["CCM4", "CCSM4", "CFSv2", "GEOSv2", "GFDL", "GNEMO5"]
4142

4243
# Ensemble members per NMME model
4344
_ENSEMBLE_SIZES = {
4445
"CCM4" : 10,
4546
"CCSM4" : 10,
46-
"GNEMO" : 10,
47+
"GNEMO5" : 10,
4748
"GEOSv2" : 10,
4849
"CFSv2" : 24,
4950
"GFDL" : 15,
@@ -53,7 +54,7 @@
5354
_NMME_SCALINGS = {
5455
"CCM4" : "downscale",
5556
"CCSM4" : "downscale",
56-
"GNEMO" : "downscale",
57+
"GNEMO5" : "downscale",
5758
"GEOSv2" : "downscale",
5859
"CFSv2" : "upscale",
5960
"GFDL" : "upscale",
@@ -125,11 +126,10 @@ def _customize_ldt_config(ldtconfig_lsm_target, lsm_rstdir, currentdate,
125126
rst_monname = currentdate.strftime("%b")
126127

127128
output_fname = f"{nmme_model}/LIS_RST_NOAHMP401_{rst_date}2345.ICS_" + \
128-
f"{rst_monname}{prevdate.year:04d}.ens{num_ensmems:d}.nc"
129+
f"{rst_monname}{currentdate.year:04d}.ens{num_ensmems:d}.nc"
129130
lsm_logfile = \
130-
f"{nmme_model}/ldtlog_{_LSM_NAME}_{rst_monname}{prevdate.year:04d}"
131+
f"{nmme_model}/ldtlog_{_LSM_NAME}_{rst_monname}{currentdate.year:04d}"
131132

132-
# mask_parmlogfile = f"{nmme_model}/MaskParamFill.log" %(nmme_model)
133133
mask_parmlogfile = f"{nmme_model}/MaskParamFill.log"
134134

135135
# Now edit the target ldt.config with these customized settings
@@ -199,7 +199,7 @@ def _driver():
199199
nmme_model)
200200

201201
# Run LDT
202-
cmd = f"{_LDT_EXEC} {ldtconfig_lsm_target}"
202+
cmd = f"mpirun -np 1 {_LDT_EXEC} {ldtconfig_lsm_target}"
203203
print(f"[INFO] {cmd}")
204204
subprocess.run(cmd, shell=True, check=True)
205205

@@ -212,7 +212,7 @@ def _driver():
212212
f"{hymap_rstdir}/LIS_RST_HYMAP2_router_{rst_date}2345.d01.nc"
213213
hymap_outrstfile = \
214214
f"./{nmme_model}/LIS_RST_HYMAP2_router_{rst_date}2345.ICS_" + \
215-
f"{rst_monname}{prevdate.year:04d}.ens1.nc"
215+
f"{rst_monname}{currentdate.year:04d}.ens1.nc"
216216
shutil.copy(hymap_inrstfile, hymap_outrstfile)
217217

218218
# Recursively update permissions in work subdirectory

0 commit comments

Comments
 (0)