diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0094ba9d409..7e419dc085d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -173,11 +173,7 @@ ush/interp_atmos_master.sh @aerorahul @WenMeng-NOAA ush/interp_atmos_sflux.sh @aerorahul @WenMeng-NOAA ush/jjob_header.sh ush/link_crtm_fix.sh -ush/load_fv3gfs_modules.sh @aerorahul -ush/load_gw_run_modules.sh @aerorahul @DavidHuber-NOAA -ush/load_gw_gsi_modules.sh @aerorahul @DavidHuber-NOAA @RussTreadon-NOAA -ush/load_ufsda_modules.sh @aerorahul @CoryMartin-NOAA -ush/load_ufswm_modules.sh @aerorahul @JessicaMeixner-NOAA +dev/ush/load_modules.sh @aerorahul @DavidHuber-NOAA @RussTreadon-NOAA @JessicaMeixner-NOAA ush/merge_fv3_aerosol_tile.py ush/minmon_xtrct_*.pl @EdwardSafford-NOAA ush/module-setup.sh @aerorahul diff --git a/.gitignore b/.gitignore index e0e68a8f2ec..b5f61746e94 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ parm/gdas/ioda parm/gdas/marine parm/gdas/snow parm/gdas/soca +parm/gdas/spoc parm/gdas/stat parm/gdas/jcb-gdas parm/gdas/jcb-algorithms @@ -177,7 +178,7 @@ ush/python/ufsda ush/python/soca ush/python/gen_bufr2ioda_json.py ush/python/gen_bufr2ioda_yaml.py -dev/ush/load_fv3gfs_modules.sh +ush/spoc # ush log file ush/fetch-fix-data.log diff --git a/dev/jobs/aeroanlfinal.sh b/dev/jobs/aeroanlfinal.sh index 164d8e4201d..e5e0c3736eb 100755 --- a/dev/jobs/aeroanlfinal.sh +++ b/dev/jobs/aeroanlfinal.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/aeroanlgenb.sh b/dev/jobs/aeroanlgenb.sh index 37f97a02ac4..be57aae5857 100755 --- a/dev/jobs/aeroanlgenb.sh +++ b/dev/jobs/aeroanlgenb.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/aeroanlinit.sh b/dev/jobs/aeroanlinit.sh index cdc5a71a358..eb540376c70 100755 --- a/dev/jobs/aeroanlinit.sh +++ b/dev/jobs/aeroanlinit.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/aeroanlvar.sh b/dev/jobs/aeroanlvar.sh index 636342a3efd..8e17bf41f8e 100755 --- a/dev/jobs/aeroanlvar.sh +++ b/dev/jobs/aeroanlvar.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/aerosol_init.sh b/dev/jobs/aerosol_init.sh index c051c24938b..cfd9d3745aa 100755 --- a/dev/jobs/aerosol_init.sh +++ b/dev/jobs/aerosol_init.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/anal.sh b/dev/jobs/anal.sh index 61fb18e00bb..d854d86fe31 100755 --- a/dev/jobs/anal.sh +++ b/dev/jobs/anal.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/analcalc.sh b/dev/jobs/analcalc.sh index cbf31b4bfa2..7e5549b8395 100755 --- a/dev/jobs/analcalc.sh +++ b/dev/jobs/analcalc.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source GSI workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/analcalc_fv3jedi.sh b/dev/jobs/analcalc_fv3jedi.sh index f82619ea8ce..52bbdf42804 100755 --- a/dev/jobs/analcalc_fv3jedi.sh +++ b/dev/jobs/analcalc_fv3jedi.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? [[ ${status} -ne 0 ]] && exit "${status}" diff --git a/dev/jobs/analdiag.sh b/dev/jobs/analdiag.sh index 311983b323c..2849a41d7e6 100755 --- a/dev/jobs/analdiag.sh +++ b/dev/jobs/analdiag.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/anlstat.sh b/dev/jobs/anlstat.sh index 7cf8e75b900..8b73be1026b 100755 --- a/dev/jobs/anlstat.sh +++ b/dev/jobs/anlstat.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda err=$? if [[ ${err} -ne 0 ]]; then echo "FATAL ERROR Failed to load UFSDA modules!" diff --git a/dev/jobs/arch_tars.sh b/dev/jobs/arch_tars.sh index b288c24fb49..fb8dbdc170a 100755 --- a/dev/jobs/arch_tars.sh +++ b/dev/jobs/arch_tars.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/arch_vrfy.sh b/dev/jobs/arch_vrfy.sh index 85977fb7665..50cb330281b 100755 --- a/dev/jobs/arch_vrfy.sh +++ b/dev/jobs/arch_vrfy.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmanlfinal.sh b/dev/jobs/atmanlfinal.sh index 3d01812c2f6..05202ea5ccf 100755 --- a/dev/jobs/atmanlfinal.sh +++ b/dev/jobs/atmanlfinal.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmanlfv3inc.sh b/dev/jobs/atmanlfv3inc.sh index 280e1270a7b..9d9fac34c55 100755 --- a/dev/jobs/atmanlfv3inc.sh +++ b/dev/jobs/atmanlfv3inc.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmanlinit.sh b/dev/jobs/atmanlinit.sh index 57288430864..1fe059958e0 100755 --- a/dev/jobs/atmanlinit.sh +++ b/dev/jobs/atmanlinit.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmanlvar.sh b/dev/jobs/atmanlvar.sh index 00d6e80c977..4e6156af443 100755 --- a/dev/jobs/atmanlvar.sh +++ b/dev/jobs/atmanlvar.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmensanlfinal.sh b/dev/jobs/atmensanlfinal.sh index df7206ebb29..a127724b24a 100755 --- a/dev/jobs/atmensanlfinal.sh +++ b/dev/jobs/atmensanlfinal.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmensanlfv3inc.sh b/dev/jobs/atmensanlfv3inc.sh index b6f50b32585..9e2cbc7a82e 100755 --- a/dev/jobs/atmensanlfv3inc.sh +++ b/dev/jobs/atmensanlfv3inc.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmensanlinit.sh b/dev/jobs/atmensanlinit.sh index 35b885315ce..e30e96fce31 100755 --- a/dev/jobs/atmensanlinit.sh +++ b/dev/jobs/atmensanlinit.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmensanlletkf.sh b/dev/jobs/atmensanlletkf.sh index 37fe66b2067..53b296235f3 100755 --- a/dev/jobs/atmensanlletkf.sh +++ b/dev/jobs/atmensanlletkf.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmensanlobs.sh b/dev/jobs/atmensanlobs.sh index d8b9f1e1f3d..fa47622c6db 100755 --- a/dev/jobs/atmensanlobs.sh +++ b/dev/jobs/atmensanlobs.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmensanlsol.sh b/dev/jobs/atmensanlsol.sh index 2fbf5ec25b5..0318e2ccdc4 100755 --- a/dev/jobs/atmensanlsol.sh +++ b/dev/jobs/atmensanlsol.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/atmos_ensstat.sh b/dev/jobs/atmos_ensstat.sh index 6083dfe71db..47c355ba497 100755 --- a/dev/jobs/atmos_ensstat.sh +++ b/dev/jobs/atmos_ensstat.sh @@ -8,7 +8,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/atmos_products.sh b/dev/jobs/atmos_products.sh index eca03191dae..145f4c7dead 100755 --- a/dev/jobs/atmos_products.sh +++ b/dev/jobs/atmos_products.sh @@ -8,7 +8,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/awips.sh b/dev/jobs/awips.sh index 1a97b062067..9f9aca44589 100755 --- a/dev/jobs/awips.sh +++ b/dev/jobs/awips.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash set -x -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/awips_20km_1p0deg.sh b/dev/jobs/awips_20km_1p0deg.sh index 69c1b8de62f..c8010b3eb9f 100755 --- a/dev/jobs/awips_20km_1p0deg.sh +++ b/dev/jobs/awips_20km_1p0deg.sh @@ -14,7 +14,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/cleanup.sh b/dev/jobs/cleanup.sh index 15dac1acf52..0cb259555f6 100755 --- a/dev/jobs/cleanup.sh +++ b/dev/jobs/cleanup.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/earc_tars.sh b/dev/jobs/earc_tars.sh index 57b82021b44..16508f162dc 100755 --- a/dev/jobs/earc_tars.sh +++ b/dev/jobs/earc_tars.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/earc_vrfy.sh b/dev/jobs/earc_vrfy.sh index 86696f429e2..1f6b437046c 100755 --- a/dev/jobs/earc_vrfy.sh +++ b/dev/jobs/earc_vrfy.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/ecen.sh b/dev/jobs/ecen.sh index 0883c0cf7e2..b202fdd291e 100755 --- a/dev/jobs/ecen.sh +++ b/dev/jobs/ecen.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/ecen_fv3jedi.sh b/dev/jobs/ecen_fv3jedi.sh index 41b285e4c50..0d3f13c6c57 100755 --- a/dev/jobs/ecen_fv3jedi.sh +++ b/dev/jobs/ecen_fv3jedi.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? [[ ${status} -ne 0 ]] && exit "${status}" diff --git a/dev/jobs/echgres.sh b/dev/jobs/echgres.sh index ba46ae41505..f8532306da7 100755 --- a/dev/jobs/echgres.sh +++ b/dev/jobs/echgres.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/ediag.sh b/dev/jobs/ediag.sh index e859bcd9c0d..df628a147c6 100755 --- a/dev/jobs/ediag.sh +++ b/dev/jobs/ediag.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/eobs.sh b/dev/jobs/eobs.sh index 5aaa2a68a53..5821bf0f186 100755 --- a/dev/jobs/eobs.sh +++ b/dev/jobs/eobs.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/epos.sh b/dev/jobs/epos.sh index 6fed8d250bc..c8a37b858fb 100755 --- a/dev/jobs/epos.sh +++ b/dev/jobs/epos.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source GSI workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/esfc.sh b/dev/jobs/esfc.sh index f1b5ae8e333..756134fb153 100755 --- a/dev/jobs/esfc.sh +++ b/dev/jobs/esfc.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source GSI workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/esnowanl.sh b/dev/jobs/esnowanl.sh index 8f321ed4ef1..7ee1d0f6079 100755 --- a/dev/jobs/esnowanl.sh +++ b/dev/jobs/esnowanl.sh @@ -2,7 +2,7 @@ ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/eupd.sh b/dev/jobs/eupd.sh index bc7191bcb64..a9a992dd529 100755 --- a/dev/jobs/eupd.sh +++ b/dev/jobs/eupd.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/extractvars.sh b/dev/jobs/extractvars.sh index 1f6a046235b..da9194dc152 100755 --- a/dev/jobs/extractvars.sh +++ b/dev/jobs/extractvars.sh @@ -5,7 +5,7 @@ set -x ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/fbwind.sh b/dev/jobs/fbwind.sh index 6cf0bd77e17..2c298b74f51 100755 --- a/dev/jobs/fbwind.sh +++ b/dev/jobs/fbwind.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/fcst.sh b/dev/jobs/fcst.sh index 5aad76a9c75..11de0bd6b68 100755 --- a/dev/jobs/fcst.sh +++ b/dev/jobs/fcst.sh @@ -7,9 +7,9 @@ set -x # TODO clean this up once ncdiag/1.1.2 is installed on WCOSS2 source "${HOMEgfs}/ush/detect_machine.sh" if [[ "${MACHINE_ID}" == "wcoss2" ]]; then - source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" + source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm else - source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" + source "${HOMEgfs}/dev/ush/load_modules.sh" run fi status=$? if [[ ${status} -ne 0 ]]; then diff --git a/dev/jobs/fetch.sh b/dev/jobs/fetch.sh index ef43fca05bd..55a87a01c0d 100755 --- a/dev/jobs/fetch.sh +++ b/dev/jobs/fetch.sh @@ -3,7 +3,7 @@ set -x # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/fit2obs.sh b/dev/jobs/fit2obs.sh index 3358c65c47d..f4471a73069 100755 --- a/dev/jobs/fit2obs.sh +++ b/dev/jobs/fit2obs.sh @@ -5,7 +5,7 @@ set -x ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/gempak.sh b/dev/jobs/gempak.sh index 24e491d2ea8..e58b76ba030 100755 --- a/dev/jobs/gempak.sh +++ b/dev/jobs/gempak.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash set -x -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/gempakgrb2spec.sh b/dev/jobs/gempakgrb2spec.sh index b39cd9e4886..6fad75c1d72 100755 --- a/dev/jobs/gempakgrb2spec.sh +++ b/dev/jobs/gempakgrb2spec.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash set -x -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/gempakmeta.sh b/dev/jobs/gempakmeta.sh index a80208365d7..0619ea02228 100755 --- a/dev/jobs/gempakmeta.sh +++ b/dev/jobs/gempakmeta.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/gempakmetancdc.sh b/dev/jobs/gempakmetancdc.sh index a959b3695c8..7d447bce25d 100755 --- a/dev/jobs/gempakmetancdc.sh +++ b/dev/jobs/gempakmetancdc.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/gempakncdcupapgif.sh b/dev/jobs/gempakncdcupapgif.sh index e31336cdb5f..7f3988ca0bc 100755 --- a/dev/jobs/gempakncdcupapgif.sh +++ b/dev/jobs/gempakncdcupapgif.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/gen_control_ic.sh b/dev/jobs/gen_control_ic.sh index 1e2e173ea8f..0d4bddbc600 100755 --- a/dev/jobs/gen_control_ic.sh +++ b/dev/jobs/gen_control_ic.sh @@ -1,5 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/genesis.sh b/dev/jobs/genesis.sh index 0ac27fae041..0e954ffd897 100755 --- a/dev/jobs/genesis.sh +++ b/dev/jobs/genesis.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? ((status != 0)) && exit "${status}" diff --git a/dev/jobs/genesis_fsu.sh b/dev/jobs/genesis_fsu.sh index e7f54a7cc23..b39eff9d88b 100755 --- a/dev/jobs/genesis_fsu.sh +++ b/dev/jobs/genesis_fsu.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? ((status != 0)) && exit "${status}" diff --git a/dev/jobs/globus_arch.sh b/dev/jobs/globus_arch.sh index 9104a761e8e..9bd32136e45 100755 --- a/dev/jobs/globus_arch.sh +++ b/dev/jobs/globus_arch.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? [[ ${status} -ne 0 ]] && exit "${status}" diff --git a/dev/jobs/globus_earc.sh b/dev/jobs/globus_earc.sh index 2bb6b5dd962..0bb421b41f7 100755 --- a/dev/jobs/globus_earc.sh +++ b/dev/jobs/globus_earc.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}"; fi diff --git a/dev/jobs/marineanlchkpt.sh b/dev/jobs/marineanlchkpt.sh index 770eafdc9e7..3c1de075cae 100755 --- a/dev/jobs/marineanlchkpt.sh +++ b/dev/jobs/marineanlchkpt.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marineanlecen.sh b/dev/jobs/marineanlecen.sh index 506b67b9231..9d1678c9122 100755 --- a/dev/jobs/marineanlecen.sh +++ b/dev/jobs/marineanlecen.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marineanlfinal.sh b/dev/jobs/marineanlfinal.sh index 9d726678665..127f74693fd 100755 --- a/dev/jobs/marineanlfinal.sh +++ b/dev/jobs/marineanlfinal.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marineanlinit.sh b/dev/jobs/marineanlinit.sh index b3f5afea09d..4a5e75db985 100755 --- a/dev/jobs/marineanlinit.sh +++ b/dev/jobs/marineanlinit.sh @@ -5,7 +5,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marineanlletkf.sh b/dev/jobs/marineanlletkf.sh index bb78a2dafd0..51a342d58f0 100755 --- a/dev/jobs/marineanlletkf.sh +++ b/dev/jobs/marineanlletkf.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marineanlvar.sh b/dev/jobs/marineanlvar.sh index 2a2fcbc57a1..ac8d06a4a0c 100755 --- a/dev/jobs/marineanlvar.sh +++ b/dev/jobs/marineanlvar.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marinebmat.sh b/dev/jobs/marinebmat.sh index 8c337b7e591..94d3dd3e9f2 100755 --- a/dev/jobs/marinebmat.sh +++ b/dev/jobs/marinebmat.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/marinebmatinit.sh b/dev/jobs/marinebmatinit.sh index 709517c0406..4cbaff95a8d 100755 --- a/dev/jobs/marinebmatinit.sh +++ b/dev/jobs/marinebmatinit.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/metp.sh b/dev/jobs/metp.sh index 07080d71e1e..d31310ef20c 100755 --- a/dev/jobs/metp.sh +++ b/dev/jobs/metp.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_gw_verif_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" verif status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/npoess.sh b/dev/jobs/npoess.sh index b275c560334..e992dc73a7b 100755 --- a/dev/jobs/npoess.sh +++ b/dev/jobs/npoess.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/oceanice_products.sh b/dev/jobs/oceanice_products.sh index 586c34f5340..a23c70f5113 100755 --- a/dev/jobs/oceanice_products.sh +++ b/dev/jobs/oceanice_products.sh @@ -8,7 +8,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if ((status != 0)); then exit "${status}"; fi diff --git a/dev/jobs/offlineanl.sh b/dev/jobs/offlineanl.sh index b3aba8d3271..26f5576c58d 100755 --- a/dev/jobs/offlineanl.sh +++ b/dev/jobs/offlineanl.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/postsnd.sh b/dev/jobs/postsnd.sh index 6496758f901..a7da693a5a7 100755 --- a/dev/jobs/postsnd.sh +++ b/dev/jobs/postsnd.sh @@ -2,7 +2,7 @@ set -x -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/prep.sh b/dev/jobs/prep.sh index 088ba372793..4ab3c6795ee 100755 --- a/dev/jobs/prep.sh +++ b/dev/jobs/prep.sh @@ -2,7 +2,7 @@ ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then err_exit "${status}" diff --git a/dev/jobs/prep_emissions.sh b/dev/jobs/prep_emissions.sh index 9292fbcf3dd..11bd0799307 100755 --- a/dev/jobs/prep_emissions.sh +++ b/dev/jobs/prep_emissions.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? ((status != 0)) && exit "${status}" diff --git a/dev/jobs/prep_sfc.sh b/dev/jobs/prep_sfc.sh index ade57a937cc..4d4164ca7ad 100755 --- a/dev/jobs/prep_sfc.sh +++ b/dev/jobs/prep_sfc.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/prepatmiodaobs.sh b/dev/jobs/prepatmiodaobs.sh index 13635491f62..4633c81b060 100755 --- a/dev/jobs/prepatmiodaobs.sh +++ b/dev/jobs/prepatmiodaobs.sh @@ -2,7 +2,7 @@ ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/prepobsaero.sh b/dev/jobs/prepobsaero.sh index 00dfd867a07..1996172958f 100755 --- a/dev/jobs/prepobsaero.sh +++ b/dev/jobs/prepobsaero.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/prepoceanobs.sh b/dev/jobs/prepoceanobs.sh index 25fc5a49ef3..38f71e3ee39 100755 --- a/dev/jobs/prepoceanobs.sh +++ b/dev/jobs/prepoceanobs.sh @@ -4,7 +4,7 @@ export STRICT="NO" ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/sfcanl.sh b/dev/jobs/sfcanl.sh index e899c3405ff..0d029f943d2 100755 --- a/dev/jobs/sfcanl.sh +++ b/dev/jobs/sfcanl.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/snowanl.sh b/dev/jobs/snowanl.sh index d123fe9fe82..84b401f7750 100755 --- a/dev/jobs/snowanl.sh +++ b/dev/jobs/snowanl.sh @@ -2,7 +2,7 @@ ############################################################### # Source UFSDA workflow modules -source "${HOMEgfs}/dev/ush/load_ufsda_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufsda status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/stage_ic.sh b/dev/jobs/stage_ic.sh index ae60220ee81..e104d785f9c 100755 --- a/dev/jobs/stage_ic.sh +++ b/dev/jobs/stage_ic.sh @@ -3,7 +3,7 @@ set -x # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/tracker.sh b/dev/jobs/tracker.sh index 457cd187c8a..6062e6086dd 100755 --- a/dev/jobs/tracker.sh +++ b/dev/jobs/tracker.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? ((status != 0)) && exit "${status}" diff --git a/dev/jobs/upp.sh b/dev/jobs/upp.sh index fd5d69e3f64..18bc2799c8d 100755 --- a/dev/jobs/upp.sh +++ b/dev/jobs/upp.sh @@ -9,7 +9,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -#source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run #status=$? #if (( status != 0 )); then exit "${status}"; fi # Temporarily load modules from UPP on WCOSS2 @@ -42,10 +42,10 @@ if [[ "${MACHINE_ID}" == "wcoss2" ]]; then export PYTHONPATH else - source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" + source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then - exit "${status}" + exit "${status}"; fi fi diff --git a/dev/jobs/verfozn.sh b/dev/jobs/verfozn.sh index 493f86537d4..4ae7c594fc2 100755 --- a/dev/jobs/verfozn.sh +++ b/dev/jobs/verfozn.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source GSI workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ status -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/verfrad.sh b/dev/jobs/verfrad.sh index 65e4097d409..815983deb80 100755 --- a/dev/jobs/verfrad.sh +++ b/dev/jobs/verfrad.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source GSI workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ status -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/vminmon.sh b/dev/jobs/vminmon.sh index 1c700dfa4fd..20c4d5dad6b 100755 --- a/dev/jobs/vminmon.sh +++ b/dev/jobs/vminmon.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_gw_gsi_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" gsi status=$? if [[ status -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/wave_stat.sh b/dev/jobs/wave_stat.sh index 42c7f928fc0..abe1ef0a04c 100755 --- a/dev/jobs/wave_stat.sh +++ b/dev/jobs/wave_stat.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash ############################################################### -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm err=$? if [[ "${err}" -ne 0 ]]; then exit "${err}" diff --git a/dev/jobs/wave_stat_pnt.sh b/dev/jobs/wave_stat_pnt.sh index d18414cfe0c..beabf3cd573 100755 --- a/dev/jobs/wave_stat_pnt.sh +++ b/dev/jobs/wave_stat_pnt.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash ############################################################### -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm err=$? if [[ "${err}" -ne 0 ]]; then exit "${err}" diff --git a/dev/jobs/waveawipsbulls.sh b/dev/jobs/waveawipsbulls.sh index 8ab2eeb934f..fb28736b965 100755 --- a/dev/jobs/waveawipsbulls.sh +++ b/dev/jobs/waveawipsbulls.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/waveawipsgridded.sh b/dev/jobs/waveawipsgridded.sh index 6bedd72cd00..9fbfd40a7f4 100755 --- a/dev/jobs/waveawipsgridded.sh +++ b/dev/jobs/waveawipsgridded.sh @@ -4,7 +4,7 @@ set -x ############################################################### # Source FV3GFS workflow modules -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/wavegempak.sh b/dev/jobs/wavegempak.sh index 812a54a4dfe..e9dc4bf7bcd 100755 --- a/dev/jobs/wavegempak.sh +++ b/dev/jobs/wavegempak.sh @@ -3,7 +3,7 @@ set -x ############################################################### -source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" +source "${HOMEgfs}/dev/ush/load_modules.sh" run err=$? if [[ "${err}" -ne 0 ]]; then exit "${err}" diff --git a/dev/jobs/waveinit.sh b/dev/jobs/waveinit.sh index c702a0722fd..c04a50298ec 100755 --- a/dev/jobs/waveinit.sh +++ b/dev/jobs/waveinit.sh @@ -3,8 +3,8 @@ set -x ############################################################### -#source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/jobs/wavepostbndpnt.sh b/dev/jobs/wavepostbndpnt.sh index 8e845ec4752..cc30ce0f268 100755 --- a/dev/jobs/wavepostbndpnt.sh +++ b/dev/jobs/wavepostbndpnt.sh @@ -5,8 +5,8 @@ set -x ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -#source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm err=$? if [[ "${err}" -ne 0 ]]; then exit "${err}" diff --git a/dev/jobs/wavepostbndpntbll.sh b/dev/jobs/wavepostbndpntbll.sh index 492cf7af456..ec9d66c993e 100755 --- a/dev/jobs/wavepostbndpntbll.sh +++ b/dev/jobs/wavepostbndpntbll.sh @@ -5,8 +5,8 @@ set -x ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -#source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm err=$? if [[ "${err}" -ne 0 ]]; then exit "${err}" diff --git a/dev/jobs/wavepostpnt.sh b/dev/jobs/wavepostpnt.sh index 467f4aaddb6..612b39ef959 100755 --- a/dev/jobs/wavepostpnt.sh +++ b/dev/jobs/wavepostpnt.sh @@ -5,8 +5,8 @@ set -x ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -#source ${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm status=$? if [[ "${status}" -ne 0 ]]; then exit "${status}"; fi diff --git a/dev/jobs/wavepostsbs.sh b/dev/jobs/wavepostsbs.sh index dcb79d435fe..678f201b26d 100755 --- a/dev/jobs/wavepostsbs.sh +++ b/dev/jobs/wavepostsbs.sh @@ -4,8 +4,8 @@ set -x ############################################################### # Source FV3GFS workflow modules -#source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm err=$? if [[ "${err}" -ne 0 ]]; then exit "${err}" diff --git a/dev/jobs/waveprep.sh b/dev/jobs/waveprep.sh index 9542e2a94ef..ac2bbbc022a 100755 --- a/dev/jobs/waveprep.sh +++ b/dev/jobs/waveprep.sh @@ -3,8 +3,8 @@ set -x ############################################################### -#source "${HOMEgfs}/dev/ush/load_fv3gfs_modules.sh" -source "${HOMEgfs}/dev/ush/load_ufswm_modules.sh" +#source "${HOMEgfs}/dev/ush/load_modules.sh" run +source "${HOMEgfs}/dev/ush/load_modules.sh" ufswm status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" diff --git a/dev/test/f90nmlcmp.sh b/dev/test/f90nmlcmp.sh index 1b4ad42749b..c437c4db005 100755 --- a/dev/test/f90nmlcmp.sh +++ b/dev/test/f90nmlcmp.sh @@ -8,7 +8,7 @@ set -eu HOMEgfs=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )/../.." && pwd -P) declare -rx HOMEgfs -source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" 1>/dev/null 2>&1 +source "${HOMEgfs}/dev/ush/load_modules.sh" 1>/dev/null 2>&1 file1=${1:?} file2=${2:?} diff --git a/dev/test/g2cmp.sh b/dev/test/g2cmp.sh index b7c21eb6b68..88902f0f977 100755 --- a/dev/test/g2cmp.sh +++ b/dev/test/g2cmp.sh @@ -12,7 +12,7 @@ declare -rx HOMEgfs file1=${1:?} file2=${2:?} -source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" 1>/dev/null 2>&1 +source "${HOMEgfs}/dev/ush/load_modules.sh" 1>/dev/null 2>&1 # Use wgrib2 to compute correlations and print any record that does not have corr=1 for mismatch #shellcheck disable=SC2312 diff --git a/dev/test/nccmp.sh b/dev/test/nccmp.sh index 6ebb073121c..d02f9003719 100755 --- a/dev/test/nccmp.sh +++ b/dev/test/nccmp.sh @@ -6,7 +6,7 @@ set -eu HOMEgfs=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )/../.." && pwd -P) declare -rx HOMEgfs -source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" 1>/dev/null 2>&1 +source "${HOMEgfs}/dev/ush/load_modules.sh" 1>/dev/null 2>&1 module load "nccmp/${nccmp_ver:-"1.9.0.1"}" file1=${1:?} diff --git a/dev/ush/load_gw_gsi_modules.sh b/dev/ush/load_gw_gsi_modules.sh deleted file mode 100755 index 34207cf4eaf..00000000000 --- a/dev/ush/load_gw_gsi_modules.sh +++ /dev/null @@ -1,104 +0,0 @@ -#! /usr/bin/env bash - -############################################################### -if [[ "$-" == *x* ]]; then - set_x=YES -else - set_x=NO -fi - -if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then - echo "Loading modules quietly..." - set +x -fi - -# Setup runtime environment by loading modules -ulimit_s=$( ulimit -S -s ) - -# Test if HOMEgfs is defined. If not, then try to determine it with git rev-parse -_unset_homegfs="NO" -if [[ -z ${HOMEgfs+x} ]]; then - echo "INFO HOMEgfs is not defined. Attempting to find the global-workflow root directory" - # HOMEgfs will be removed from the environment at the end of this script - _unset_homegfs="YES" - - script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - HOMEgfs=$(cd "${script_dir}" && git rev-parse --show-toplevel) - export HOMEgfs - err=$? - if [[ ${err} -ne 0 ]]; then - is_git_dir=$( cd -- "${script_dir}" &> /dev/null && git rev-parse --is-inside-work-tree) - git_stat=$? - if [[ ${git_stat} -ne 0 || ${is_git_dir} != "true" ]]; then - echo "FATAL ERROR unable to determine the root because it is not a git repository." - else - echo "FATAL ERROR unable to determine the root because git rev-parse --show-toplevel failed for an unknown reason" - fi - echo " Unable to load modules. Exiting" - exit 1 - fi -fi - -# Find module command and purge: -source "${HOMEgfs}/ush/detect_machine.sh" -source "${HOMEgfs}/ush/module-setup.sh" - -# Source versions file for runtime -if [[ -f "${HOMEgfs}/versions/run.ver" ]]; then - source "${HOMEgfs}/versions/run.ver" -else - echo "FATAL ERROR ${HOMEgfs}/versions/run.ver does not exist!" - echo "HINT: Run link_workflow.sh first." - exit 1 -fi - -# Load our modules: -module use "${HOMEgfs}/modulefiles" - -case "${MACHINE_ID}" in -"wcoss2") - target_module="gw_gsi.${MACHINE_ID}" - ;; -"hera" | "orion" | "hercules" | "gaeac6" | "ursa" | "noaacloud") - target_module="gw_run.${MACHINE_ID}" - ;; -*) - echo "FATAL ERROR: UNSUPPORTED PLATFORM: '${MACHINE_ID}'" - exit 2 - ;; -esac - -module load "${target_module}" -export err=$? -if [[ ${err} -ne 0 ]]; then - echo "FATAL ERROR: Failed to load ${target_module}" - exit 1 -fi - -module list - -# If this function exists in the environment, run it; else set -x if it was set on entering this script -ftype=$(type -t set_trace || echo "") -if [[ "${ftype}" == "function" ]]; then - set_trace -elif [[ "${set_x}" == "YES" ]]; then - set -x -fi - -# Set up the PYTHONPATH to include wxflow from HOMEgfs -if [[ -d "${HOMEgfs}/sorc/wxflow/src" ]]; then - PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/sorc/wxflow/src" -fi - -# Add HOMEgfs/ush/python to PYTHONPATH -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" -export PYTHONPATH - -# Restore stack soft limit: -ulimit -S -s "${ulimit_s}" -unset ulimit_s - -# Unset HOMEgfs if it was not set at the beginning of this script -if [[ ${_unset_homegfs} == "YES" ]]; then - unset HOMEgfs -fi diff --git a/dev/ush/load_gw_run_modules.sh b/dev/ush/load_gw_run_modules.sh deleted file mode 100755 index 7ca4d2cbb7b..00000000000 --- a/dev/ush/load_gw_run_modules.sh +++ /dev/null @@ -1,99 +0,0 @@ -#! /usr/bin/env bash - -############################################################### -if [[ "$-" == *x* ]]; then - set_x=YES -else - set_x=NO -fi - -if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then - echo "Loading modules quietly..." - set +x -fi - -# Setup runtime environment by loading modules -ulimit_s=$( ulimit -S -s ) - -# Test if HOMEgfs is defined. If not, then try to determine it with git rev-parse -_unset_homegfs="NO" -if [[ -z ${HOMEgfs+x} ]]; then - echo "INFO HOMEgfs is not defined. Attempting to find the global-workflow root directory" - # HOMEgfs will be removed from the environment at the end of this script - _unset_homegfs="YES" - - script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - HOMEgfs=$(cd "${script_dir}" && git rev-parse --show-toplevel) - export HOMEgfs - err=$? - if [[ ${err} -ne 0 ]]; then - is_git_dir=$( cd -- "${script_dir}" &> /dev/null && git rev-parse --is-inside-work-tree) - git_stat=$? - if [[ ${git_stat} -ne 0 || ${is_git_dir} != "true" ]]; then - echo "FATAL ERROR unable to determine the root because it is not a git repository." - else - echo "FATAL ERROR unable to determine the root because git rev-parse --show-toplevel failed for an unknown reason" - fi - echo " Unable to load modules. Exiting" - exit 1 - fi -fi - -# Find module command and purge: -source "${HOMEgfs}/ush/detect_machine.sh" -source "${HOMEgfs}/ush/module-setup.sh" - -# Source versions file for runtime -if [[ -f "${HOMEgfs}/versions/run.ver" ]]; then - source "${HOMEgfs}/versions/run.ver" -else - echo "FATAL ERROR ${HOMEgfs}/versions/run.ver does not exist!" - echo "HINT: Run link_workflow.sh first." - exit 1 -fi - -# Load our modules: -module use "${HOMEgfs}/modulefiles" - -case "${MACHINE_ID}" in -"wcoss2" | "ursa" | "hera" | "orion" | "hercules" | "gaeac5" | "gaeac6" | "noaacloud") - target_module="gw_run.${MACHINE_ID}" - module load "${target_module}" - export err=$? - if [[ ${err} -ne 0 ]]; then - echo "FATAL ERROR: Failed to load ${target_module}" - exit 1 - fi - ;; -*) - echo "WARNING: UNKNOWN PLATFORM" - ;; -esac - -module list - -# If this function exists in the environment, run it; else set -x if it was set on entering this script -ftype=$(type -t set_trace || echo "") -if [[ "${ftype}" == "function" ]]; then - set_trace -elif [[ "${set_x}" == "YES" ]]; then - set -x -fi - -# Set up the PYTHONPATH to include wxflow from HOMEgfs -if [[ -d "${HOMEgfs}/sorc/wxflow/src" ]]; then - PYTHONPATH="${HOMEgfs}/sorc/wxflow/src${PYTHONPATH:+:${PYTHONPATH}}" -fi - -# Add HOMEgfs/ush/python to PYTHONPATH -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" -export PYTHONPATH - -# Restore stack soft limit: -ulimit -S -s "${ulimit_s}" -unset ulimit_s - -# Unset HOMEgfs if it was not set at the beginning of this script -if [[ ${_unset_homegfs} == "YES" ]]; then - unset HOMEgfs -fi diff --git a/dev/ush/load_gw_verif_modules.sh b/dev/ush/load_gw_verif_modules.sh deleted file mode 100755 index f519b4f7fb2..00000000000 --- a/dev/ush/load_gw_verif_modules.sh +++ /dev/null @@ -1,101 +0,0 @@ -#! /usr/bin/env bash - -############################################################### -if [[ "$-" == *x* ]]; then - set_x=YES -else - set_x=NO -fi - -if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then - echo "Loading modules quietly..." - set +x -fi - -# Setup runtime environment by loading modules -ulimit_s=$( ulimit -S -s ) - -# Test if HOMEgfs is defined. If not, then try to determine it with git rev-parse -_unset_homegfs="NO" -if [[ -z ${HOMEgfs+x} ]]; then - echo "INFO HOMEgfs is not defined. Attempting to find the global-workflow root directory" - # HOMEgfs will be removed from the environment at the end of this script - _unset_homegfs="YES" - - script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - HOMEgfs=$(cd "${script_dir}" && git rev-parse --show-toplevel) - export HOMEgfs - err=$? - if [[ ${err} -ne 0 ]]; then - is_git_dir=$( cd -- "${script_dir}" &> /dev/null && git rev-parse --is-inside-work-tree) - git_stat=$? - if [[ ${git_stat} -ne 0 || ${is_git_dir} != "true" ]]; then - echo "FATAL ERROR unable to determine the root because it is not a git repository." - else - echo "FATAL ERROR unable to determine the root because git rev-parse --show-toplevel failed for an unknown reason" - fi - echo " Unable to load modules. Exiting" - exit 1 - fi -fi - -# Find module command and purge: -source "${HOMEgfs}/ush/detect_machine.sh" -source "${HOMEgfs}/ush/module-setup.sh" - -# Source versions file for runtime -if [[ -f "${HOMEgfs}/versions/run.ver" ]]; then - source "${HOMEgfs}/versions/run.ver" -else - echo "FATAL ERROR ${HOMEgfs}/versions/run.ver does not exist!" - echo "HINT: Run link_workflow.sh first." - exit 1 -fi - -# Load our modules: -module use "${HOMEgfs}/modulefiles" - -case "${MACHINE_ID}" in -"wcoss2" | "hera") - target_module="gw_verif.${MACHINE_ID}" - ;; -*) - echo "WARNING: UNKNOWN/UNSUPPORTED PLATFORM: '${MACHINE_ID}'" - target_module="gw_run.${MACHINE_ID}" - ;; -esac - -module load "${target_module}" -export err=$? -if [[ ${err} -ne 0 ]]; then - echo "FATAL ERROR: Failed to load ${target_module}" - exit 1 -fi - -module list - -# If this function exists in the environment, run it; else set -x if it was set on entering this script -ftype=$(type -t set_trace || echo "") -if [[ "${ftype}" == "function" ]]; then - set_trace -elif [[ "${set_x}" == "YES" ]]; then - set -x -fi - -# Set up the PYTHONPATH to include wxflow from HOMEgfs -if [[ -d "${HOMEgfs}/sorc/wxflow/src" ]]; then - PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/sorc/wxflow/src" -fi - -# Add HOMEgfs/ush/python to PYTHONPATH -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" -export PYTHONPATH - -# Restore stack soft limit: -ulimit -S -s "${ulimit_s}" -unset ulimit_s - -# Unset HOMEgfs if it was not set at the beginning of this script -if [[ ${_unset_homegfs} == "YES" ]]; then - unset HOMEgfs -fi diff --git a/dev/ush/load_modules.sh b/dev/ush/load_modules.sh new file mode 100644 index 00000000000..18688211340 --- /dev/null +++ b/dev/ush/load_modules.sh @@ -0,0 +1,228 @@ +#! /usr/bin/env bash + +############################################################### +# Consolidated module loading script for global-workflow +# Usage: source load_modules.sh [module_type] +# where module_type can be: run, gsi, verif, ufsda, ufswm, setup +# Default module_type is 'run' +############################################################### + +if [[ "$-" == *x* ]]; then + set_x=YES +else + set_x=NO +fi + +if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then + echo "Loading modules quietly..." + set +x +fi + +# Parse module type argument +MODULE_TYPE="${1:-run}" + +# For backwards compatibility, handle ufsda options +UFSDA_MODS="GDAS" +if [[ "${MODULE_TYPE}" == "--eva" ]]; then + MODULE_TYPE="ufsda" + UFSDA_MODS="EVA" +elif [[ "${MODULE_TYPE}" == "--gdas" ]]; then + MODULE_TYPE="ufsda" + UFSDA_MODS="GDAS" +fi + +# Setup runtime environment by loading modules +ulimit_s=$(ulimit -S -s) + +# Test if HOMEgfs is defined. If not, then try to determine it with git rev-parse +_unset_homegfs="NO" +if [[ -z ${HOMEgfs+x} ]]; then + echo "INFO: HOMEgfs is not defined. Attempting to find the global-workflow root directory" + # HOMEgfs will be removed from the environment at the end of this script + _unset_homegfs="YES" + + script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + HOMEgfs=$(cd "${script_dir}" && git rev-parse --show-toplevel) + export HOMEgfs + err=$? + if [[ ${err} -ne 0 ]]; then + is_git_dir=$(cd -- "${script_dir}" &> /dev/null && git rev-parse --is-inside-work-tree) + git_stat=$? + if [[ ${git_stat} -ne 0 || ${is_git_dir} != "true" ]]; then + echo "FATAL ERROR: unable to determine the root because it is not a git repository." + else + echo "FATAL ERROR: unable to determine the root because git rev-parse --show-toplevel failed for an unknown reason" + fi + echo "FATAL ERROR: Unable to load modules. Exiting" + exit 1 + fi +fi + +# Find module command and purge: +source "${HOMEgfs}/ush/detect_machine.sh" +source "${HOMEgfs}/ush/module-setup.sh" + +# Handle different module types +case "${MODULE_TYPE}" in + "ufswm") + # UFS Weather Model modules - special handling + module use "${HOMEgfs}/sorc/ufs_model.fd/modulefiles" + module load "ufs_${MACHINE_ID}.intel" + export err=$? + if [[ ${err} -ne 0 ]]; then + echo "FATAL ERROR: Failed to load ufs_${MACHINE_ID}.intel" + exit 1 + fi + module load prod_util + if [[ "${MACHINE_ID}" = "wcoss2" ]]; then + module load cray-pals + module load cfp + module load libjpeg + module load craype-network-ucx + module load cray-mpich-ucx + module load python/3.8.6 + module load wgrib2 + else + export UTILROOT=${prod_util_ROOT} + source "${HOMEgfs}/versions/run.ver" + module load "wgrib2/${wgrib2_ver}" + fi + export WGRIB2=wgrib2 + + module list + unset MACHINE_ID + ;; + + "ufsda") + # UFSDA modules - special handling + module use "${HOMEgfs}/sorc/gdas.cd/modulefiles" + + case "${MACHINE_ID}" in + ("hera" | "orion" | "hercules" | "wcoss2" | "gaeac5" | "gaeac6" | "ursa") + #TODO: Remove LMOD_TMOD_FIND_FIRST line when spack-stack on WCOSS2 + if [[ "${MACHINE_ID}" == "wcoss2" ]]; then + export LMOD_TMOD_FIND_FIRST=yes + # TODO: Add path to GDASApp libraries and cray-mpich as temporary patches + export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${HOMEgfs}/sorc/gdas.cd/build/lib" + # TODO: Remove LD_LIBRARY_PATH line as soon as permanent solution is available + export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/cray/pe/mpich/8.1.29/ofi/intel/2022.1/lib" + fi + module load "${UFSDA_MODS}/${MACHINE_ID}" + export err=$? + if [[ ${err} -ne 0 ]]; then + echo "FATAL ERROR: Failed to load ${UFSDA_MODS}/${MACHINE_ID}" + exit 1 + fi + ncdump=$(command -v ncdump) + NETCDF=$(echo "${ncdump}" | cut -d " " -f 3) + export NETCDF + ;; + ("acorn") + echo WARNING: UFSDA NOT SUPPORTED ON 'acorn' + ;; + *) + echo "WARNING: UNKNOWN PLATFORM" + ;; + esac + + module list + + ftype=$(type -t set_trace || echo "") + if [[ "${ftype}" == "function" ]]; then + set_trace + elif [[ "${set_x}" == "YES" ]]; then + set -x + fi + + pip list + + # Detect the Python major.minor version + _regex="[0-9]+\.[0-9]+" + # shellcheck disable=SC2312 + if [[ $(python --version) =~ ${_regex} ]]; then + export PYTHON_VERSION="${BASH_REMATCH[0]}" + else + echo "FATAL ERROR: Could not detect the python version" + exit 1 + fi + + ############################################################### + # setup python path for ioda utilities + # TODO: a better solution should be created for setting paths to package python scripts + # shellcheck disable=SC2311 + pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python${PYTHON_VERSION}/" + PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:${pyiodaPATH}" + export PYTHONPATH + ;; + + "run" | "gsi" | "verif" | "setup") + # Source versions file for runtime + if [[ -f "${HOMEgfs}/versions/run.ver" ]]; then + source "${HOMEgfs}/versions/run.ver" + else + echo "FATAL ERROR: ${HOMEgfs}/versions/run.ver does not exist!" + echo "HINT: Run link_workflow.sh first." + exit 1 + fi + + # Load our modules: + module use "${HOMEgfs}/modulefiles" + + # Determine target module based on type and machine + target_module="gw_${MODULE_TYPE}.${MACHINE_ID}" + + # Check if the target module file exists, fall back to gw_run if not + if ! module is-avail "${target_module}" 2>/dev/null; then + if [[ "${MODULE_TYPE}" != "run" ]]; then + echo "INFO: ${target_module} module not available, falling back to gw_run.${MACHINE_ID}" + fi + target_module="gw_run.${MACHINE_ID}" + fi + + if [[ -n "${target_module}" ]]; then + module load "${target_module}" + export err=$? + if [[ ${err} -ne 0 ]]; then + echo "FATAL ERROR: Failed to load ${target_module}" + exit 1 + fi + else + echo "FATAL ERROR: Could not determine target module for MODULE_TYPE='${MODULE_TYPE}' and MACHINE_ID='${MACHINE_ID}'" + exit 1 + fi + + module list + + # If this function exists in the environment, run it; else set -x if it was set on entering this script + ftype=$(type -t set_trace || echo "") + if [[ "${ftype}" == "function" ]]; then + set_trace + elif [[ "${set_x}" == "YES" ]]; then + set -x + fi + ;; + + *) + echo "FATAL ERROR: Unknown module type '${MODULE_TYPE}'" + echo "Valid types: run, gsi, verif, ufsda, ufswm, setup" + exit 1 + ;; +esac + +# Set up the PYTHONPATH to include wxflow from HOMEgfs +if [[ -d "${HOMEgfs}/sorc/wxflow/src" ]]; then + PYTHONPATH="${HOMEgfs}/sorc/wxflow/src${PYTHONPATH:+:${PYTHONPATH}}" +fi + +# Add HOMEgfs/ush/python to PYTHONPATH +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" +export PYTHONPATH + +# Restore stack soft limit: +ulimit -S -s "${ulimit_s}" +unset ulimit_s + +# Unset HOMEgfs if it was not set at the beginning of this script +if [[ ${_unset_homegfs} == "YES" ]]; then + unset HOMEgfs +fi diff --git a/dev/ush/load_ufsda_modules.sh b/dev/ush/load_ufsda_modules.sh deleted file mode 100755 index 63314002c46..00000000000 --- a/dev/ush/load_ufsda_modules.sh +++ /dev/null @@ -1,110 +0,0 @@ -#! /usr/bin/env bash - -############################################################### -if [[ "$-" == *x* ]]; then - set_x=YES -else - set_x=NO -fi - -if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then - echo "Loading modules quietly..." - set +x -fi - -# Read optional module argument, default is to use GDAS -MODS="GDAS" -if [[ $# -gt 0 ]]; then - case "$1" in - --eva) - MODS="EVA" - ;; - --gdas) - MODS="GDAS" - ;; - *) - echo "Invalid option: $1" >&2 - exit 1 - ;; - esac -fi - -# Setup runtime environment by loading modules -ulimit_s=$(ulimit -S -s) - -# Find module command and purge: -source "${HOMEgfs}/ush/detect_machine.sh" -source "${HOMEgfs}/ush/module-setup.sh" - -# Load our modules: -module use "${HOMEgfs}/sorc/gdas.cd/modulefiles" - -case "${MACHINE_ID}" in - ("hera" | "orion" | "hercules" | "wcoss2" | "gaeac5" | "gaeac6" | "ursa") - #TODO: Remove LMOD_TMOD_FIND_FIRST line when spack-stack on WCOSS2 - if [[ "${MACHINE_ID}" == "wcoss2" ]]; then - export LMOD_TMOD_FIND_FIRST=yes - # TODO: Add path to GDASApp libraries and cray-mpich as temporary patches - export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${HOMEgfs}/sorc/gdas.cd/build/lib" - # TODO: Remove LD_LIBRARY_PATH line as soon as permanent solution is available - export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/cray/pe/mpich/8.1.29/ofi/intel/2022.1/lib" - fi - module load "${MODS}/${MACHINE_ID}" - export err=$? - if [[ ${err} -ne 0 ]]; then - echo "FATAL ERROR: Failed to load ${MODS}/${MACHINE_ID}" - exit 1 - fi - ncdump=$( command -v ncdump ) - NETCDF=$( echo "${ncdump}" | cut -d " " -f 3 ) - export NETCDF - ;; - ("acorn") - echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM - ;; - *) - echo "WARNING: UNKNOWN PLATFORM" - ;; -esac - -module list - -ftype=$(type -t set_trace || echo "") -if [[ "${ftype}" == "function" ]]; then - set_trace -elif [[ "${set_x}" == "YES" ]]; then - set -x -fi - -pip list - -# Set up the PYTHONPATH to include wxflow from HOMEgfs -if [[ -d "${HOMEgfs}/sorc/wxflow/src" ]]; then - PYTHONPATH="${HOMEgfs}/sorc/wxflow/src${PYTHONPATH:+:${PYTHONPATH}}" -fi - -# Add HOMEgfs/ush/python to PYTHONPATH -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" -export PYTHONPATH - -# Detect the Python major.minor version -_regex="[0-9]+\.[0-9]+" -# shellcheck disable=SC2312 -if [[ $(python --version) =~ ${_regex} ]]; then - export PYTHON_VERSION="${BASH_REMATCH[0]}" -else - echo "FATAL ERROR: Could not detect the python version" - exit 1 -fi - -############################################################### -# setup python path for ioda utilities -# TODO: a better solution should be created for setting paths to package python scripts -# shellcheck disable=SC2311 -pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python${PYTHON_VERSION}/" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:${pyiodaPATH}" -export PYTHONPATH - -# Restore stack soft limit: -ulimit -S -s "${ulimit_s}" -unset ulimit_s diff --git a/dev/ush/load_ufswm_modules.sh b/dev/ush/load_ufswm_modules.sh deleted file mode 100755 index c913d10b0db..00000000000 --- a/dev/ush/load_ufswm_modules.sh +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/env bash - -############################################################### -if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then - echo "Loading modules quietly..." - set +x -fi - -# Setup runtime environment by loading modules -ulimit_s=$(ulimit -S -s) - -source "${HOMEgfs}/ush/detect_machine.sh" -source "${HOMEgfs}/ush/module-setup.sh" - -module use "${HOMEgfs}/sorc/ufs_model.fd/modulefiles" -module load "ufs_${MACHINE_ID}.intel" -export err=$? -if [[ ${err} -ne 0 ]]; then - echo "FATAL ERROR: Failed to load ufs_${MACHINE_ID}.intel" - exit 1 -fi -module load prod_util -if [[ "${MACHINE_ID}" = "wcoss2" ]]; then - module load cray-pals - module load cfp - module load libjpeg - module load craype-network-ucx - module load cray-mpich-ucx - module load python/3.8.6 - module load wgrib2 -else - export UTILROOT=${prod_util_ROOT} - source "${HOMEgfs}/versions/run.ver" - module load "wgrib2/${wgrib2_ver}" -fi -export WGRIB2=wgrib2 - -module list -unset MACHINE_ID - -# Set up the PYTHONPATH to include wxflow from HOMEgfs -if [[ -d "${HOMEgfs}/sorc/wxflow/src" ]]; then - PYTHONPATH="${HOMEgfs}/sorc/wxflow/src${PYTHONPATH:+:${PYTHONPATH}}" -fi - -# Add HOMEgfs/ush/python to PYTHONPATH -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" -export PYTHONPATH - -# Restore stack soft limit: -ulimit -S -s "${ulimit_s}" -unset ulimit_s - -# If this function exists in the environment, run it; else do not -ftype=$(type -t set_trace || echo "") -if [[ "${ftype}" == "function" ]]; then - set_trace -fi diff --git a/modulefiles/gw_run.gaeac6.lua b/modulefiles/gw_run.gaeac6.lua index b509ba83997..fe51631618b 100644 --- a/modulefiles/gw_run.gaeac6.lua +++ b/modulefiles/gw_run.gaeac6.lua @@ -3,11 +3,11 @@ Load environment to run GFS on Gaea C6 ]]) -- Test that HOMEgfs is set. --- If not, load_gw_run_modules.sh was not sourced to load this module. +-- If not, load_modules.sh was not sourced to load this module. local homegfssdir=os.getenv("HOMEgfs") or "None" if (homegfssdir == "None") then LmodError("FATAL ERROR HOMEgfs variable is unset.\n" .. - "Please \"source ush/load_gw_run_modules.sh\" rather than loading this module directly.\n") + "Please \"source dev/ush/load_modules.sh\" rather than loading this module directly.\n") end load("gw_run.common") diff --git a/modulefiles/gw_run.hera.lua b/modulefiles/gw_run.hera.lua index d88f3364879..a352034fb0d 100644 --- a/modulefiles/gw_run.hera.lua +++ b/modulefiles/gw_run.hera.lua @@ -3,11 +3,11 @@ Load environment to run GFS on Hera ]]) -- Test that HOMEgfs is set. --- If not, load_gw_run_modules.sh was not sourced to load this module. +-- If not, load_modules.sh was not sourced to load this module. local homegfssdir=os.getenv("HOMEgfs") or "None" if (homegfssdir == "None") then LmodError("FATAL ERROR HOMEgfs variable is unset.\n" .. - "Please \"source ush/load_gw_run_modules.sh\" rather than loading this module directly.\n") + "Please \"source dev/ush/load_modules.sh\" rather than loading this module directly.\n") end load("gw_run.common") diff --git a/modulefiles/gw_run.hercules.lua b/modulefiles/gw_run.hercules.lua index 8400b523344..5744800ddfd 100644 --- a/modulefiles/gw_run.hercules.lua +++ b/modulefiles/gw_run.hercules.lua @@ -3,11 +3,11 @@ Load environment to run GFS on Hercules ]]) -- Test that HOMEgfs is set. --- If not, load_gw_run_modules.sh was not sourced to load this module. +-- If not, load_modules.sh was not sourced to load this module. local homegfssdir=os.getenv("HOMEgfs") or "None" if (homegfssdir == "None") then LmodError("FATAL ERROR HOMEgfs variable is unset.\n" .. - "Please \"source ush/load_gw_run_modules.sh\" rather than loading this module directly.\n") + "Please \"source dev/ush/load_modules.sh\" rather than loading this module directly.\n") end load("gw_run.common") diff --git a/modulefiles/gw_run.noaacloud.lua b/modulefiles/gw_run.noaacloud.lua index 74a1c3e4f90..46ece7b9c68 100644 --- a/modulefiles/gw_run.noaacloud.lua +++ b/modulefiles/gw_run.noaacloud.lua @@ -3,11 +3,11 @@ Load environment to run GFS on NOAA cloud ]]) -- Test that HOMEgfs is set. --- If not, load_gw_run_modules.sh was not sourced to load this module. +-- If not, load_modules.sh was not sourced to load this module. local homegfssdir=os.getenv("HOMEgfs") or "None" if (homegfssdir == "None") then LmodError("FATAL ERROR HOMEgfs variable is unset.\n" .. - "Please \"source ush/load_gw_run_modules.sh\" rather than loading this module directly.\n") + "Please \"source dev/ush/load_modules.sh\" rather than loading this module directly.\n") end load(pathJoin("perl", (os.getenv("perl_ver") or "None"))) diff --git a/modulefiles/gw_run.orion.lua b/modulefiles/gw_run.orion.lua index 6adbdbef66c..0b52088f573 100644 --- a/modulefiles/gw_run.orion.lua +++ b/modulefiles/gw_run.orion.lua @@ -3,11 +3,11 @@ Load environment to run GFS on Orion ]]) -- Test that HOMEgfs is set. --- If not, load_gw_run_modules.sh was not sourced to load this module. +-- If not, load_modules.sh was not sourced to load this module. local homegfssdir=os.getenv("HOMEgfs") or "None" if (homegfssdir == "None") then LmodError("FATAL ERROR HOMEgfs variable is unset.\n" .. - "Please \"source ush/load_gw_run_modules.sh\" rather than loading this module directly.\n") + "Please \"source dev/ush/load_modules.sh\" rather than loading this module directly.\n") end load("gw_run.common") diff --git a/modulefiles/gw_run.ursa.lua b/modulefiles/gw_run.ursa.lua index 1fcb7e639ec..23895d43ee8 100644 --- a/modulefiles/gw_run.ursa.lua +++ b/modulefiles/gw_run.ursa.lua @@ -3,11 +3,11 @@ Load environment to run GFS on Ursa ]]) -- Test that HOMEgfs is set. --- If not, load_gw_run_modules.sh was not sourced to load this module. +-- If not, load_modules.sh was not sourced to load this module. local homegfssdir=os.getenv("HOMEgfs") or "None" if (homegfssdir == "None") then LmodError("FATAL ERROR HOMEgfs variable is unset.\n" .. - "Please \"source ush/load_gw_run_modules.sh\" rather than loading this module directly.\n") + "Please \"source dev/ush/load_modules.sh\" rather than loading this module directly.\n") end load("gw_run.common") diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 0d6eed92442..109fc346810 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -196,11 +196,6 @@ if [[ -s "atparse.bash" ]]; then fi ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/atparse.bash" . -# Temporarilly link load_gw_run_modules.sh to load_fv3gfs_modules.sh -# TODO: Use load_gw_run_modules.sh everywhere -cd "${HOMEgfs}/dev/ush" || exit 1 -${LINK_OR_COPY} "${HOMEgfs}/dev/ush/load_gw_run_modules.sh" load_fv3gfs_modules.sh - # add ufs_utils parm dir if [[ -d "${HOMEgfs}/sorc/ufs_utils.fd" ]]; then cd "${HOMEgfs}/parm" || exit 1