From aa0a2e7b3ebc17ff67ceade2c96193ca7d11e7c8 Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 3 Apr 2025 14:49:42 -0400 Subject: [PATCH 1/9] Merge err_chk forecast branch --- jobs/JGDAS_AERO_ANALYSIS_GENERATE_BMATRIX | 1 - jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 1 - jobs/JGDAS_ATMOS_CHGRES_FORENKF | 1 - jobs/JGDAS_ATMOS_GEMPAK | 1 - jobs/JGDAS_ATMOS_GEMPAK_META_NCDC | 1 - jobs/JGDAS_ATMOS_VERFOZN | 1 - jobs/JGDAS_ATMOS_VERFRAD | 1 - jobs/JGDAS_ENKF_DIAG | 1 - jobs/JGDAS_ENKF_ECEN | 1 - jobs/JGDAS_ENKF_ECEN_FV3JEDI | 1 - jobs/JGDAS_ENKF_POST | 1 - jobs/JGDAS_ENKF_SELECT_OBS | 1 - jobs/JGDAS_ENKF_SFC | 1 - jobs/JGDAS_ENKF_UPDATE | 1 - jobs/JGDAS_FIT2OBS | 1 - jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_ECEN | 1 - jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG | 1 - jobs/JGFS_ATMOS_CYCLONE_GENESIS | 7 +- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 1 - jobs/JGFS_ATMOS_FBWIND | 1 - jobs/JGFS_ATMOS_FSU_GENESIS | 1 - jobs/JGFS_ATMOS_GEMPAK | 1 - jobs/JGFS_ATMOS_GEMPAK_META | 1 - jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF | 1 - jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC | 1 - jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS | 1 - jobs/JGFS_ATMOS_POSTSND | 1 - jobs/JGFS_ATMOS_VERIFICATION | 7 +- jobs/JGLOBAL_AERO_ANALYSIS_FINALIZE | 1 - jobs/JGLOBAL_AERO_ANALYSIS_INITIALIZE | 1 - jobs/JGLOBAL_AERO_ANALYSIS_VARIATIONAL | 1 - jobs/JGLOBAL_ARCHIVE_TARS | 8 +- jobs/JGLOBAL_ARCHIVE_VRFY | 1 - jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE | 1 - jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT | 1 - jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE | 1 - jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF | 1 - jobs/JGLOBAL_ATMENS_ANALYSIS_OBS | 1 - jobs/JGLOBAL_ATMENS_ANALYSIS_SOL | 1 - jobs/JGLOBAL_ATMOS_ANALYSIS | 1 - jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 1 - jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI | 1 - jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP | 1 - jobs/JGLOBAL_ATMOS_ENSSTAT | 1 - jobs/JGLOBAL_ATMOS_POST_MANAGER | 1 - jobs/JGLOBAL_ATMOS_PRODUCTS | 1 - jobs/JGLOBAL_ATMOS_SFCANL | 1 - jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 1 - jobs/JGLOBAL_ATMOS_UPP | 1 - jobs/JGLOBAL_ATMOS_VMINMON | 1 - jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE | 1 - jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT | 1 - jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE | 1 - jobs/JGLOBAL_ATM_ANALYSIS_VARIATIONAL | 1 - jobs/JGLOBAL_ATM_PREP_IODA_OBS | 1 - jobs/JGLOBAL_CLEANUP | 1 - jobs/JGLOBAL_ENS_ARCHIVE_TARS | 9 +- jobs/JGLOBAL_ENS_ARCHIVE_VRFY | 1 - jobs/JGLOBAL_ENS_GLOBUS_ARCH | 1 - jobs/JGLOBAL_EXTRACTVARS | 1 - jobs/JGLOBAL_FETCH | 1 - jobs/JGLOBAL_FORECAST | 9 +- jobs/JGLOBAL_GLOBUS_ARCH | 1 - jobs/JGLOBAL_MARINE_ANALYSIS_CHECKPOINT | 1 - jobs/JGLOBAL_MARINE_ANALYSIS_FINALIZE | 1 - jobs/JGLOBAL_MARINE_ANALYSIS_INITIALIZE | 1 - jobs/JGLOBAL_MARINE_ANALYSIS_LETKF | 1 - jobs/JGLOBAL_MARINE_ANALYSIS_VARIATIONAL | 1 - jobs/JGLOBAL_MARINE_BMAT | 1 - jobs/JGLOBAL_OCEANICE_PRODUCTS | 1 - jobs/JGLOBAL_PREP_EMISSIONS | 1 - jobs/JGLOBAL_PREP_OBS_AERO | 1 - jobs/JGLOBAL_PREP_OCEAN_OBS | 1 - jobs/JGLOBAL_SNOWENS_ANALYSIS | 1 - jobs/JGLOBAL_SNOW_ANALYSIS | 1 - jobs/JGLOBAL_STAGE_IC | 1 - jobs/JGLOBAL_WAVE_GEMPAK | 1 - jobs/JGLOBAL_WAVE_INIT | 1 - jobs/JGLOBAL_WAVE_POST_BNDPNT | 1 - jobs/JGLOBAL_WAVE_POST_BNDPNTBLL | 1 - jobs/JGLOBAL_WAVE_POST_PNT | 1 - jobs/JGLOBAL_WAVE_POST_SBS | 1 - jobs/JGLOBAL_WAVE_PRDGEN_BULLS | 1 - jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED | 1 - jobs/JGLOBAL_WAVE_PREP | 1 - jobs/rocoto/aeroanlfinal.sh | 2 +- jobs/rocoto/aeroanlgenb.sh | 2 +- jobs/rocoto/aeroanlinit.sh | 2 +- jobs/rocoto/aeroanlvar.sh | 2 +- jobs/rocoto/aerosol_init.sh | 6 +- jobs/rocoto/anal.sh | 2 +- jobs/rocoto/analcalc.sh | 2 +- jobs/rocoto/analcalc_fv3jedi.sh | 2 +- jobs/rocoto/analdiag.sh | 2 +- jobs/rocoto/arch_tars.sh | 2 +- jobs/rocoto/arch_vrfy.sh | 2 +- jobs/rocoto/atmanlfinal.sh | 2 +- jobs/rocoto/atmanlfv3inc.sh | 2 +- jobs/rocoto/atmanlinit.sh | 2 +- jobs/rocoto/atmanlvar.sh | 2 +- jobs/rocoto/atmensanlfinal.sh | 2 +- jobs/rocoto/atmensanlfv3inc.sh | 2 +- jobs/rocoto/atmensanlinit.sh | 2 +- jobs/rocoto/atmensanlletkf.sh | 2 +- jobs/rocoto/atmensanlobs.sh | 2 +- jobs/rocoto/atmensanlsol.sh | 2 +- jobs/rocoto/atmos_ensstat.sh | 2 +- jobs/rocoto/atmos_products.sh | 2 +- jobs/rocoto/awips_20km_1p0deg.sh | 2 +- jobs/rocoto/cleanup.sh | 2 +- jobs/rocoto/earc_tars.sh | 2 +- jobs/rocoto/earc_vrfy.sh | 2 +- jobs/rocoto/ecen.sh | 2 +- jobs/rocoto/ecen_fv3jedi.sh | 2 +- jobs/rocoto/echgres.sh | 2 +- jobs/rocoto/ediag.sh | 2 +- jobs/rocoto/eobs.sh | 2 +- jobs/rocoto/epos.sh | 2 +- jobs/rocoto/esfc.sh | 2 +- jobs/rocoto/eupd.sh | 2 +- jobs/rocoto/extractvars.sh | 2 +- jobs/rocoto/fbwind.sh | 2 +- jobs/rocoto/fcst.sh | 2 +- jobs/rocoto/fetch.sh | 2 +- jobs/rocoto/fit2obs.sh | 2 +- jobs/rocoto/gempak.sh | 2 +- jobs/rocoto/gempakgrb2spec.sh | 2 +- jobs/rocoto/gempakmeta.sh | 2 +- jobs/rocoto/gempakmetancdc.sh | 2 +- jobs/rocoto/gempakncdcupapgif.sh | 2 +- jobs/rocoto/genesis.sh | 2 +- jobs/rocoto/genesis_fsu.sh | 2 +- jobs/rocoto/globus_arch.sh | 2 +- jobs/rocoto/globus_earc.sh | 2 +- jobs/rocoto/marineanlchkpt.sh | 2 +- jobs/rocoto/marineanlfinal.sh | 2 +- jobs/rocoto/marineanlinit.sh | 2 +- jobs/rocoto/marineanlletkf.sh | 2 +- jobs/rocoto/marineanlvar.sh | 2 +- jobs/rocoto/marinebmat.sh | 2 +- jobs/rocoto/metp.sh | 2 +- jobs/rocoto/mos_ext_grd_fcst.sh | 2 +- jobs/rocoto/mos_ext_grd_prdgen.sh | 2 +- jobs/rocoto/mos_ext_grd_prep.sh | 2 +- jobs/rocoto/mos_ext_stn_fcst.sh | 2 +- jobs/rocoto/mos_ext_stn_prdgen.sh | 2 +- jobs/rocoto/mos_ext_stn_prep.sh | 2 +- jobs/rocoto/mos_grd_fcst.sh | 2 +- jobs/rocoto/mos_grd_prdgen.sh | 2 +- jobs/rocoto/mos_grd_prep.sh | 2 +- jobs/rocoto/mos_stn_fcst.sh | 2 +- jobs/rocoto/mos_stn_prdgen.sh | 2 +- jobs/rocoto/mos_stn_prep.sh | 2 +- jobs/rocoto/mos_wx_ext_prdgen.sh | 2 +- jobs/rocoto/mos_wx_prdgen.sh | 2 +- jobs/rocoto/npoess.sh | 2 +- jobs/rocoto/oceanice_products.sh | 2 +- jobs/rocoto/ocnanalecen.sh | 2 +- jobs/rocoto/postsnd.sh | 2 +- jobs/rocoto/prep.sh | 14 +-- jobs/rocoto/prep_emissions.sh | 2 +- jobs/rocoto/prepobsaero.sh | 2 +- jobs/rocoto/sfcanl.sh | 2 +- jobs/rocoto/stage_ic.sh | 2 +- jobs/rocoto/tracker.sh | 2 +- jobs/rocoto/upp.sh | 4 +- jobs/rocoto/verfozn.sh | 2 +- jobs/rocoto/verfrad.sh | 2 +- jobs/rocoto/vminmon.sh | 2 +- jobs/rocoto/waveawipsbulls.sh | 6 +- jobs/rocoto/waveawipsgridded.sh | 2 +- jobs/rocoto/wavegempak.sh | 2 +- jobs/rocoto/waveinit.sh | 2 +- jobs/rocoto/wavepostbndpnt.sh | 2 +- jobs/rocoto/wavepostbndpntbll.sh | 2 +- jobs/rocoto/wavepostpnt.sh | 2 +- jobs/rocoto/wavepostsbs.sh | 2 +- jobs/rocoto/waveprep.sh | 2 +- scripts/exgdas_atmos_chgres_forenkf.sh | 2 - scripts/exgdas_atmos_gempak_gif_ncdc.sh | 2 - scripts/exgdas_atmos_nawips.sh | 2 - scripts/exgdas_atmos_verfozn.sh | 2 - scripts/exgdas_atmos_verfrad.sh | 2 - scripts/exgdas_enkf_ecen.sh | 2 - scripts/exgdas_enkf_post.sh | 2 - scripts/exgdas_enkf_select_obs.sh | 2 - scripts/exgdas_enkf_sfc.sh | 2 - scripts/exgdas_enkf_update.sh | 2 - scripts/exgfs_atmos_awips_20km_1p0deg.sh | 2 - scripts/exgfs_atmos_fbwind.sh | 2 - scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh | 2 - scripts/exgfs_atmos_gempak_meta.sh | 2 - scripts/exgfs_atmos_goes_nawips.sh | 2 - scripts/exgfs_atmos_grib2_special_npoess.sh | 2 - scripts/exgfs_atmos_nawips.sh | 2 - scripts/exgfs_atmos_postsnd.sh | 2 - scripts/exgfs_pmgr.sh | 2 - scripts/exgfs_prdgen_manager.sh | 2 - scripts/exgfs_wave_init.sh | 2 - scripts/exgfs_wave_nawips.sh | 1 - scripts/exgfs_wave_post_gridded_sbs.sh | 1 - scripts/exgfs_wave_post_pnt.sh | 2 - scripts/exgfs_wave_prdgen_bulls.sh | 2 - scripts/exgfs_wave_prdgen_gridded.sh | 1 - scripts/exgfs_wave_prep.sh | 2 - scripts/exglobal_atmos_analysis.sh | 2 - scripts/exglobal_atmos_analysis_calc.sh | 2 - scripts/exglobal_atmos_ensstat.sh | 2 - scripts/exglobal_atmos_pmgr.sh | 2 - scripts/exglobal_atmos_products.sh | 2 - scripts/exglobal_atmos_sfcanl.sh | 2 - scripts/exglobal_atmos_tropcy_qc_reloc.sh | 2 - scripts/exglobal_atmos_vminmon.sh | 2 - scripts/exglobal_cleanup.sh | 2 - scripts/exglobal_diag.sh | 2 - scripts/exglobal_extractvars.sh | 3 +- scripts/exglobal_forecast.sh | 9 +- ush/atmos_ensstat.sh | 2 - ush/atmos_extractvars.sh | 2 - ush/bash_utils.sh | 2 +- ush/forecast_postdet.sh | 47 +++------ ush/forecast_predet.sh | 28 +++--- ush/gaussian_sfcanl.sh | 2 - ush/getdump.sh | 2 - ush/getges.sh | 2 - ush/gfs_bfr2gpk.sh | 1 - ush/gfs_bufr.sh | 2 - ush/gfs_bufr_netcdf.sh | 1 - ush/gfs_sndp.sh | 2 - ush/gfs_truncate_enkf.sh | 2 - ush/global_savefits.sh | 1 - ush/interp_atmos_master.sh | 2 - ush/interp_atmos_sflux.sh | 2 - ush/jjob_header.sh | 45 +++++---- ush/link_crtm_fix.sh | 2 - ush/load_fv3gfs_modules.sh | 20 ++-- ush/load_ufsda_modules.sh | 16 +++- ush/make_tif.sh | 2 - ush/month_name.sh | 1 - ush/ocnice_extractvars.sh | 2 - ush/ozn_xtrct.sh | 2 - ush/preamble.sh | 96 ++++++++++++++++--- ush/radmon_diag_ck.sh | 2 +- ush/radmon_err_rpt.sh | 2 - ush/radmon_verf_angle.sh | 2 - ush/radmon_verf_bcoef.sh | 2 - ush/radmon_verf_bcor.sh | 2 - ush/radmon_verf_time.sh | 2 - ush/regrid_gsiSfcIncr_to_tile.sh | 2 - ush/rstprod.sh | 2 - ush/syndat_getjtbul.sh | 2 - ush/syndat_qctropcy.sh | 2 - ush/tropcy_relocate.sh | 2 - ush/tropcy_relocate_extrkr.sh | 2 - ush/wave_extractvars.sh | 1 - ush/wave_grib2_sbs.sh | 1 - ush/wave_grid_interp_sbs.sh | 2 +- ush/wave_grid_moddef.sh | 2 - ush/wave_outp_cat.sh | 2 - ush/wave_outp_spec.sh | 2 - ush/wave_prnc_cur.sh | 2 - ush/wave_prnc_ice.sh | 2 - ush/wave_tar.sh | 2 - 263 files changed, 293 insertions(+), 444 deletions(-) diff --git a/jobs/JGDAS_AERO_ANALYSIS_GENERATE_BMATRIX b/jobs/JGDAS_AERO_ANALYSIS_GENERATE_BMATRIX index 257d498bb6c..036a75e44c3 100755 --- a/jobs/JGDAS_AERO_ANALYSIS_GENERATE_BMATRIX +++ b/jobs/JGDAS_AERO_ANALYSIS_GENERATE_BMATRIX @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "aeroanlgenb" -c "base aeroanl aeroanlgenb" ############################################## diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index c9000de2634..2733c30ce6b 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal analdiag" diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 1a1b90230f9..4e028420894 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal echgres" diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index f5c00b9c989..4d6fdf4a23a 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak" -c "base gempak" ############################################ diff --git a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC index 1a31e077f90..89a4856fde4 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC +++ b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC @@ -4,7 +4,6 @@ # GDAS GEMPAK META NCDC PRODUCT GENERATION ############################################ -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak_meta" -c "base gempak" # Now set up GEMPAK/NTRANS environment diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index 95b05da989a..0a9b92eaefe 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -3,7 +3,6 @@ ############################################################# # Set up environment for GDAS Ozone Monitor job ############################################################# -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "verfozn" -c "base verfozn" ############################################# diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index 03c42a825ee..ac18460a193 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -3,7 +3,6 @@ ############################################################# # Set up environment for GDAS Radiance Monitor job ############################################################# -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "verfrad" -c "base verfrad" ############################################# diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index bef4d6d297c..aa3eb1ddfea 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "eobs" -c "base anal eobs analdiag ediag" diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 0c79f9b6e9c..b3f5c03203b 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "ecen" -c "base ecen" diff --git a/jobs/JGDAS_ENKF_ECEN_FV3JEDI b/jobs/JGDAS_ENKF_ECEN_FV3JEDI index ee9fdb002e0..c4e9473bb60 100755 --- a/jobs/JGDAS_ENKF_ECEN_FV3JEDI +++ b/jobs/JGDAS_ENKF_ECEN_FV3JEDI @@ -3,7 +3,6 @@ # Ignore possible spelling error (nothing is misspelled) # shellcheck disable=SC2153 -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "ecen_fv3jedi" -c "base ecen_fv3jedi" ############################################## diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index bcd18287893..244566ac5b3 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "epos" -c "base epos" diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 39119712183..aa82d53eae5 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "eobs" -c "base anal eobs" diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index 17a9655774d..f0ddc93429e 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "esfc" -c "base esfc" diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index c1285a55092..24faf5469fb 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "eupd" -c "base anal eupd" diff --git a/jobs/JGDAS_FIT2OBS b/jobs/JGDAS_FIT2OBS index 049cbc68611..7b5395fb87a 100755 --- a/jobs/JGDAS_FIT2OBS +++ b/jobs/JGDAS_FIT2OBS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "fit2obs" -c "base fit2obs" diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_ECEN b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_ECEN index 351a88ae931..9e7a7bfc113 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_ECEN +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_ECEN @@ -1,5 +1,4 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATA="${DATAjob}/${jobid}" diff --git a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG index 25641ea2868..3a1cbac120f 100755 --- a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG +++ b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "awips" -c "base awips" export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} diff --git a/jobs/JGFS_ATMOS_CYCLONE_GENESIS b/jobs/JGFS_ATMOS_CYCLONE_GENESIS index 690c174cf79..45f7234b7df 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_GENESIS +++ b/jobs/JGFS_ATMOS_CYCLONE_GENESIS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "genesis" -c "base genesis" ############################################## @@ -49,9 +48,13 @@ export JYYYY=${PDY:0:4} # Run relevant script ############################################## -${SCRIPTens_tracker}/exgfs_tc_genesis.sh +# Do not fail on errors or unassigned variables in external code +set +eu +${SCRIPTens_tracker}/exgfs_tc_genesis.sh && true export err=$?; err_chk +set_strict + ############################################## # Final processing ############################################## diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index 509e48bf5fd..b66a3249d3a 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "tracker" -c "base tracker" export COMPONENT="atmos" diff --git a/jobs/JGFS_ATMOS_FBWIND b/jobs/JGFS_ATMOS_FBWIND index 2071954b0d5..dfd91ad24a9 100755 --- a/jobs/JGFS_ATMOS_FBWIND +++ b/jobs/JGFS_ATMOS_FBWIND @@ -5,7 +5,6 @@ ############################################ # GFS FBWIND PRODUCT GENERATION ############################################ -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "fbwind" -c "base fbwind" ################################### diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index 4b8d67d4c10..689c4014de7 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "genesis_fsu" -c "base genesis_fsu" # Hack to temporary skip this as the tracker has not been build diff --git a/jobs/JGFS_ATMOS_GEMPAK b/jobs/JGFS_ATMOS_GEMPAK index 9988378fe54..7a00cb93852 100755 --- a/jobs/JGFS_ATMOS_GEMPAK +++ b/jobs/JGFS_ATMOS_GEMPAK @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak" -c "base gempak" ############################################ diff --git a/jobs/JGFS_ATMOS_GEMPAK_META b/jobs/JGFS_ATMOS_GEMPAK_META index 480dc0f1d66..9a42990f244 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_META +++ b/jobs/JGFS_ATMOS_GEMPAK_META @@ -5,7 +5,6 @@ ############################################ # GFS GEMPAK META PRODUCT GENERATION ############################################ -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak_meta" -c "base gempak" diff --git a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF index b9559ed7acc..639168c5fd4 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF +++ b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF @@ -3,7 +3,6 @@ ############################################ # GFS GEMPAK NCDC PRODUCT GENERATION ############################################ -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak_gif" -c "base gempak" export MP_PULSE=0 diff --git a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC index a82d2805eb3..7810d98c343 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC +++ b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak_spec" -c "base gempak" ############################################ diff --git a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS index 72dba0679d5..7b525c2009d 100755 --- a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS +++ b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS @@ -5,7 +5,6 @@ ############################################ # GFS PGRB2_SPECIAL_POST PRODUCT GENERATION ############################################ -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "npoess" -c "base npoess" export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} diff --git a/jobs/JGFS_ATMOS_POSTSND b/jobs/JGFS_ATMOS_POSTSND index 37fc70dd8b7..66446b8e6b8 100755 --- a/jobs/JGFS_ATMOS_POSTSND +++ b/jobs/JGFS_ATMOS_POSTSND @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "postsnd" -c "base postsnd" diff --git a/jobs/JGFS_ATMOS_VERIFICATION b/jobs/JGFS_ATMOS_VERIFICATION index 81401e73d51..604116b2558 100755 --- a/jobs/JGFS_ATMOS_VERIFICATION +++ b/jobs/JGFS_ATMOS_VERIFICATION @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "metp" -c "base metp" ############################################################### @@ -28,7 +27,11 @@ done # TODO: If none of these are on, why are we running this job? if [[ "${RUN_GRID2GRID_STEP1}" == "YES" || "${RUN_GRID2OBS_STEP1}" == "YES" || "${RUN_PRECIP_STEP1}" == "YES" ]]; then - ${VERIF_GLOBALSH} + # Override the -e in VERIF_GLOBALSH's shebang and un-export SHELLOPTS + # TODO: clean up the verif-global script so it does not raise false-positive errors + set +eu + export -n SHELLOPTS + bash -x "${VERIF_GLOBALSH}" err=$? if [[ ${err} -ne 0 ]]; then exit "${err}" diff --git a/jobs/JGLOBAL_AERO_ANALYSIS_FINALIZE b/jobs/JGLOBAL_AERO_ANALYSIS_FINALIZE index dafb290c375..01af77de39e 100755 --- a/jobs/JGLOBAL_AERO_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_AERO_ANALYSIS_FINALIZE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}aeroanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "aeroanlfinal" -c "base aeroanl aeroanlfinal" diff --git a/jobs/JGLOBAL_AERO_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_AERO_ANALYSIS_INITIALIZE index 2a87bad5772..e82f1cc5ca4 100755 --- a/jobs/JGLOBAL_AERO_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_AERO_ANALYSIS_INITIALIZE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export DATA=${DATA:-${DATAROOT}/${RUN}aeroanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "aeroanlinit" -c "base aeroanl aeroanlinit" diff --git a/jobs/JGLOBAL_AERO_ANALYSIS_VARIATIONAL b/jobs/JGLOBAL_AERO_ANALYSIS_VARIATIONAL index fd1725a17ca..6b104618a06 100755 --- a/jobs/JGLOBAL_AERO_ANALYSIS_VARIATIONAL +++ b/jobs/JGLOBAL_AERO_ANALYSIS_VARIATIONAL @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}aeroanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "aeroanlvar" -c "base aeroanl aeroanlvar" diff --git a/jobs/JGLOBAL_ARCHIVE_TARS b/jobs/JGLOBAL_ARCHIVE_TARS index 1979160449d..87127b94172 100755 --- a/jobs/JGLOBAL_ARCHIVE_TARS +++ b/jobs/JGLOBAL_ARCHIVE_TARS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "arch_tars" -c "base arch_tars wave" source "${USHgfs}/wave_domain_grid.sh" @@ -74,11 +73,10 @@ fi # Run archive script ############################################################### +set +eu ${GLOBALARCHIVESH:-${SCRgfs}/exglobal_archive_tars.py} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi +export err=$?; err_chk "FATAL ERROR: failed to archive the COM structure" +set_strict ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGLOBAL_ARCHIVE_VRFY b/jobs/JGLOBAL_ARCHIVE_VRFY index b646ff1a63f..212bb5d3e13 100755 --- a/jobs/JGLOBAL_ARCHIVE_VRFY +++ b/jobs/JGLOBAL_ARCHIVE_VRFY @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "arch_vrfy" -c "base arch_vrfy wave" diff --git a/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE b/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE index 27b6dba4ebb..8d1e1645904 100755 --- a/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmensanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmensanlfinal" -c "base atmensanl atmensanlfinal" diff --git a/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT b/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT index 361ff7bf8f5..945fd0a0e05 100755 --- a/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT +++ b/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmensanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmensanlfv3inc" -c "base atmensanl atmensanlfv3inc" diff --git a/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE index 4c444f7f85f..1439a8019fa 100755 --- a/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export DATA=${DATA:-${DATAROOT}/${RUN}atmensanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmensanlinit" -c "base atmensanl atmensanlinit" diff --git a/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF b/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF index 7cb468de6e2..5f783d89908 100755 --- a/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF +++ b/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmensanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmensanlletkf" -c "base atmensanl atmensanlletkf" diff --git a/jobs/JGLOBAL_ATMENS_ANALYSIS_OBS b/jobs/JGLOBAL_ATMENS_ANALYSIS_OBS index 38a33010aeb..9439f2e09ca 100755 --- a/jobs/JGLOBAL_ATMENS_ANALYSIS_OBS +++ b/jobs/JGLOBAL_ATMENS_ANALYSIS_OBS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmensanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmensanlobs" -c "base atmensanl atmensanlobs" diff --git a/jobs/JGLOBAL_ATMENS_ANALYSIS_SOL b/jobs/JGLOBAL_ATMENS_ANALYSIS_SOL index 39560b8e474..e413eac653f 100755 --- a/jobs/JGLOBAL_ATMENS_ANALYSIS_SOL +++ b/jobs/JGLOBAL_ATMENS_ANALYSIS_SOL @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmensanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmensanlsol" -c "base atmensanl atmensanlsol" diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index ada78bd4f20..e015ae131f8 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal" diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index 9812022bb20..255e29774a4 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "analcalc" -c "base anal analcalc" diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI index aef3cabd402..286d7c806e9 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC_FV3JEDI @@ -4,7 +4,6 @@ # shellcheck disable=SC2153 # shellcheck disable=SC2312 -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "analcalc_fv3jedi" -c "base analcalc_fv3jedi" ############################################## diff --git a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP index 128a8c85ef3..5f7a1d6ea70 100755 --- a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP +++ b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "sfc_prep" -c "base" export SENDDBN=${SENDDBN:-NO} diff --git a/jobs/JGLOBAL_ATMOS_ENSSTAT b/jobs/JGLOBAL_ATMOS_ENSSTAT index cbfacc5edb3..2f3b1c3bf57 100755 --- a/jobs/JGLOBAL_ATMOS_ENSSTAT +++ b/jobs/JGLOBAL_ATMOS_ENSSTAT @@ -4,7 +4,6 @@ # Caculate the mean, spread, and other probabilistic fields. # -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "atmos_ensstat" -c "base atmos_ensstat" diff --git a/jobs/JGLOBAL_ATMOS_POST_MANAGER b/jobs/JGLOBAL_ATMOS_POST_MANAGER index 902fb9ced08..19fcf0fa7cb 100755 --- a/jobs/JGLOBAL_ATMOS_POST_MANAGER +++ b/jobs/JGLOBAL_ATMOS_POST_MANAGER @@ -2,7 +2,6 @@ # TODO (#1227) This job is not used in the rocoto suite -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "post" -c "base post" diff --git a/jobs/JGLOBAL_ATMOS_PRODUCTS b/jobs/JGLOBAL_ATMOS_PRODUCTS index 777de810ad4..999332fb009 100755 --- a/jobs/JGLOBAL_ATMOS_PRODUCTS +++ b/jobs/JGLOBAL_ATMOS_PRODUCTS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "atmos_products" -c "base atmos_products" diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index f838be9dd18..33a5150040c 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "sfcanl" -c "base sfcanl" diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index 027bee18579..8be8c610990 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "prep" -c "base prep" diff --git a/jobs/JGLOBAL_ATMOS_UPP b/jobs/JGLOBAL_ATMOS_UPP index 3718311b374..9e8be1b47da 100755 --- a/jobs/JGLOBAL_ATMOS_UPP +++ b/jobs/JGLOBAL_ATMOS_UPP @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "upp" -c "base upp" ############################################## diff --git a/jobs/JGLOBAL_ATMOS_VMINMON b/jobs/JGLOBAL_ATMOS_VMINMON index e63797dc58b..84e1014c196 100755 --- a/jobs/JGLOBAL_ATMOS_VMINMON +++ b/jobs/JGLOBAL_ATMOS_VMINMON @@ -3,7 +3,6 @@ ########################################################### # Global Minimization Monitor (MinMon) job ########################################################### -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "vminmon" -c "base vminmon" ############################################# diff --git a/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE b/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE index b326d6538fe..08105e38cd0 100755 --- a/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmanlfinal" -c "base atmanl atmanlfinal" diff --git a/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT b/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT index 7da2e79e35e..8c4c7823542 100755 --- a/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT +++ b/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmanlfv3inc" -c "base atmanl atmanlfv3inc" diff --git a/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE index 192da90dd70..917f83de650 100755 --- a/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export DATA=${DATA:-${DATAROOT}/${RUN}atmanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmanlinit" -c "base atmanl atmanlinit" diff --git a/jobs/JGLOBAL_ATM_ANALYSIS_VARIATIONAL b/jobs/JGLOBAL_ATM_ANALYSIS_VARIATIONAL index a484355dc44..7f00ab9da78 100755 --- a/jobs/JGLOBAL_ATM_ANALYSIS_VARIATIONAL +++ b/jobs/JGLOBAL_ATM_ANALYSIS_VARIATIONAL @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATA=${DATA:-${DATAROOT}/${RUN}atmanl_${cyc}} source "${HOMEgfs}/ush/jjob_header.sh" -e "atmanlvar" -c "base atmanl atmanlvar" diff --git a/jobs/JGLOBAL_ATM_PREP_IODA_OBS b/jobs/JGLOBAL_ATM_PREP_IODA_OBS index 267077a28dc..0572e978a2c 100755 --- a/jobs/JGLOBAL_ATM_PREP_IODA_OBS +++ b/jobs/JGLOBAL_ATM_PREP_IODA_OBS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "prepatmiodaobs" -c "base prepatmiodaobs" ############################################## diff --git a/jobs/JGLOBAL_CLEANUP b/jobs/JGLOBAL_CLEANUP index d5715748ad8..0320d8405ca 100755 --- a/jobs/JGLOBAL_CLEANUP +++ b/jobs/JGLOBAL_CLEANUP @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "cleanup" -c "base cleanup" "${SCRgfs}/exglobal_cleanup.sh" diff --git a/jobs/JGLOBAL_ENS_ARCHIVE_TARS b/jobs/JGLOBAL_ENS_ARCHIVE_TARS index 0b69e9da718..dcb4d05210b 100755 --- a/jobs/JGLOBAL_ENS_ARCHIVE_TARS +++ b/jobs/JGLOBAL_ENS_ARCHIVE_TARS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "earc_tars" -c "base arch_tars earc_tars earc_groups" @@ -19,11 +18,11 @@ if [[ ! -d ${COMOUT_CONF} ]]; then mkdir -p "${COMOUT_CONF}"; fi # Run archive script ############################################################### +# Calls an external bash command; do not fail on unassigned/error +set +eu "${SCRgfs}/exgdas_enkf_earc_tars.py" -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi +export err=$?; err_chk "FATAL ERROR Failed to archive the ensemble COM structure" +set_strict ############################################################### diff --git a/jobs/JGLOBAL_ENS_ARCHIVE_VRFY b/jobs/JGLOBAL_ENS_ARCHIVE_VRFY index e7772e29def..2e30a1de727 100755 --- a/jobs/JGLOBAL_ENS_ARCHIVE_VRFY +++ b/jobs/JGLOBAL_ENS_ARCHIVE_VRFY @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "earc_vrfy" -c "base earc_vrfy" diff --git a/jobs/JGLOBAL_ENS_GLOBUS_ARCH b/jobs/JGLOBAL_ENS_GLOBUS_ARCH index 93e7ba2474a..906ffbb5ec1 100755 --- a/jobs/JGLOBAL_ENS_GLOBUS_ARCH +++ b/jobs/JGLOBAL_ENS_GLOBUS_ARCH @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "globus_earc" -c "base globus earc_groups" diff --git a/jobs/JGLOBAL_EXTRACTVARS b/jobs/JGLOBAL_EXTRACTVARS index 89a6f99dd27..03800937ead 100755 --- a/jobs/JGLOBAL_EXTRACTVARS +++ b/jobs/JGLOBAL_EXTRACTVARS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "extractvars" -c "base extractvars" source "${USHgfs}/wave_domain_grid.sh" diff --git a/jobs/JGLOBAL_FETCH b/jobs/JGLOBAL_FETCH index b6905756aff..f830224b032 100755 --- a/jobs/JGLOBAL_FETCH +++ b/jobs/JGLOBAL_FETCH @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "fetch" -c "base fetch" # Execute fetching diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index f910191c767..311bf7e7f97 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" - if (( 10#${ENSMEM:-0} > 0 )); then export DATAjob="${DATAROOT}/${RUN}efcs${ENSMEM}.${PDY:-}${cyc}" export DATA="${DATAjob}/${jobid}" @@ -86,11 +84,8 @@ fi ############################################################### # Run relevant exglobal script ############################################################### -"${FORECASTSH:-${SCRgfs}/exglobal_forecast.sh}" -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi +"${FORECASTSH:-${SCRgfs}/exglobal_forecast.sh}" && true # The && true prevents the shell from exiting when set -e +export err=$?; err_chk # Send DBN alerts for EnKF # TODO: Should these be in post manager instead? diff --git a/jobs/JGLOBAL_GLOBUS_ARCH b/jobs/JGLOBAL_GLOBUS_ARCH index e85801a533c..856082a2df4 100755 --- a/jobs/JGLOBAL_GLOBUS_ARCH +++ b/jobs/JGLOBAL_GLOBUS_ARCH @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "globus_arch" -c "base globus" ############################################## diff --git a/jobs/JGLOBAL_MARINE_ANALYSIS_CHECKPOINT b/jobs/JGLOBAL_MARINE_ANALYSIS_CHECKPOINT index 25a5c3becb9..de35b07a3cc 100755 --- a/jobs/JGLOBAL_MARINE_ANALYSIS_CHECKPOINT +++ b/jobs/JGLOBAL_MARINE_ANALYSIS_CHECKPOINT @@ -1,5 +1,4 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATAens="${DATAjob}/ensdata" diff --git a/jobs/JGLOBAL_MARINE_ANALYSIS_FINALIZE b/jobs/JGLOBAL_MARINE_ANALYSIS_FINALIZE index 4da2163f6af..8598d97c9f2 100755 --- a/jobs/JGLOBAL_MARINE_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_MARINE_ANALYSIS_FINALIZE @@ -1,5 +1,4 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATAens="${DATAjob}/ensdata" diff --git a/jobs/JGLOBAL_MARINE_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_MARINE_ANALYSIS_INITIALIZE index 5b3fe46288a..c474ed35492 100755 --- a/jobs/JGLOBAL_MARINE_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_MARINE_ANALYSIS_INITIALIZE @@ -1,6 +1,5 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATAens="${DATAjob}/ensdata" export DATA="${DATAjob}/marinevariational" diff --git a/jobs/JGLOBAL_MARINE_ANALYSIS_LETKF b/jobs/JGLOBAL_MARINE_ANALYSIS_LETKF index 3e4db1ef464..2c7d9e9774a 100755 --- a/jobs/JGLOBAL_MARINE_ANALYSIS_LETKF +++ b/jobs/JGLOBAL_MARINE_ANALYSIS_LETKF @@ -1,5 +1,4 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATA="${DATAjob}/${jobid}" diff --git a/jobs/JGLOBAL_MARINE_ANALYSIS_VARIATIONAL b/jobs/JGLOBAL_MARINE_ANALYSIS_VARIATIONAL index 03809edb6c1..825310ab86b 100755 --- a/jobs/JGLOBAL_MARINE_ANALYSIS_VARIATIONAL +++ b/jobs/JGLOBAL_MARINE_ANALYSIS_VARIATIONAL @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" export WIPE_DATA="NO" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATAens="${DATAjob}/ensdata" diff --git a/jobs/JGLOBAL_MARINE_BMAT b/jobs/JGLOBAL_MARINE_BMAT index ce26dbb05db..6ec3bfcfccb 100755 --- a/jobs/JGLOBAL_MARINE_BMAT +++ b/jobs/JGLOBAL_MARINE_BMAT @@ -1,6 +1,5 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" export DATAjob="${DATAROOT}/${RUN}marineanalysis.${PDY:-}${cyc}" export DATA="${DATAjob}/${jobid}" diff --git a/jobs/JGLOBAL_OCEANICE_PRODUCTS b/jobs/JGLOBAL_OCEANICE_PRODUCTS index a564f18595e..df90f419508 100755 --- a/jobs/JGLOBAL_OCEANICE_PRODUCTS +++ b/jobs/JGLOBAL_OCEANICE_PRODUCTS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "oceanice_products" -c "base oceanice_products" diff --git a/jobs/JGLOBAL_PREP_EMISSIONS b/jobs/JGLOBAL_PREP_EMISSIONS index efacb38ca99..2f0dcc450f6 100755 --- a/jobs/JGLOBAL_PREP_EMISSIONS +++ b/jobs/JGLOBAL_PREP_EMISSIONS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "prep_emissions" -c "base prep_emissions" ############################################## diff --git a/jobs/JGLOBAL_PREP_OBS_AERO b/jobs/JGLOBAL_PREP_OBS_AERO index 4cd35ae3e47..ea2252e01aa 100755 --- a/jobs/JGLOBAL_PREP_OBS_AERO +++ b/jobs/JGLOBAL_PREP_OBS_AERO @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "prepobsaero" -c "base prepobsaero" ############################################## diff --git a/jobs/JGLOBAL_PREP_OCEAN_OBS b/jobs/JGLOBAL_PREP_OCEAN_OBS index 3f8f347f31e..73ae67ea20c 100755 --- a/jobs/JGLOBAL_PREP_OCEAN_OBS +++ b/jobs/JGLOBAL_PREP_OCEAN_OBS @@ -1,5 +1,4 @@ #!/bin/bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "prepoceanobs" -c "base prepoceanobs" diff --git a/jobs/JGLOBAL_SNOWENS_ANALYSIS b/jobs/JGLOBAL_SNOWENS_ANALYSIS index 7f7ef6edb69..ee7c95750e1 100755 --- a/jobs/JGLOBAL_SNOWENS_ANALYSIS +++ b/jobs/JGLOBAL_SNOWENS_ANALYSIS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "esnowanl" -c "base esnowanl" ############################################## diff --git a/jobs/JGLOBAL_SNOW_ANALYSIS b/jobs/JGLOBAL_SNOW_ANALYSIS index d066fcaac98..07d4a3647bb 100755 --- a/jobs/JGLOBAL_SNOW_ANALYSIS +++ b/jobs/JGLOBAL_SNOW_ANALYSIS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "snowanl" -c "base snowanl" ############################################## diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index ddf15a3fb54..dbae7f46eef 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "stage_ic" -c "base stage_ic" # Execute staging diff --git a/jobs/JGLOBAL_WAVE_GEMPAK b/jobs/JGLOBAL_WAVE_GEMPAK index 12a3aafdcf6..cebbfea28f9 100755 --- a/jobs/JGLOBAL_WAVE_GEMPAK +++ b/jobs/JGLOBAL_WAVE_GEMPAK @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "wavegempak" -c "base wave wavegempak" source "${USHgfs}/wave_domain_grid.sh" diff --git a/jobs/JGLOBAL_WAVE_INIT b/jobs/JGLOBAL_WAVE_INIT index 3e2ec8ff9c9..f69af68586d 100755 --- a/jobs/JGLOBAL_WAVE_INIT +++ b/jobs/JGLOBAL_WAVE_INIT @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "waveinit" -c "base wave waveinit" # Add default errchk = err_chk diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNT b/jobs/JGLOBAL_WAVE_POST_BNDPNT index 1fda48bdaba..21a33d21421 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNT +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNT @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "wavepostbndpnt" -c "base wave wavepostsbs wavepostbndpnt" # Add default errchk = err_chk diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL index 98ea844fffd..5ab1df56837 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "wavepostbndpntbll" -c "base wave wavepostsbs wavepostbndpntbll" export COMPONENT="wave" diff --git a/jobs/JGLOBAL_WAVE_POST_PNT b/jobs/JGLOBAL_WAVE_POST_PNT index 9f10d926edc..54febb7d3b3 100755 --- a/jobs/JGLOBAL_WAVE_POST_PNT +++ b/jobs/JGLOBAL_WAVE_POST_PNT @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "wavepostpnt" -c "base wave wavepostsbs wavepostpnt" # Add default errchk = err_chk diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index ae257983df1..3403a644ad4 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "wavepostsbs" -c "base wave wavepostsbs" source "${USHgfs}/wave_domain_grid.sh" diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS index 2f5e8a191a9..83340effe5a 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS +++ b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "waveawipsbulls" -c "base wave waveawipsbulls" # Add default errchk = err_chk diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED index 48e9e19072e..b9bf34bd46d 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED +++ b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "waveawipsgridded" -c "base wave waveawipsgridded" source "${USHgfs}/wave_domain_grid.sh" diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index fda5aebedc6..f2fe4c6dbfd 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -1,6 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "waveprep" -c "base wave waveprep" # Add default errchk = err_chk diff --git a/jobs/rocoto/aeroanlfinal.sh b/jobs/rocoto/aeroanlfinal.sh index 352bd0ce914..25a902f8c36 100755 --- a/jobs/rocoto/aeroanlfinal.sh +++ b/jobs/rocoto/aeroanlfinal.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/aeroanlgenb.sh b/jobs/rocoto/aeroanlgenb.sh index d780577e685..9ddc148b7c6 100755 --- a/jobs/rocoto/aeroanlgenb.sh +++ b/jobs/rocoto/aeroanlgenb.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/aeroanlinit.sh b/jobs/rocoto/aeroanlinit.sh index 4f534b6dc8a..54d53565595 100755 --- a/jobs/rocoto/aeroanlinit.sh +++ b/jobs/rocoto/aeroanlinit.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/aeroanlvar.sh b/jobs/rocoto/aeroanlvar.sh index 8a02abf0f74..eacb470d5b5 100755 --- a/jobs/rocoto/aeroanlvar.sh +++ b/jobs/rocoto/aeroanlvar.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/aerosol_init.sh b/jobs/rocoto/aerosol_init.sh index 0a2c7685d60..1b53f44c44f 100755 --- a/jobs/rocoto/aerosol_init.sh +++ b/jobs/rocoto/aerosol_init.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules @@ -23,13 +23,13 @@ done ############################################################### # Source machine runtime environment -source $BASE_ENV/${machine}.env aerosol_init +source ${BASE_ENV}/${machine}.env aerosol_init status=$? if [[ ${status} -ne 0 ]]; then exit "${status}" fi -$HOMEgfs/scripts/exgfs_aero_init_aerosol.py +${HOMEgfs}/scripts/exgfs_aero_init_aerosol.py status=$? if [[ ${status} -ne 0 ]]; then diff --git a/jobs/rocoto/anal.sh b/jobs/rocoto/anal.sh index b241cd5c1bf..72ee9918e4b 100755 --- a/jobs/rocoto/anal.sh +++ b/jobs/rocoto/anal.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/analcalc.sh b/jobs/rocoto/analcalc.sh index 7a0c852c631..fad80b2c859 100755 --- a/jobs/rocoto/analcalc.sh +++ b/jobs/rocoto/analcalc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/analcalc_fv3jedi.sh b/jobs/rocoto/analcalc_fv3jedi.sh index 22e8abd4ed6..182f82d1d77 100755 --- a/jobs/rocoto/analcalc_fv3jedi.sh +++ b/jobs/rocoto/analcalc_fv3jedi.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/analdiag.sh b/jobs/rocoto/analdiag.sh index d866c8dde93..7b23eba69bc 100755 --- a/jobs/rocoto/analdiag.sh +++ b/jobs/rocoto/analdiag.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/arch_tars.sh b/jobs/rocoto/arch_tars.sh index 2d2d75202f7..52028759918 100755 --- a/jobs/rocoto/arch_tars.sh +++ b/jobs/rocoto/arch_tars.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/arch_vrfy.sh b/jobs/rocoto/arch_vrfy.sh index 1e7bf343162..235c8da774b 100755 --- a/jobs/rocoto/arch_vrfy.sh +++ b/jobs/rocoto/arch_vrfy.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/atmanlfinal.sh b/jobs/rocoto/atmanlfinal.sh index c33ee264eb6..585c1c25852 100755 --- a/jobs/rocoto/atmanlfinal.sh +++ b/jobs/rocoto/atmanlfinal.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmanlfv3inc.sh b/jobs/rocoto/atmanlfv3inc.sh index fee2d573a19..3db5bd37655 100755 --- a/jobs/rocoto/atmanlfv3inc.sh +++ b/jobs/rocoto/atmanlfv3inc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmanlinit.sh b/jobs/rocoto/atmanlinit.sh index 3292c65b3a2..1a32f9b84c3 100755 --- a/jobs/rocoto/atmanlinit.sh +++ b/jobs/rocoto/atmanlinit.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmanlvar.sh b/jobs/rocoto/atmanlvar.sh index 43153120a58..0bf173c8990 100755 --- a/jobs/rocoto/atmanlvar.sh +++ b/jobs/rocoto/atmanlvar.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmensanlfinal.sh b/jobs/rocoto/atmensanlfinal.sh index 1ef5044f58b..e41c66eaeb8 100755 --- a/jobs/rocoto/atmensanlfinal.sh +++ b/jobs/rocoto/atmensanlfinal.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmensanlfv3inc.sh b/jobs/rocoto/atmensanlfv3inc.sh index a9f84eff0b0..3f941caa097 100755 --- a/jobs/rocoto/atmensanlfv3inc.sh +++ b/jobs/rocoto/atmensanlfv3inc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmensanlinit.sh b/jobs/rocoto/atmensanlinit.sh index 79e88614d80..3c8f2707388 100755 --- a/jobs/rocoto/atmensanlinit.sh +++ b/jobs/rocoto/atmensanlinit.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmensanlletkf.sh b/jobs/rocoto/atmensanlletkf.sh index aff7b0dbdf2..cc691cb3e0b 100755 --- a/jobs/rocoto/atmensanlletkf.sh +++ b/jobs/rocoto/atmensanlletkf.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmensanlobs.sh b/jobs/rocoto/atmensanlobs.sh index 2d7601aebd4..e3c6feccd32 100755 --- a/jobs/rocoto/atmensanlobs.sh +++ b/jobs/rocoto/atmensanlobs.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmensanlsol.sh b/jobs/rocoto/atmensanlsol.sh index 36d1f860c79..f52ef051e4c 100755 --- a/jobs/rocoto/atmensanlsol.sh +++ b/jobs/rocoto/atmensanlsol.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/atmos_ensstat.sh b/jobs/rocoto/atmos_ensstat.sh index 617cbd77f89..a21d913a0a3 100755 --- a/jobs/rocoto/atmos_ensstat.sh +++ b/jobs/rocoto/atmos_ensstat.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### ## atmosphere products driver script diff --git a/jobs/rocoto/atmos_products.sh b/jobs/rocoto/atmos_products.sh index 947b06dfc23..83c91e68067 100755 --- a/jobs/rocoto/atmos_products.sh +++ b/jobs/rocoto/atmos_products.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### ## atmosphere products driver script diff --git a/jobs/rocoto/awips_20km_1p0deg.sh b/jobs/rocoto/awips_20km_1p0deg.sh index af08b461110..a341dc12203 100755 --- a/jobs/rocoto/awips_20km_1p0deg.sh +++ b/jobs/rocoto/awips_20km_1p0deg.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### ## Abstract: diff --git a/jobs/rocoto/cleanup.sh b/jobs/rocoto/cleanup.sh index 010222ff552..fb119c5263a 100755 --- a/jobs/rocoto/cleanup.sh +++ b/jobs/rocoto/cleanup.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/earc_tars.sh b/jobs/rocoto/earc_tars.sh index 54c68685715..d09318fadbb 100755 --- a/jobs/rocoto/earc_tars.sh +++ b/jobs/rocoto/earc_tars.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/earc_vrfy.sh b/jobs/rocoto/earc_vrfy.sh index 2388b7e1674..440331e61dc 100755 --- a/jobs/rocoto/earc_vrfy.sh +++ b/jobs/rocoto/earc_vrfy.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/ecen.sh b/jobs/rocoto/ecen.sh index 475b3e81a0e..dcac5860687 100755 --- a/jobs/rocoto/ecen.sh +++ b/jobs/rocoto/ecen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/ecen_fv3jedi.sh b/jobs/rocoto/ecen_fv3jedi.sh index 80646b8396c..b1d5a563735 100755 --- a/jobs/rocoto/ecen_fv3jedi.sh +++ b/jobs/rocoto/ecen_fv3jedi.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/echgres.sh b/jobs/rocoto/echgres.sh index 3368c4aa3b7..38b7587a73d 100755 --- a/jobs/rocoto/echgres.sh +++ b/jobs/rocoto/echgres.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/ediag.sh b/jobs/rocoto/ediag.sh index e78f44d67a3..3f2ada7c0b1 100755 --- a/jobs/rocoto/ediag.sh +++ b/jobs/rocoto/ediag.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/eobs.sh b/jobs/rocoto/eobs.sh index 3b124d49a42..d0d997f28e1 100755 --- a/jobs/rocoto/eobs.sh +++ b/jobs/rocoto/eobs.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/epos.sh b/jobs/rocoto/epos.sh index f298df1a135..5c7a679ed4e 100755 --- a/jobs/rocoto/epos.sh +++ b/jobs/rocoto/epos.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/esfc.sh b/jobs/rocoto/esfc.sh index 222621567b9..9ae7e4cfa47 100755 --- a/jobs/rocoto/esfc.sh +++ b/jobs/rocoto/esfc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/eupd.sh b/jobs/rocoto/eupd.sh index 8752474b783..df3ef3037ac 100755 --- a/jobs/rocoto/eupd.sh +++ b/jobs/rocoto/eupd.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/extractvars.sh b/jobs/rocoto/extractvars.sh index 9dfb7fab5a7..aee14da144c 100755 --- a/jobs/rocoto/extractvars.sh +++ b/jobs/rocoto/extractvars.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/jobs/rocoto/fbwind.sh b/jobs/rocoto/fbwind.sh index fdf14f54730..5d5fa572391 100755 --- a/jobs/rocoto/fbwind.sh +++ b/jobs/rocoto/fbwind.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/fcst.sh b/jobs/rocoto/fcst.sh index 4d3e340655f..61ca6ab5ec7 100755 --- a/jobs/rocoto/fcst.sh +++ b/jobs/rocoto/fcst.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/fetch.sh b/jobs/rocoto/fetch.sh index 2a66ebaa729..a8e0025e8ba 100755 --- a/jobs/rocoto/fetch.sh +++ b/jobs/rocoto/fetch.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x # Source FV3GFS workflow modules . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/fit2obs.sh b/jobs/rocoto/fit2obs.sh index 999783da05f..1937f092f43 100755 --- a/jobs/rocoto/fit2obs.sh +++ b/jobs/rocoto/fit2obs.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/jobs/rocoto/gempak.sh b/jobs/rocoto/gempak.sh index dc1d3f2621e..65e34147180 100755 --- a/jobs/rocoto/gempak.sh +++ b/jobs/rocoto/gempak.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" status=$? if (( status != 0 )); then exit "${status}"; fi diff --git a/jobs/rocoto/gempakgrb2spec.sh b/jobs/rocoto/gempakgrb2spec.sh index ddcb84599e4..d6ee0e41f2b 100755 --- a/jobs/rocoto/gempakgrb2spec.sh +++ b/jobs/rocoto/gempakgrb2spec.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" status=$? if (( status != 0 )); then exit "${status}"; fi diff --git a/jobs/rocoto/gempakmeta.sh b/jobs/rocoto/gempakmeta.sh index 0babf7bbbfa..806337bb2e1 100755 --- a/jobs/rocoto/gempakmeta.sh +++ b/jobs/rocoto/gempakmeta.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/gempakmetancdc.sh b/jobs/rocoto/gempakmetancdc.sh index cfd51cf58a6..a9bfbf131e2 100755 --- a/jobs/rocoto/gempakmetancdc.sh +++ b/jobs/rocoto/gempakmetancdc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/gempakncdcupapgif.sh b/jobs/rocoto/gempakncdcupapgif.sh index 2cc84cd47d3..5b39ebbf0a6 100755 --- a/jobs/rocoto/gempakncdcupapgif.sh +++ b/jobs/rocoto/gempakncdcupapgif.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/genesis.sh b/jobs/rocoto/genesis.sh index 009a7006ef3..eff77faf722 100755 --- a/jobs/rocoto/genesis.sh +++ b/jobs/rocoto/genesis.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/genesis_fsu.sh b/jobs/rocoto/genesis_fsu.sh index 05c0ff8827b..9e87a2a7a84 100755 --- a/jobs/rocoto/genesis_fsu.sh +++ b/jobs/rocoto/genesis_fsu.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/globus_arch.sh b/jobs/rocoto/globus_arch.sh index 9c9da02238e..e82f05a4ea9 100755 --- a/jobs/rocoto/globus_arch.sh +++ b/jobs/rocoto/globus_arch.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/globus_earc.sh b/jobs/rocoto/globus_earc.sh index a3970322606..683587755f9 100755 --- a/jobs/rocoto/globus_earc.sh +++ b/jobs/rocoto/globus_earc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/marineanlchkpt.sh b/jobs/rocoto/marineanlchkpt.sh index e08a0812a31..b51e2c984c9 100755 --- a/jobs/rocoto/marineanlchkpt.sh +++ b/jobs/rocoto/marineanlchkpt.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/marineanlfinal.sh b/jobs/rocoto/marineanlfinal.sh index 380085427ca..27364f52519 100755 --- a/jobs/rocoto/marineanlfinal.sh +++ b/jobs/rocoto/marineanlfinal.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/marineanlinit.sh b/jobs/rocoto/marineanlinit.sh index 17b68b5e77e..3652babb7fd 100755 --- a/jobs/rocoto/marineanlinit.sh +++ b/jobs/rocoto/marineanlinit.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash export STRICT="NO" -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/marineanlletkf.sh b/jobs/rocoto/marineanlletkf.sh index 849fb454001..2a9108e8e5d 100755 --- a/jobs/rocoto/marineanlletkf.sh +++ b/jobs/rocoto/marineanlletkf.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/marineanlvar.sh b/jobs/rocoto/marineanlvar.sh index 4c95ad858d5..cae4324fce7 100755 --- a/jobs/rocoto/marineanlvar.sh +++ b/jobs/rocoto/marineanlvar.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/marinebmat.sh b/jobs/rocoto/marinebmat.sh index e76859479a6..b00dd34e7ea 100755 --- a/jobs/rocoto/marinebmat.sh +++ b/jobs/rocoto/marinebmat.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/metp.sh b/jobs/rocoto/metp.sh index 2bf833c1d68..426bff66f23 100755 --- a/jobs/rocoto/metp.sh +++ b/jobs/rocoto/metp.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/mos_ext_grd_fcst.sh b/jobs/rocoto/mos_ext_grd_fcst.sh index ce377119076..64369853e14 100755 --- a/jobs/rocoto/mos_ext_grd_fcst.sh +++ b/jobs/rocoto/mos_ext_grd_fcst.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_ext_grd_prdgen.sh b/jobs/rocoto/mos_ext_grd_prdgen.sh index fb641e04f0a..69dfc432544 100755 --- a/jobs/rocoto/mos_ext_grd_prdgen.sh +++ b/jobs/rocoto/mos_ext_grd_prdgen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_ext_grd_prep.sh b/jobs/rocoto/mos_ext_grd_prep.sh index defe9222b6b..d35b26ccf26 100755 --- a/jobs/rocoto/mos_ext_grd_prep.sh +++ b/jobs/rocoto/mos_ext_grd_prep.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_ext_stn_fcst.sh b/jobs/rocoto/mos_ext_stn_fcst.sh index 85cde491927..33c82941076 100755 --- a/jobs/rocoto/mos_ext_stn_fcst.sh +++ b/jobs/rocoto/mos_ext_stn_fcst.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_ext_stn_prdgen.sh b/jobs/rocoto/mos_ext_stn_prdgen.sh index 17709d5ffbc..f96ba9f3cc0 100755 --- a/jobs/rocoto/mos_ext_stn_prdgen.sh +++ b/jobs/rocoto/mos_ext_stn_prdgen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_ext_stn_prep.sh b/jobs/rocoto/mos_ext_stn_prep.sh index 9c65761a0dd..fcd043e330b 100755 --- a/jobs/rocoto/mos_ext_stn_prep.sh +++ b/jobs/rocoto/mos_ext_stn_prep.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_grd_fcst.sh b/jobs/rocoto/mos_grd_fcst.sh index 42832d5f14d..9265b5e0918 100755 --- a/jobs/rocoto/mos_grd_fcst.sh +++ b/jobs/rocoto/mos_grd_fcst.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_grd_prdgen.sh b/jobs/rocoto/mos_grd_prdgen.sh index c60b2e8f39c..97869debd7e 100755 --- a/jobs/rocoto/mos_grd_prdgen.sh +++ b/jobs/rocoto/mos_grd_prdgen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_grd_prep.sh b/jobs/rocoto/mos_grd_prep.sh index 3276ebf87dd..855e905c2a2 100755 --- a/jobs/rocoto/mos_grd_prep.sh +++ b/jobs/rocoto/mos_grd_prep.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_stn_fcst.sh b/jobs/rocoto/mos_stn_fcst.sh index 0024ed24b79..f8a1dd40709 100755 --- a/jobs/rocoto/mos_stn_fcst.sh +++ b/jobs/rocoto/mos_stn_fcst.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_stn_prdgen.sh b/jobs/rocoto/mos_stn_prdgen.sh index 01ada3f9d5e..11e19e4f3d8 100755 --- a/jobs/rocoto/mos_stn_prdgen.sh +++ b/jobs/rocoto/mos_stn_prdgen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_stn_prep.sh b/jobs/rocoto/mos_stn_prep.sh index 21b19c63053..2401743e6bf 100755 --- a/jobs/rocoto/mos_stn_prep.sh +++ b/jobs/rocoto/mos_stn_prep.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_wx_ext_prdgen.sh b/jobs/rocoto/mos_wx_ext_prdgen.sh index b1c81e8a3bb..478a72b846e 100755 --- a/jobs/rocoto/mos_wx_ext_prdgen.sh +++ b/jobs/rocoto/mos_wx_ext_prdgen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/mos_wx_prdgen.sh b/jobs/rocoto/mos_wx_prdgen.sh index 345682b03e7..bb9edc87bf9 100755 --- a/jobs/rocoto/mos_wx_prdgen.sh +++ b/jobs/rocoto/mos_wx_prdgen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/npoess.sh b/jobs/rocoto/npoess.sh index 3599ca26bd4..3c878c45df2 100755 --- a/jobs/rocoto/npoess.sh +++ b/jobs/rocoto/npoess.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/oceanice_products.sh b/jobs/rocoto/oceanice_products.sh index c3e03cea1aa..d7770797e58 100755 --- a/jobs/rocoto/oceanice_products.sh +++ b/jobs/rocoto/oceanice_products.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### ## ocean ice products driver script diff --git a/jobs/rocoto/ocnanalecen.sh b/jobs/rocoto/ocnanalecen.sh index 068cc77cb9b..42cd7d67b30 100755 --- a/jobs/rocoto/ocnanalecen.sh +++ b/jobs/rocoto/ocnanalecen.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/postsnd.sh b/jobs/rocoto/postsnd.sh index 8e7ba1547e1..c49ca2e1462 100755 --- a/jobs/rocoto/postsnd.sh +++ b/jobs/rocoto/postsnd.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/prep.sh b/jobs/rocoto/prep.sh index d26059d0ade..21679211b83 100755 --- a/jobs/rocoto/prep.sh +++ b/jobs/rocoto/prep.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" - ############################################################### # Source FV3GFS workflow modules . ${HOMEgfs}/ush/load_fv3gfs_modules.sh @@ -123,11 +121,15 @@ if [[ ${MAKE_PREPBUFR} = "YES" ]]; then export MAKE_NSSTBUFR="NO" fi - "${HOMEobsproc}/jobs/JOBSPROC_GLOBAL_PREP" - status=$? - if [[ ${status} -ne 0 ]]; then - exit "${status}" + # Do not fail on external errors + set +eu + "${HOMEobsproc}/jobs/JOBSPROC_GLOBAL_PREP" && true + err=$? + if [[ ${err} -ne 0 ]]; then + echo "FATAL ERROR: Global prep job failed!" + exit 1 fi + set_strict # If creating NSSTBUFR was disabled, copy from DMPDIR if appropriate. if [[ ${MAKE_NSSTBUFR:-"NO"} = "NO" ]]; then diff --git a/jobs/rocoto/prep_emissions.sh b/jobs/rocoto/prep_emissions.sh index 0677073947a..c24c5b72456 100755 --- a/jobs/rocoto/prep_emissions.sh +++ b/jobs/rocoto/prep_emissions.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/prepobsaero.sh b/jobs/rocoto/prepobsaero.sh index e1306605062..0c4a0ac10f0 100755 --- a/jobs/rocoto/prepobsaero.sh +++ b/jobs/rocoto/prepobsaero.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source UFSDA workflow modules diff --git a/jobs/rocoto/sfcanl.sh b/jobs/rocoto/sfcanl.sh index 20a8b107bc9..7421b189cd3 100755 --- a/jobs/rocoto/sfcanl.sh +++ b/jobs/rocoto/sfcanl.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/stage_ic.sh b/jobs/rocoto/stage_ic.sh index d5e7cd9b535..d23ab42af0c 100755 --- a/jobs/rocoto/stage_ic.sh +++ b/jobs/rocoto/stage_ic.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x # Source FV3GFS workflow modules . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/tracker.sh b/jobs/rocoto/tracker.sh index 3e2efd644ef..5ab7736c5fc 100755 --- a/jobs/rocoto/tracker.sh +++ b/jobs/rocoto/tracker.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/upp.sh b/jobs/rocoto/upp.sh index 1f14df01976..78b3065c142 100755 --- a/jobs/rocoto/upp.sh +++ b/jobs/rocoto/upp.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### ## Offline UPP driver script @@ -28,7 +28,7 @@ if [[ "${MACHINE_ID}" == "wcoss2" ]]; then export WGRIB2=wgrib2 module load python/3.8.6 module load crtm/2.4.0 # TODO: This is only needed when UPP_RUN=goes. Is there a better way to handle this? - set_trace + set -x # Add wxflow to PYTHONPATH wxflowPATH="${HOMEgfs}/ush/python" diff --git a/jobs/rocoto/verfozn.sh b/jobs/rocoto/verfozn.sh index 70a772fca6f..2fcbd260eff 100755 --- a/jobs/rocoto/verfozn.sh +++ b/jobs/rocoto/verfozn.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/verfrad.sh b/jobs/rocoto/verfrad.sh index a687d3cf26f..4d65d40359e 100755 --- a/jobs/rocoto/verfrad.sh +++ b/jobs/rocoto/verfrad.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/vminmon.sh b/jobs/rocoto/vminmon.sh index 73f10167e5a..85959538122 100755 --- a/jobs/rocoto/vminmon.sh +++ b/jobs/rocoto/vminmon.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/waveawipsbulls.sh b/jobs/rocoto/waveawipsbulls.sh index 6d33e665b5f..0d1e8584003 100755 --- a/jobs/rocoto/waveawipsbulls.sh +++ b/jobs/rocoto/waveawipsbulls.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules @@ -15,8 +15,8 @@ export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_PRDGEN_BULLS +${HOMEgfs}/jobs/JGLOBAL_WAVE_PRDGEN_BULLS status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/waveawipsgridded.sh b/jobs/rocoto/waveawipsgridded.sh index 472d917c60f..e163328e9db 100755 --- a/jobs/rocoto/waveawipsgridded.sh +++ b/jobs/rocoto/waveawipsgridded.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/wavegempak.sh b/jobs/rocoto/wavegempak.sh index 44b21e54f93..80a515270bf 100755 --- a/jobs/rocoto/wavegempak.sh +++ b/jobs/rocoto/wavegempak.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### source "${HOMEgfs}/ush/load_fv3gfs_modules.sh" diff --git a/jobs/rocoto/waveinit.sh b/jobs/rocoto/waveinit.sh index f11f59d8542..c3afef56327 100755 --- a/jobs/rocoto/waveinit.sh +++ b/jobs/rocoto/waveinit.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/jobs/rocoto/wavepostbndpnt.sh b/jobs/rocoto/wavepostbndpnt.sh index a3dbd5f2dc9..1d3aa1c0b6e 100755 --- a/jobs/rocoto/wavepostbndpnt.sh +++ b/jobs/rocoto/wavepostbndpnt.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/jobs/rocoto/wavepostbndpntbll.sh b/jobs/rocoto/wavepostbndpntbll.sh index f68c536b9d5..d16b51102ce 100755 --- a/jobs/rocoto/wavepostbndpntbll.sh +++ b/jobs/rocoto/wavepostbndpntbll.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/jobs/rocoto/wavepostpnt.sh b/jobs/rocoto/wavepostpnt.sh index 1ae6977f649..2d705d12fbf 100755 --- a/jobs/rocoto/wavepostpnt.sh +++ b/jobs/rocoto/wavepostpnt.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index ee763d10976..4ef5790d665 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### # Source FV3GFS workflow modules diff --git a/jobs/rocoto/waveprep.sh b/jobs/rocoto/waveprep.sh index 82b888ef8ab..b4816726a49 100755 --- a/jobs/rocoto/waveprep.sh +++ b/jobs/rocoto/waveprep.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +set -x ############################################################### echo diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index 23b4fc109e9..b663641d99b 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -17,8 +17,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exgdas_atmos_gempak_gif_ncdc.sh b/scripts/exgdas_atmos_gempak_gif_ncdc.sh index f932fb570c9..1c13464aee9 100755 --- a/scripts/exgdas_atmos_gempak_gif_ncdc.sh +++ b/scripts/exgdas_atmos_gempak_gif_ncdc.sh @@ -6,8 +6,6 @@ # in the future, we should move it above somewhere else. ############################################################## -source "${HOMEgfs}/ush/preamble.sh" - cd "${DATA}" || exit 2 export NTS="${HOMEgfs}/gempak/ush/restore" diff --git a/scripts/exgdas_atmos_nawips.sh b/scripts/exgdas_atmos_nawips.sh index 7feb3210acb..475fd8565e5 100755 --- a/scripts/exgdas_atmos_nawips.sh +++ b/scripts/exgdas_atmos_nawips.sh @@ -4,8 +4,6 @@ # echo "exnawips - convert NCEP GRIB files into GEMPAK Grids" ################################################################### -source "${USHgfs}/preamble.sh" "${2}" - cd "${DATA}" || exit 1 grid=$1 fhr3=$2 diff --git a/scripts/exgdas_atmos_verfozn.sh b/scripts/exgdas_atmos_verfozn.sh index e681fc55c56..75d6ef973e0 100755 --- a/scripts/exgdas_atmos_verfozn.sh +++ b/scripts/exgdas_atmos_verfozn.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ # exgdas_atmos_verfozn.sh # diff --git a/scripts/exgdas_atmos_verfrad.sh b/scripts/exgdas_atmos_verfrad.sh index bad8715acd0..8b8bb592b87 100755 --- a/scripts/exgdas_atmos_verfrad.sh +++ b/scripts/exgdas_atmos_verfrad.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/scripts/exgdas_enkf_ecen.sh b/scripts/exgdas_enkf_ecen.sh index 2b1828d5bdb..d662bee61e1 100755 --- a/scripts/exgdas_enkf_ecen.sh +++ b/scripts/exgdas_enkf_ecen.sh @@ -17,8 +17,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exgdas_enkf_post.sh b/scripts/exgdas_enkf_post.sh index a6efd35e444..9391608cba5 100755 --- a/scripts/exgdas_enkf_post.sh +++ b/scripts/exgdas_enkf_post.sh @@ -17,8 +17,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exgdas_enkf_select_obs.sh b/scripts/exgdas_enkf_select_obs.sh index 210e531bd8b..6b20c933142 100755 --- a/scripts/exgdas_enkf_select_obs.sh +++ b/scripts/exgdas_enkf_select_obs.sh @@ -17,8 +17,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exgdas_enkf_sfc.sh b/scripts/exgdas_enkf_sfc.sh index 8da1fd0f3cd..aeb3b24fb8b 100755 --- a/scripts/exgdas_enkf_sfc.sh +++ b/scripts/exgdas_enkf_sfc.sh @@ -17,8 +17,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exgdas_enkf_update.sh b/scripts/exgdas_enkf_update.sh index 0c7dbd6ee7c..8073692fa45 100755 --- a/scripts/exgdas_enkf_update.sh +++ b/scripts/exgdas_enkf_update.sh @@ -17,8 +17,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exgfs_atmos_awips_20km_1p0deg.sh b/scripts/exgfs_atmos_awips_20km_1p0deg.sh index adb223e38e4..c67668c5626 100755 --- a/scripts/exgfs_atmos_awips_20km_1p0deg.sh +++ b/scripts/exgfs_atmos_awips_20km_1p0deg.sh @@ -20,8 +20,6 @@ # echo " " ############################################################################### -source "${USHgfs}/preamble.sh" - fcsthrs="$1" num=$# diff --git a/scripts/exgfs_atmos_fbwind.sh b/scripts/exgfs_atmos_fbwind.sh index 401ce513803..28943a40fae 100755 --- a/scripts/exgfs_atmos_fbwind.sh +++ b/scripts/exgfs_atmos_fbwind.sh @@ -14,8 +14,6 @@ # echo " Nov 2019 - B Vuong Removed WINTEMV bulletin (retired)" ##################################################################### -source "${HOMEgfs}/ush/preamble.sh" - cd "${DATA}" || exit 2 ###################### diff --git a/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh b/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh index e8a7c305d59..5571a6831a4 100755 --- a/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh +++ b/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh @@ -7,8 +7,6 @@ # in the future, we should move it above somewhere else. ############################################################## -source "${HOMEgfs}/ush/preamble.sh" - cd "${DATA}" || exit 1 export NTS="${HOMEgfs}/gempak/ush/restore" diff --git a/scripts/exgfs_atmos_gempak_meta.sh b/scripts/exgfs_atmos_gempak_meta.sh index 6ae8c77cfb4..38c958328f9 100755 --- a/scripts/exgfs_atmos_gempak_meta.sh +++ b/scripts/exgfs_atmos_gempak_meta.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" - GEMGRD1="${RUN}_1p00_${PDY}${cyc}f" export numproc=23 diff --git a/scripts/exgfs_atmos_goes_nawips.sh b/scripts/exgfs_atmos_goes_nawips.sh index 86b0eea7957..1bc2176e02b 100755 --- a/scripts/exgfs_atmos_goes_nawips.sh +++ b/scripts/exgfs_atmos_goes_nawips.sh @@ -4,8 +4,6 @@ # echo "exnawips - convert NCEP GRIB files into GEMPAK Grids" ################################################################### -source "${USHgfs}/preamble.sh" - cd "${DATA}" || exit 1 fhr3=$1 diff --git a/scripts/exgfs_atmos_grib2_special_npoess.sh b/scripts/exgfs_atmos_grib2_special_npoess.sh index 63f5518b548..621e5324916 100755 --- a/scripts/exgfs_atmos_grib2_special_npoess.sh +++ b/scripts/exgfs_atmos_grib2_special_npoess.sh @@ -7,8 +7,6 @@ # echo "-----------------------------------------------------" ##################################################################### -source "${USHgfs}/preamble.sh" - cd "${DATA}" || exit 2 ############################################################ diff --git a/scripts/exgfs_atmos_nawips.sh b/scripts/exgfs_atmos_nawips.sh index 9cf1969f65b..36670879053 100755 --- a/scripts/exgfs_atmos_nawips.sh +++ b/scripts/exgfs_atmos_nawips.sh @@ -4,8 +4,6 @@ # echo "exnawips - convert NCEP GRIB files into GEMPAK Grids" ################################################################### -source "${USHgfs}/preamble.sh" "${2}" - #### If EMC GFS PARA runs hourly file are not available, The ILPOST #### will set to 3 hour in EMC GFS PARA. #### Note: ILPOST default set to 1 diff --git a/scripts/exgfs_atmos_postsnd.sh b/scripts/exgfs_atmos_postsnd.sh index 07c1a1af957..8df999412ca 100755 --- a/scripts/exgfs_atmos_postsnd.sh +++ b/scripts/exgfs_atmos_postsnd.sh @@ -23,8 +23,6 @@ # it requires 7 nodes & allocate 21 processes per node(num_ppn=21) ################################################################ -source "${USHgfs}/preamble.sh" - runscript=${USHgfs}/gfs_bufr.sh cd "${DATA}" || exit 2 diff --git a/scripts/exgfs_pmgr.sh b/scripts/exgfs_pmgr.sh index c3b9a5befaf..ddd5257928a 100755 --- a/scripts/exgfs_pmgr.sh +++ b/scripts/exgfs_pmgr.sh @@ -6,8 +6,6 @@ # This script monitors the progress of the gfs_fcst job # -source "${USHgfs}/preamble.sh" - hour=00 TEND=384 TCP=385 diff --git a/scripts/exgfs_prdgen_manager.sh b/scripts/exgfs_prdgen_manager.sh index 01e8c58c877..17913f5d552 100755 --- a/scripts/exgfs_prdgen_manager.sh +++ b/scripts/exgfs_prdgen_manager.sh @@ -6,8 +6,6 @@ # This script monitors the progress of the gfs_fcst job # -source "${USHgfs}/preamble.sh" - hour=00 TEND=384 TCP=385 diff --git a/scripts/exgfs_wave_init.sh b/scripts/exgfs_wave_init.sh index cbcc65660e5..8c6ad1a0a3f 100755 --- a/scripts/exgfs_wave_init.sh +++ b/scripts/exgfs_wave_init.sh @@ -20,8 +20,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation cd "${DATA}" || exit 1 diff --git a/scripts/exgfs_wave_nawips.sh b/scripts/exgfs_wave_nawips.sh index 338985dd3a1..90d87b7ffe0 100755 --- a/scripts/exgfs_wave_nawips.sh +++ b/scripts/exgfs_wave_nawips.sh @@ -11,7 +11,6 @@ # March-2020 Roberto.Padilla@noaa.gov ##################################################################### -source "${USHgfs}/preamble.sh" source "${USHgfs}/wave_domain_grid.sh" source "${USHgfs}/atparse.bash" diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 49b3408f0e9..9d2d5abdd36 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -27,7 +27,6 @@ # ############################################################################### -source "${USHgfs}/preamble.sh" source "${USHgfs}/wave_domain_grid.sh" DOGRI_WAV=${DOGRI_WAV:-"NO"} # Interpolate to a grid diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 3f0355b5197..2ae6a3e306f 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -36,8 +36,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation cd $DATA diff --git a/scripts/exgfs_wave_prdgen_bulls.sh b/scripts/exgfs_wave_prdgen_bulls.sh index 714b9a82b24..8509a87e9b6 100755 --- a/scripts/exgfs_wave_prdgen_bulls.sh +++ b/scripts/exgfs_wave_prdgen_bulls.sh @@ -22,8 +22,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation # PATH for working and home directories diff --git a/scripts/exgfs_wave_prdgen_gridded.sh b/scripts/exgfs_wave_prdgen_gridded.sh index 4e74d08e79a..4ce9691ce4d 100755 --- a/scripts/exgfs_wave_prdgen_gridded.sh +++ b/scripts/exgfs_wave_prdgen_gridded.sh @@ -24,7 +24,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" source "${USHgfs}/wave_domain_grid.sh" # 0.a Basic modes of operation diff --git a/scripts/exgfs_wave_prep.sh b/scripts/exgfs_wave_prep.sh index bf4c21e4936..ab269adec51 100755 --- a/scripts/exgfs_wave_prep.sh +++ b/scripts/exgfs_wave_prep.sh @@ -47,8 +47,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation # Set wave model ID tag to include member number diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index ae74a8bafe0..e32fa946888 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -19,8 +19,6 @@ # Set environment. -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exglobal_atmos_analysis_calc.sh b/scripts/exglobal_atmos_analysis_calc.sh index cd18c704715..37e9387f2cd 100755 --- a/scripts/exglobal_atmos_analysis_calc.sh +++ b/scripts/exglobal_atmos_analysis_calc.sh @@ -19,8 +19,6 @@ # Set environment. -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exglobal_atmos_ensstat.sh b/scripts/exglobal_atmos_ensstat.sh index 7ad0ecfa30d..29766378e2f 100755 --- a/scripts/exglobal_atmos_ensstat.sh +++ b/scripts/exglobal_atmos_ensstat.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" - fhr3=$(printf "%03d" "${FORECAST_HOUR}") if [[ -a mpmd_script ]]; then rm -Rf mpmd_script; fi diff --git a/scripts/exglobal_atmos_pmgr.sh b/scripts/exglobal_atmos_pmgr.sh index 7f348474b61..1194d6c2fa1 100755 --- a/scripts/exglobal_atmos_pmgr.sh +++ b/scripts/exglobal_atmos_pmgr.sh @@ -6,8 +6,6 @@ # This script monitors the progress of the gfs_fcst job # -source "${USHgfs}/preamble.sh" - hour=00 case $RUN in diff --git a/scripts/exglobal_atmos_products.sh b/scripts/exglobal_atmos_products.sh index e510176a5b7..1445863099e 100755 --- a/scripts/exglobal_atmos_products.sh +++ b/scripts/exglobal_atmos_products.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - # Programs used export WGRIB2=${WGRIB2:-${wgrib2_ROOT}/bin/wgrib2} diff --git a/scripts/exglobal_atmos_sfcanl.sh b/scripts/exglobal_atmos_sfcanl.sh index a8b9ac71701..d4f48a7694a 100755 --- a/scripts/exglobal_atmos_sfcanl.sh +++ b/scripts/exglobal_atmos_sfcanl.sh @@ -19,8 +19,6 @@ # Set environment. -source "${USHgfs}/preamble.sh" - # Directories. cd "${DATA}" || exit 99 diff --git a/scripts/exglobal_atmos_tropcy_qc_reloc.sh b/scripts/exglobal_atmos_tropcy_qc_reloc.sh index f1272b18446..c10938ca278 100755 --- a/scripts/exglobal_atmos_tropcy_qc_reloc.sh +++ b/scripts/exglobal_atmos_tropcy_qc_reloc.sh @@ -10,8 +10,6 @@ # echo " Oct 2013 - Use main USH vars as part of minor pkg cleanup" ############################################################################ -source "${USHgfs}/preamble.sh" - # Make sure we are in the $DATA directory cd $DATA diff --git a/scripts/exglobal_atmos_vminmon.sh b/scripts/exglobal_atmos_vminmon.sh index b4307c8af9a..2f423913bac 100755 --- a/scripts/exglobal_atmos_vminmon.sh +++ b/scripts/exglobal_atmos_vminmon.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/scripts/exglobal_cleanup.sh b/scripts/exglobal_cleanup.sh index c242954e0b5..69cd513bf84 100755 --- a/scripts/exglobal_cleanup.sh +++ b/scripts/exglobal_cleanup.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ############################################################### echo "Begin Cleanup ${DATAROOT}!" diff --git a/scripts/exglobal_diag.sh b/scripts/exglobal_diag.sh index e3df9f9fa08..87fd3611af6 100755 --- a/scripts/exglobal_diag.sh +++ b/scripts/exglobal_diag.sh @@ -19,8 +19,6 @@ # Set environment. -source "${USHgfs}/preamble.sh" - # Directories. pwd=$(pwd) diff --git a/scripts/exglobal_extractvars.sh b/scripts/exglobal_extractvars.sh index a124667679d..d735db6310a 100755 --- a/scripts/exglobal_extractvars.sh +++ b/scripts/exglobal_extractvars.sh @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#! /usr/bin/env bash ################################################################################ ## UNIX Script Documentation Block @@ -9,7 +9,6 @@ # Main body starts here ####################### -source "${USHgfs}/preamble.sh" source "${USHgfs}/extractvars_tools.sh" # Scripts used diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index 1c21410dbc5..0abf9a14e34 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -77,8 +77,6 @@ # Main body starts here ####################### -source "${USHgfs}/preamble.sh" - # include all subroutines. Executions later. source "${USHgfs}/forecast_predet.sh" # include functions for variable definition source "${USHgfs}/forecast_det.sh" # include functions for run type determination @@ -178,10 +176,9 @@ else fi ${NCP} "${EXECgfs}/${FCSTEXEC}" "${DATA}/" -${APRUN_UFS} "${DATA}/${FCSTEXEC}" 1>&1 2>&2 -export ERR=$? -export err=${ERR} -${ERRSCRIPT} || exit "${err}" +${APRUN_UFS} "${DATA}/${FCSTEXEC}" 1>&1 2>&2 && true +export err=$? +err_chk FV3_out if [[ "${cplflx}" == ".true." ]]; then diff --git a/ush/atmos_ensstat.sh b/ush/atmos_ensstat.sh index 17981a8c3e8..b0dd881edde 100755 --- a/ush/atmos_ensstat.sh +++ b/ush/atmos_ensstat.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" - grid=${1} fhr3=${2} grid_type=${3:-''} diff --git a/ush/atmos_extractvars.sh b/ush/atmos_extractvars.sh index 9cf7810c6d8..e0a410fa78d 100755 --- a/ush/atmos_extractvars.sh +++ b/ush/atmos_extractvars.sh @@ -9,8 +9,6 @@ # Main body starts here ####################### -source "${USHgfs}/preamble.sh" - fcnt=1 # 1 is 1st quarter, 2 is 2nd quarter and 3 is 3rd quarter of the day dcnt=1 # lead day subdata=${1} diff --git a/ush/bash_utils.sh b/ush/bash_utils.sh index b8ce729cb82..9aec7f4ee1b 100755 --- a/ush/bash_utils.sh +++ b/ush/bash_utils.sh @@ -123,4 +123,4 @@ function detect_py_ver() { declare -xf declare_from_tmpl declare -xf wait_for_file -declare -xf detect_py +declare -xf detect_py_ver diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 480178fa3c3..000b6729397 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -19,8 +19,7 @@ FV3_postdet() { echo "Copying FV3 cold start files for 'RUN=${RUN}' at '${current_cycle}' from '${COMIN_ATMOS_INPUT}'" local fv3_file for fv3_file in ${file_list}; do - ${NCP} "${COMIN_ATMOS_INPUT}/${fv3_file}" "${DATA}/INPUT/${fv3_file}" \ - || ( echo "FATAL ERROR: Unable to copy FV3 IC, ABORT!"; exit 1 ) + cpreq "${COMIN_ATMOS_INPUT}/${fv3_file}" "${DATA}/INPUT/${fv3_file}" done # warm start case @@ -43,8 +42,7 @@ FV3_postdet() { local fv3_file restart_file for fv3_file in ${file_list}; do restart_file="${restart_date:0:8}.${restart_date:8:2}0000.${fv3_file}" - ${NCP} "${restart_dir}/${restart_file}" "${DATA}/INPUT/${fv3_file}" \ - || ( echo "FATAL ERROR: Unable to copy FV3 IC, ABORT!"; exit 1 ) + cpreq "${restart_dir}/${restart_file}" "${DATA}/INPUT/${fv3_file}" done if [[ "${RERUN}" == "YES" ]]; then @@ -55,8 +53,7 @@ FV3_postdet() { echo "Copying stochastic restarts for 'RUN=${RUN}' at '${restart_date}' from '${restart_dir}'" for stoch_file in $(stoch_restarts); do restart_file="${restart_date:0:8}.${restart_date:8:2}0000.${stoch_file}" - ${NCP} "${restart_dir}/${restart_file}" "${DATA}/INPUT/${stoch_file}" \ - || ( echo "FATAL ERROR: Unable to copy stochastic restart, ABORT!"; exit 1 ) + cpreq "${restart_dir}/${restart_file}" "${DATA}/INPUT/${stoch_file}" done fi else @@ -118,12 +115,7 @@ FV3_postdet() { local increment_file for inc_file in "${inc_files[@]}"; do increment_file="${COMIN_ATMOS_ANALYSIS}/${RUN}.t${cyc}z.${inc_file}" - if [[ -f "${increment_file}" ]]; then - ${NCP} "${increment_file}" "${DATA}/INPUT/${inc_file}" - else - echo "FATAL ERROR: missing increment file '${increment_file}', ABORT!" - exit 1 - fi + cpreq "${increment_file}" "${DATA}/INPUT/${inc_file}" done fi @@ -222,12 +214,7 @@ EOF else increment_file="${COMIN_ATMOS_ANALYSIS}/${RUN}.t${cyc}z.${PREFIX_ATMINC}${inc_file}" fi - if [[ -f "${increment_file}" ]]; then - ${NCP} "${increment_file}" "${DATA}/INPUT/${inc_file}" - else - echo "FATAL ERROR: missing increment file '${increment_file}', ABORT!" - exit 1 - fi + cpreq "${increment_file}" "${DATA}/INPUT/${inc_file}" done fi # if [[ "${RERUN}" == "YES" ]]; then @@ -401,15 +388,13 @@ WW3_postdet() { export WW3_restart_from_binary=false seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds local ww3_restart_dest_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" - ${NCP} "${ww3_netcdf_restart_file}" "${DATA}/${ww3_restart_dest_file}" \ - || ( echo "FATAL ERROR: Unable to copy netcdf WW3 IC, ABORT!"; exit 1 ) + cpreq "${ww3_netcdf_restart_file}" "${DATA}/${ww3_restart_dest_file}" elif [[ -s "${ww3_binary_restart_file}" ]]; then # found binary ww3 restart file export WW3_restart_from_binary=true seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds local ww3_restart_dest_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}" - ${NCP} "${ww3_binary_restart_file}" "${DATA}/${ww3_restart_dest_file}" \ - || ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 ) + cpreq "${ww3_binary_restart_file}" "${DATA}/${ww3_restart_dest_file}" else if [[ "${RERUN}" == "YES" ]] || [[ -f "${DATA}/ufs.cpld.cpl.r.nc" ]]; then # In the case of a RERUN, the WW3 restart file is required @@ -543,15 +528,13 @@ MOM6_postdet() { fi # Copy MOM6 ICs - ${NCP} "${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.MOM.res.nc" "${DATA}/INPUT/MOM.res.nc" \ - || ( echo "FATAL ERROR: Unable to copy MOM6 IC, ABORT!"; exit 1 ) + cpreq "${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.MOM.res.nc" "${DATA}/INPUT/MOM.res.nc" case ${OCNRES} in "025") local nn for (( nn = 1; nn <= 4; nn++ )); do if [[ -f "${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.MOM.res_${nn}.nc" ]]; then - ${NCP} "${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.MOM.res_${nn}.nc" "${DATA}/INPUT/MOM.res_${nn}.nc" \ - || ( echo "FATAL ERROR: Unable to copy MOM6 IC, ABORT!"; exit 1 ) + cpreq "${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.MOM.res_${nn}.nc" "${DATA}/INPUT/MOM.res_${nn}.nc" fi done ;; @@ -561,13 +544,11 @@ MOM6_postdet() { # Copy increment (only when RERUN=NO) if [[ "${RERUN}" == "NO" ]]; then if [[ "${DO_JEDIOCNVAR:-NO}" == "YES" ]]; then - ${NCP} "${COMIN_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc" \ - || ( echo "FATAL ERROR: Unable to copy MOM6 increment, ABORT!"; exit 1 ) + cpreq "${COMIN_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc" fi if (( MEMBER > 0 )) && [[ "${ODA_INCUPD:-False}" == "True" ]]; then - ${NCP} "${COMIN_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc" \ - || ( echo "FATAL ERROR: Unable to copy ensemble MOM6 increment, ABORT!"; exit 1 ) + cpreq "${COMIN_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc" fi fi # if [[ "${RERUN}" == "NO" ]]; then @@ -708,8 +689,7 @@ CICE_postdet() { fi # Copy CICE ICs - ${NCP} "${cice_restart_file}" "${DATA}/cice_model.res.nc" \ - || ( echo "FATAL ERROR: Unable to copy CICE IC, ABORT!"; exit 1 ) + cpreq "${cice_restart_file}" "${DATA}/cice_model.res.nc" # Link iceh_ic file to COM. This is the initial condition file from CICE (f000) # TODO: Is this file needed in COM? Is this going to be used for generating any products? @@ -878,8 +858,7 @@ CMEPS_postdet() { # Copy CMEPS restarts if [[ -f "${cmeps_restart_file}" ]]; then - ${NCP} "${cmeps_restart_file}" "${DATA}/ufs.cpld.cpl.r.nc" \ - || ( echo "FATAL ERROR: Unable to copy CMEPS restarts, ABORT!"; exit 1 ) + cpreq "${cmeps_restart_file}" "${DATA}/ufs.cpld.cpl.r.nc" rm -f "${DATA}/rpointer.cpl" touch "${DATA}/rpointer.cpl" echo "ufs.cpld.cpl.r.nc" >> "${DATA}/rpointer.cpl" diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 7bf3fcdc411..27d0394be1e 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -130,7 +130,12 @@ common_predet(){ if [[ ! -d "${COMOUT_CONF}" ]]; then mkdir -p "${COMOUT_CONF}"; fi - cd "${DATA}" || ( echo "FATAL ERROR: Unable to 'cd ${DATA}', ABORT!"; exit 8 ) + cd "${DATA}" && true + err=$? + if [[ ${err} -ne 0 ]]; then + echo "FATAL ERROR: Unable to 'cd ${DATA}', ABORT!" + exit 1 + fi # Several model components share DATA/INPUT for input data if [[ ! -d "${DATA}/INPUT" ]]; then mkdir -p "${DATA}/INPUT"; fi @@ -487,12 +492,7 @@ FV3_predet(){ # NoahMP table local noahmptablefile="${PARMgfs}/ufs/noahmptable.tbl" - if [[ ! -f "${noahmptablefile}" ]]; then - echo "FATAL ERROR: missing noahmp table file '${noahmptablefile}'" - exit 1 - else - ${NCP} "${noahmptablefile}" "${DATA}/noahmptable.tbl" - fi + cpreq "${noahmptablefile}" "${DATA}/noahmptable.tbl" # Thompson microphysics fix files if (( imp_physics == 8 )); then @@ -623,8 +623,7 @@ WW3_predet(){ # Copy mod_def files for wave grids local ww3_grid #if shel, only 1 waveGRD which is linked to mod_def.ww3 - ${NCP} "${COMIN_WAVE_PREP}/${RUN}.wave.t${cyc}z.mod_def.${waveGRD}.bin" "${DATA}/mod_def.ww3" \ - || ( echo "FATAL ERROR: Failed to copy '${RUN}.wave.t${cyc}z.mod_def.${waveGRD}.bin' from '${COMIN_WAVE_PREP}'"; exit 1 ) + cpreq "${COMIN_WAVE_PREP}/${RUN}.wave.t${cyc}z.mod_def.${waveGRD}.bin" "${DATA}/mod_def.ww3" if [[ "${WW3ICEINP}" == "YES" ]]; then local wavicefile="${COMIN_WAVE_PREP}/${RUN}wave.${WAVEICE_FID}.t${current_cycle:8:2}z.ice" @@ -632,8 +631,7 @@ WW3_predet(){ echo "FATAL ERROR: WW3ICEINP='${WW3ICEINP}', but missing ice file '${wavicefile}', ABORT!" exit 1 fi - ${NCP} "${wavicefile}" "${DATA}/ice.${WAVEICE_FID}" \ - || ( echo "FATAL ERROR: Unable to copy '${wavicefile}', ABORT!"; exit 1 ) + cpreq "${wavicefile}" "${DATA}/ice.${WAVEICE_FID}" fi if [[ "${WW3CURINP}" == "YES" ]]; then @@ -642,8 +640,7 @@ WW3_predet(){ echo "FATAL ERROR: WW3CURINP='${WW3CURINP}', but missing current file '${wavcurfile}', ABORT!" exit 1 fi - ${NCP} "${wavcurfile}" "${DATA}/current.${WAVECUR_FID}" \ - || ( echo "FATAL ERROR: Unable to copy '${wavcurfile}', ABORT!"; exit 1 ) + cpreq "${wavcurfile}" "${DATA}/current.${WAVECUR_FID}" fi # Fix files @@ -717,10 +714,11 @@ MOM6_predet(){ # Copy coupled grid_spec local spec_file spec_file="${FIXgfs}/cpl/a${CASE}o${OCNRES}/grid_spec.nc" + # Test that the file exists and is not zero-sized if [[ -s "${spec_file}" ]]; then - ${NCP} "${spec_file}" "${DATA}/INPUT/" + cpreq "${spec_file}" "${DATA}/INPUT/" else - echo "FATAL ERROR: coupled grid_spec file '${spec_file}' does not exist" + echo "FATAL ERROR: coupled grid_spec file '${spec_file}' does not exist or is size 0" exit 3 fi diff --git a/ush/gaussian_sfcanl.sh b/ush/gaussian_sfcanl.sh index 5c60cf2bc92..205ffcbcc18 100755 --- a/ush/gaussian_sfcanl.sh +++ b/ush/gaussian_sfcanl.sh @@ -100,8 +100,6 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" - CASE=${CASE:-C768} res=$(echo $CASE | cut -c2-) LONB_CASE=$((res*4)) diff --git a/ush/getdump.sh b/ush/getdump.sh index 12deb725e10..da9e19d33d8 100755 --- a/ush/getdump.sh +++ b/ush/getdump.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - COMPONENT=${COMPONENT:-atmos} CDATE=${1:-""} diff --git a/ush/getges.sh b/ush/getges.sh index d4a0bb1f49b..1fc8eca5fc9 100755 --- a/ush/getges.sh +++ b/ush/getges.sh @@ -76,8 +76,6 @@ ################################################################################ #------------------------------------------------------------------------------- -source "${USHgfs}/preamble.sh" - # Set some default parameters. fhbeg=03 # hour to begin searching backward for guess fhinc=03 # hour to increment backward in search diff --git a/ush/gfs_bfr2gpk.sh b/ush/gfs_bfr2gpk.sh index dbd8defb0e0..edef0a54a6c 100755 --- a/ush/gfs_bfr2gpk.sh +++ b/ush/gfs_bfr2gpk.sh @@ -10,7 +10,6 @@ # Log: # # K. Brill/HPC 04/12/05 # ######################################################################### -source "${USHgfs}/preamble.sh" # Set GEMPAK paths. diff --git a/ush/gfs_bufr.sh b/ush/gfs_bufr.sh index 14b95403082..3367468a8c7 100755 --- a/ush/gfs_bufr.sh +++ b/ush/gfs_bufr.sh @@ -22,8 +22,6 @@ # echo "History: February 2003 - First implementation of this utility script" # -source "${USHgfs}/preamble.sh" - fhr="${1}" fhr_p="${2}" FINT="${3}" diff --git a/ush/gfs_bufr_netcdf.sh b/ush/gfs_bufr_netcdf.sh index f03ff3b9af7..48a438ceefa 100755 --- a/ush/gfs_bufr_netcdf.sh +++ b/ush/gfs_bufr_netcdf.sh @@ -19,7 +19,6 @@ # 2019-10-10 Guang Ping Lou: Read in NetCDF files # echo "History: February 2003 - First implementation of this utility script" # -source "${USHgfs}/preamble.sh" if test "$F00FLAG" = "YES" then diff --git a/ush/gfs_sndp.sh b/ush/gfs_sndp.sh index ade49eec36a..abcd1f8542b 100755 --- a/ush/gfs_sndp.sh +++ b/ush/gfs_sndp.sh @@ -7,8 +7,6 @@ # 1) 2004-09-10 Steve Gilbert First Implementation ################################################################ -source "${USHgfs}/preamble.sh" - # Create "collectives" consisting of groupings of the soundings # into files designated by geographical region. Each input # file gfs_collective*.list (1-9) contains the list of stations to diff --git a/ush/gfs_truncate_enkf.sh b/ush/gfs_truncate_enkf.sh index 6102ada75db..7225b4e5925 100755 --- a/ush/gfs_truncate_enkf.sh +++ b/ush/gfs_truncate_enkf.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - member=$1 export SIGINP=$2 export SIGOUT=$3 diff --git a/ush/global_savefits.sh b/ush/global_savefits.sh index 973d27a3588..06e10ec6c82 100755 --- a/ush/global_savefits.sh +++ b/ush/global_savefits.sh @@ -3,7 +3,6 @@ ######################################################## # save fit and horiz files for all analysis cycles ######################################################## -source "${USHgfs}/preamble.sh" export FIT_DIR=${FIT_DIR:-$COMOUT/fits} export HORZ_DIR=${HORZ_DIR:-$COMOUT/horiz} diff --git a/ush/interp_atmos_master.sh b/ush/interp_atmos_master.sh index 3a3edc470b1..7034739bc34 100755 --- a/ush/interp_atmos_master.sh +++ b/ush/interp_atmos_master.sh @@ -4,8 +4,6 @@ # Generate 0.25 / 0.5 / 1 degree interpolated grib2 files for each input grib2 file # trim's RH and tweaks sea-ice cover -source "${USHgfs}/preamble.sh" - input_file=${1:-"pgb2file_in"} # Input pressure grib2 file output_file_prefix=${2:-"pgb2file_out"} # Prefix for output grib2 file; the prefix is appended by resolution e.g. _0p25 grid_string=${3:-"0p25"} # Target grids; e.g. "0p25" or "0p25:0p50"; If multiple, they need to be ":" seperated diff --git a/ush/interp_atmos_sflux.sh b/ush/interp_atmos_sflux.sh index cdf748f6662..42859c1d2ea 100755 --- a/ush/interp_atmos_sflux.sh +++ b/ush/interp_atmos_sflux.sh @@ -3,8 +3,6 @@ # This script takes in a master flux file and creates interpolated flux files at various interpolated resolutions # Generate 0.25 / 0.5 / 1 degree interpolated grib2 flux files for each input sflux grib2 file -source "${USHgfs}/preamble.sh" - input_file=${1:-"sfluxfile_in"} # Input sflux grib2 file output_file_prefix=${2:-"sfluxfile_out"} # Prefix for output sflux grib2 file; the prefix is appended by resolution e.g. _0p25 grid_string=${3:-"1p00"} # Target grids; e.g. "0p25" or "0p25:0p50"; If multiple, they need to be ":" seperated diff --git a/ush/jjob_header.sh b/ush/jjob_header.sh index dc75437f1a2..3c5f85adc80 100755 --- a/ush/jjob_header.sh +++ b/ush/jjob_header.sh @@ -40,26 +40,29 @@ # - $pid : Override the default process id # [default: $$] +_calling_script="${BASH_SOURCE[1]}" +source "${HOMEgfs}/ush/preamble.sh" + OPTIND=1 while getopts "c:e:" option; do case "${option}" in c) read -ra configs <<< "${OPTARG}" ;; e) env_job=${OPTARG} ;; :) - echo "FATAL [${BASH_SOURCE[0]}]: ${option} requires an argument" - exit 1 + export err=1 + err_chk "FATAL ERROR: [${BASH_SOURCE[0]}]: ${option} requires an argument" ;; *) - echo "FATAL [${BASH_SOURCE[0]}]: Unrecognized option: ${option}" - exit 1 + export err=1 + err_chk "FATAL ERROR: [${BASH_SOURCE[0]}]: Unrecognized option: ${option}" ;; esac done shift $((OPTIND-1)) if [[ -z ${env_job} ]]; then - echo "FATAL [${BASH_SOURCE[0]}]: Must specify a job name with -e" - exit 1 + export err=1 + err_chk "FATAL ERROR: [${BASH_SOURCE[0]}]: Must specify a job name with -e" fi ############################################## @@ -70,15 +73,18 @@ if [[ ${WIPE_DATA:-YES} == "YES" ]]; then rm -rf "${DATA}" fi mkdir -p "${DATA}" -cd "${DATA}" || ( echo "FATAL [${BASH_SOURCE[0]}]: ${DATA} does not exist"; exit 1 ) +if ! cd "${DATA}"; then + export err=1 + err_chk "FATAL ERROR: [${BASH_SOURCE[0]}]: ${DATA} does not exist" +fi ############################################## # Run setpdy and initialize PDY variables ############################################## export cycle="t${cyc}z" -setpdy.sh -source ./PDY +setpdy.sh || true +source ./PDY || true ############################################## @@ -87,6 +93,9 @@ source ./PDY export pid="${pid:-$$}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile +# TODO: remove this when going to production +# Needs to be set for err_chk/err_exit +export pgm=${pgm:-} ############################# @@ -94,21 +103,15 @@ export pgmerr=errfile ############################# export EXPDIR="${EXPDIR:-${HOMEgfs}/parm/config}" for config in "${configs[@]:-''}"; do - source "${EXPDIR}/config.${config}" - status=$? - if (( status != 0 )); then - echo "FATAL [${BASH_SOURCE[0]}]: Unable to load config config.${config}" - exit "${status}" - fi + source "${EXPDIR}/config.${config}" && true + export err=$? + err_chk "FATAL ERROR [${BASH_SOURCE[0]}]: Unable to load config config.${config}" done ########################################## # Source machine runtime environment ########################################## -source "${HOMEgfs}/env/${machine}.env" "${env_job}" -status=$? -if (( status != 0 )); then - echo "FATAL [${BASH_SOURCE[0]}]: Error while sourcing machine environment ${machine}.env for job ${env_job}" - exit "${status}" -fi +source "${HOMEgfs}/env/${machine}.env" "${env_job}" && true +export err=$? +err_chk "FATAL ERROR: [${BASH_SOURCE[0]}]: Error while sourcing machine environment ${machine}.env for job ${env_job}" diff --git a/ush/link_crtm_fix.sh b/ush/link_crtm_fix.sh index fae1e4b7172..7a3654b8405 100755 --- a/ush/link_crtm_fix.sh +++ b/ush/link_crtm_fix.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - # Get CRTM fix directory from (in this order): # 1. First argument to script, or # 2. $CRTM_FIX environment variable, or diff --git a/ush/load_fv3gfs_modules.sh b/ush/load_fv3gfs_modules.sh index 93098322c41..e8807d1cdf8 100755 --- a/ush/load_fv3gfs_modules.sh +++ b/ush/load_fv3gfs_modules.sh @@ -1,6 +1,12 @@ #! /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 @@ -30,6 +36,14 @@ 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 + # Add wxflow to PYTHONPATH wxflowPATH="${HOMEgfs}/ush/python" PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush:${wxflowPATH}" @@ -38,9 +52,3 @@ 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/ush/load_ufsda_modules.sh b/ush/load_ufsda_modules.sh index 3af843f8fe9..e66a1b16a4c 100755 --- a/ush/load_ufsda_modules.sh +++ b/ush/load_ufsda_modules.sh @@ -1,6 +1,12 @@ #! /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 @@ -57,6 +63,14 @@ case "${MACHINE_ID}" in 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 # Add wxflow to PYTHONPATH @@ -67,5 +81,3 @@ export PYTHONPATH # Restore stack soft limit: ulimit -S -s "${ulimit_s}" unset ulimit_s - -set_trace diff --git a/ush/make_tif.sh b/ush/make_tif.sh index 633c4ded0cc..7cd1f1d505d 100755 --- a/ush/make_tif.sh +++ b/ush/make_tif.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" - cd "${DATA}" || exit 2 outname=out.tif diff --git a/ush/month_name.sh b/ush/month_name.sh index 463e4a08be1..02af45149d7 100755 --- a/ush/month_name.sh +++ b/ush/month_name.sh @@ -36,7 +36,6 @@ # #################################################################### - typeset -Z2 month_num diff --git a/ush/ocnice_extractvars.sh b/ush/ocnice_extractvars.sh index fc904f87b7b..96f6558d07b 100755 --- a/ush/ocnice_extractvars.sh +++ b/ush/ocnice_extractvars.sh @@ -10,8 +10,6 @@ # Main body starts here ####################### -source "${USHgfs}/preamble.sh" - subdata=${1} varlist=${2} datares=${3} diff --git a/ush/ozn_xtrct.sh b/ush/ozn_xtrct.sh index 0c623bf03c3..a0aa90da56c 100755 --- a/ush/ozn_xtrct.sh +++ b/ush/ozn_xtrct.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - #------------------------------------------------------------------ # ozn_xtrct.sh # diff --git a/ush/preamble.sh b/ush/preamble.sh index 08d7659ad1b..ffd83f1e15f 100755 --- a/ush/preamble.sh +++ b/ush/preamble.sh @@ -6,38 +6,30 @@ # crude script timing and provides a postamble that runs on exit. # # Syntax: -# preamble.sh [id] +# preamble.sh # -# Aruguments: -# id: Optional identifier string. Use when running the same script -# multiple times in the same job (e.g. MPMD) -# # Input environment variables: # TRACE (YES/NO): Whether to echo every command (set -x) [default: "YES"] # STRICT (YES/NO): Whether to exit immediately on error or undefined variable # (set -eu) [default: "YES"] # POSTAMBLE_CMD (empty/set): A command to run at the end of the job # [default: empty] +# _calling_script: The name of the calling script (optional) # ####### set +x -if (( $# > 0 )); then - id="(${1})" -else - id="" -fi # Record the start time so we can calculate the elapsed time later start_time=$(date +%s) # Get the base name of the calling script -_calling_script=$(basename "${BASH_SOURCE[1]}") +_calling_script=${_calling_script:-$(basename "${BASH_SOURCE[1]}")} # Announce the script has begun start_time_human=$(date -d"@${start_time}" -u) echo "Begin ${_calling_script} at ${start_time_human}" -declare -rx PS4='+ $(basename ${BASH_SOURCE[0]:-${FUNCNAME[0]:-"Unknown"}})[${LINENO}]'"${id}: " +declare -x PS4='+ $(basename ${BASH_SOURCE[0]:-${FUNCNAME[0]:-"Unknown"}})[${LINENO}]' set_strict() { if [[ ${STRICT:-"YES"} == "YES" ]]; then @@ -101,6 +93,81 @@ postamble() { exit "${rc}" } +# TODO: Remove this when moving to operations +function err_exit() { + # Taken from NCO prod_util v2.1.0 + # SCRIPT NAME: err_exit + # + # ABSTRACT: This script is to be used when a fatal error or condition + # has been reached and you want to terminate the job. + # + # USAGE: To use this script one must export the following variables to the + # script: jobid, SENDECF, pgm, pgmout, DATA. One can provide + # a message for the logfile by passing it to the script as an argument. + + # Do not fail in err_exit + set +eux + + msg1=${*:-Job ${jobid} failed} + if [[ -n "${pgm}" ]]; then + msg1+=", ERROR IN ${pgm}" + fi + if [[ -n "${err}" ]]; then + msg1+=" RETURN CODE ${err}" + fi + + msg2=" + ------------------------------------------------------------- + -- FATAL ERROR: ${msg1} + -- ABNORMAL EXIT at $(date) on ${HOSTNAME} + ------------------------------------------------------------- + " + + >&2 echo "${msg2}" + + # list loaded modules + module list + >&2 echo "" + + >&2 echo "${msg1}" + + # list files in temporary working directory + if [[ -n "${DATA}" ]]; then + >&2 echo "${DATA}" + >&2 ls -ltr "${DATA}" + else + >&2 echo "WARNING: DATA variable not defined" + fi + + # save standard output + if [[ -n "${pgmout}" ]]; then + if [[ -s errfile ]]; then + echo "----- contents of errfile -----" >> "${pgmout}" + cat errfile >> "${pgmout}" + fi + >&2 cat "${pgmout}" + elif [[ -s errfile ]]; then + >&2 cat errfile + fi + + # Write to ecflow log: + if [[ "${SENDECF}" = "YES" ]]; then + timeout 30 ecflow_client --msg "${ECF_NAME}: ${msg1}" + timeout 30 ssh "${ECF_HOST}" "echo \"${msg}2\" >> ${ECF_JOBOUT:?}" + fi + + # KILL THE JOB: + if [[ "${SENDECF}" = "YES" ]]; then + ecflow_client --kill="${ECF_NAME:?}" + fi + + if [[ -n "${PBS_JOBID}" ]]; then + qdel "${PBS_JOBID}" + elif [[ -n "${SLURM_JOB_ID}" ]]; then + scancel "${SLURM_JOB_ID}" + fi +} + # Place the postamble in a trap so it is always called no matter how the script exits # Shellcheck: Turn off warning about substitions at runtime instead of signal time # shellcheck disable=SC2064 @@ -110,5 +177,10 @@ trap "postamble ${_calling_script} ${start_time} \$?" EXIT source "${HOMEgfs}/ush/bash_utils.sh" # Turn on our settings +export SHELLOPTS +declare -xf set_strict +declare -xf set_trace +declare -xf postamble +declare -xf err_exit set_strict set_trace diff --git a/ush/radmon_diag_ck.sh b/ush/radmon_diag_ck.sh index 8c4f54bba55..ca9129b6df4 100755 --- a/ush/radmon_diag_ck.sh +++ b/ush/radmon_diag_ck.sh @@ -87,7 +87,7 @@ echo "--> radmon_diag_ck.sh" # report anything missing # for sat in ${satype_contents}; do - content_count=$(echo "${radstat_contents}" | grep -c "${sat}") + content_count=$(echo "${radstat_contents}" | grep -c "${sat}" || true) if (( content_count <= 0 )); then missing_diag="${missing_diag} ${sat}" diff --git a/ush/radmon_err_rpt.sh b/ush/radmon_err_rpt.sh index c3d251d5cdb..c288f5f3518 100755 --- a/ush/radmon_err_rpt.sh +++ b/ush/radmon_err_rpt.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/ush/radmon_verf_angle.sh b/ush/radmon_verf_angle.sh index 3dff2a6f98d..0f98d7c18df 100755 --- a/ush/radmon_verf_angle.sh +++ b/ush/radmon_verf_angle.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/ush/radmon_verf_bcoef.sh b/ush/radmon_verf_bcoef.sh index 4274436154b..67f213d788e 100755 --- a/ush/radmon_verf_bcoef.sh +++ b/ush/radmon_verf_bcoef.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/ush/radmon_verf_bcor.sh b/ush/radmon_verf_bcor.sh index ea0a7842e62..7cf6cc66e52 100755 --- a/ush/radmon_verf_bcor.sh +++ b/ush/radmon_verf_bcor.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/ush/radmon_verf_time.sh b/ush/radmon_verf_time.sh index 0e935826ddc..b763055bbf8 100755 --- a/ush/radmon_verf_time.sh +++ b/ush/radmon_verf_time.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - ################################################################################ #### UNIX Script Documentation Block # . . diff --git a/ush/regrid_gsiSfcIncr_to_tile.sh b/ush/regrid_gsiSfcIncr_to_tile.sh index 0e28c77c514..1d8254e2e65 100755 --- a/ush/regrid_gsiSfcIncr_to_tile.sh +++ b/ush/regrid_gsiSfcIncr_to_tile.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - #------------------------------------------------------------------------------------------------- # Script to regrid surface increment from GSI grid # to fv3 tiles. diff --git a/ush/rstprod.sh b/ush/rstprod.sh index b48a6817e06..8370c79fa8c 100755 --- a/ush/rstprod.sh +++ b/ush/rstprod.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -source "${USHgfs}/preamble.sh" - #--------------------------------------------------------- # rstprod.sh # diff --git a/ush/syndat_getjtbul.sh b/ush/syndat_getjtbul.sh index 6596c6ef96e..3a20da2c97e 100755 --- a/ush/syndat_getjtbul.sh +++ b/ush/syndat_getjtbul.sh @@ -21,8 +21,6 @@ # TANK_TROPCY - path to home directory containing tropical cyclone record # data base -source "${USHgfs}/preamble.sh" - cd $DATA if [ "$#" -ne '1' ]; then diff --git a/ush/syndat_qctropcy.sh b/ush/syndat_qctropcy.sh index 8ec8f70b14f..d84172a9815 100755 --- a/ush/syndat_qctropcy.sh +++ b/ush/syndat_qctropcy.sh @@ -63,8 +63,6 @@ # (Default: not set) # TIMEIT - optional time and resource reporting (Default: not set) -source "${USHgfs}/preamble.sh" - ARCHSYND=${ARCHSYND:-$COMROOTp3/gfs/prod/syndat} HOMENHC=${HOMENHC:-/gpfs/dell2/nhc/save/guidance/storm-data/ncep} TANK_TROPCY=${TANK_TROPCY:-${DCOMROOT}/us007003} diff --git a/ush/tropcy_relocate.sh b/ush/tropcy_relocate.sh index 8c64a724540..43657225ea4 100755 --- a/ush/tropcy_relocate.sh +++ b/ush/tropcy_relocate.sh @@ -183,8 +183,6 @@ # #### -source "${USHgfs}/preamble.sh" - MACHINE=${MACHINE:-$(hostname -s | cut -c 1-3)} export OPSROOT=${OPSROOT:-/lfs/h1/ops/prod} diff --git a/ush/tropcy_relocate_extrkr.sh b/ush/tropcy_relocate_extrkr.sh index 18e0851368d..bd64479283f 100755 --- a/ush/tropcy_relocate_extrkr.sh +++ b/ush/tropcy_relocate_extrkr.sh @@ -3,8 +3,6 @@ # This script is executed by the script tropcy_relocate.sh # -------------------------------------------------------- -source "${USHgfs}/preamble.sh" - export machine=${machine:-ZEUS} export machine=$(echo $machine|tr '[a-z]' '[A-Z]') #if [ $machine = ZEUS ] ; then diff --git a/ush/wave_extractvars.sh b/ush/wave_extractvars.sh index 39779cd4f96..243415073e0 100755 --- a/ush/wave_extractvars.sh +++ b/ush/wave_extractvars.sh @@ -9,7 +9,6 @@ # Main body starts here ####################### -source "${USHgfs}/preamble.sh" source "${USHgfs}/wave_domain_grid.sh" process_grdID "${waveGRD}" diff --git a/ush/wave_grib2_sbs.sh b/ush/wave_grib2_sbs.sh index 85f5e1f1452..060afab0902 100755 --- a/ush/wave_grib2_sbs.sh +++ b/ush/wave_grib2_sbs.sh @@ -25,7 +25,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" # Script inputs grdID=$1 diff --git a/ush/wave_grid_interp_sbs.sh b/ush/wave_grid_interp_sbs.sh index de9465f6fff..f227054d692 100755 --- a/ush/wave_grid_interp_sbs.sh +++ b/ush/wave_grid_interp_sbs.sh @@ -20,7 +20,7 @@ # ################################################################################ -source "${USHgfs}/preamble.sh" +# 0.a Basic modes of operation grdID=$1 valid_time=$2 diff --git a/ush/wave_grid_moddef.sh b/ush/wave_grid_moddef.sh index 9ad134a8a61..5caf20c6eaa 100755 --- a/ush/wave_grid_moddef.sh +++ b/ush/wave_grid_moddef.sh @@ -20,8 +20,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation grdID=${1?Must provide grdID} diff --git a/ush/wave_outp_cat.sh b/ush/wave_outp_cat.sh index 6ce3ce06cf3..b8cde0d1ec9 100755 --- a/ush/wave_outp_cat.sh +++ b/ush/wave_outp_cat.sh @@ -21,8 +21,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation bloc=$1 MAXHOUR=$2 diff --git a/ush/wave_outp_spec.sh b/ush/wave_outp_spec.sh index 929979bbf9f..12c79ee4974 100755 --- a/ush/wave_outp_spec.sh +++ b/ush/wave_outp_spec.sh @@ -22,8 +22,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation bloc=$1 ymdh=$2 diff --git a/ush/wave_prnc_cur.sh b/ush/wave_prnc_cur.sh index 2315d483c61..e3743151a55 100755 --- a/ush/wave_prnc_cur.sh +++ b/ush/wave_prnc_cur.sh @@ -22,8 +22,6 @@ ################################################################################ # -source "${USHgfs}/preamble.sh" - ymdh_rtofs=$1 curfile=$2 fhr=$3 diff --git a/ush/wave_prnc_ice.sh b/ush/wave_prnc_ice.sh index d812bccd104..434997c7ed0 100755 --- a/ush/wave_prnc_ice.sh +++ b/ush/wave_prnc_ice.sh @@ -27,8 +27,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation cd $DATA diff --git a/ush/wave_tar.sh b/ush/wave_tar.sh index f74b2a40343..dc407d0f63a 100755 --- a/ush/wave_tar.sh +++ b/ush/wave_tar.sh @@ -25,8 +25,6 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${USHgfs}/preamble.sh" - # 0.a Basic modes of operation cd "${DATA}" From 02f01153f3164ec5a32079116d50d4928680e83e Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 3 Apr 2025 15:49:33 -0400 Subject: [PATCH 2/9] Initial stab at err_chk-ing GSI jobs --- jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 9 +++------ jobs/JGDAS_ATMOS_CHGRES_FORENKF | 9 +++------ jobs/JGDAS_ATMOS_VERFOZN | 9 +++------ jobs/JGDAS_ATMOS_VERFRAD | 8 +++----- jobs/JGDAS_ENKF_DIAG | 13 +++++-------- jobs/JGDAS_ENKF_ECEN | 9 +++------ jobs/JGDAS_ENKF_POST | 9 +++------ jobs/JGDAS_ENKF_SELECT_OBS | 27 ++++++++++++-------------- jobs/JGDAS_ENKF_SFC | 9 +++------ jobs/JGDAS_ENKF_UPDATE | 9 +++------ jobs/JGLOBAL_ATMOS_ANALYSIS | 26 ++++++++++--------------- jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 22 ++++++++------------- jobs/JGLOBAL_ATMOS_SFCANL | 9 +++------ jobs/JGLOBAL_ATMOS_VMINMON | 8 +++----- scripts/exgdas_atmos_chgres_forenkf.sh | 4 ++-- scripts/exgdas_atmos_verfozn.sh | 12 ++++++------ scripts/exgdas_atmos_verfrad.sh | 18 ++++++++--------- scripts/exgdas_enkf_ecen.sh | 9 +++++++-- scripts/exgdas_enkf_post.sh | 12 ++++++------ scripts/exgdas_enkf_sfc.sh | 4 ++-- scripts/exgdas_enkf_update.sh | 6 +++--- 21 files changed, 99 insertions(+), 142 deletions(-) diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index 2733c30ce6b..70013e5e1af 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -32,12 +32,9 @@ mkdir -m 775 -p "${COMOUT_ATMOS_ANALYSIS}" ############################################################### # Run relevant script -${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 4e028420894..7e24b333153 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -21,12 +21,9 @@ MEMDIR="mem001" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_HISTORY_MEM ############################################################### # Run relevant script -${CHGRESFCSTSH:-${SCRgfs}/exgdas_atmos_chgres_forenkf.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${CHGRESFCSTSH:-${SCRgfs}/exgdas_atmos_chgres_forenkf.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index 0a9b92eaefe..87bb29e4b43 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -29,12 +29,9 @@ if [[ ! -d ${TANKverf_ozn} ]]; then mkdir -p ${TANKverf_ozn} ; fi #------------------------------------------------------- # Execute the script. # -"${SCRgfs}/exgdas_atmos_verfozn.sh" -err=$? -if (( err != 0 )); then - exit "${err}" -fi - +"${SCRgfs}/exgdas_atmos_verfozn.sh" && true +export err=$? +err_chk ################################ # Remove the Working Directory diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index ac18460a193..43faa5cae87 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -33,11 +33,9 @@ if [[ ! -d ${TANKverf_rad} ]]; then mkdir -p ${TANKverf_rad} ; fi ######################################################## # Execute the script. -"${SCRgfs}/exgdas_atmos_verfrad.sh" -err=$? -if (( err != 0 )); then - exit "${err}" -fi +"${SCRgfs}/exgdas_atmos_verfrad.sh" && true +export err=$? +err_chk ################################ # Remove the Working Directory diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index aa3eb1ddfea..1c2bf151fe7 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -44,8 +44,8 @@ MEMDIR="ensstat" RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.ensmean.nc" if [ ! -f ${ATMGES_ENSMEAN} ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" - exit 1 + export err=1 + err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" fi # Link observational data @@ -99,12 +99,9 @@ done ############################################################### # Run relevant script -${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index b3f5c03203b..57c676ad813 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -40,12 +40,9 @@ MEMDIR="ensstat" RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ ############################################################### # Run relevant script -${ENKFRECENSH:-${SCRgfs}/exgdas_enkf_ecen.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ENKFRECENSH:-${SCRgfs}/exgdas_enkf_ecen.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 244566ac5b3..0cf3dc0d1dc 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -21,12 +21,9 @@ export LEVS=$((LEVS-1)) ############################################################### # Run relevant script -${ENKFPOSTSH:-${SCRgfs}/exgdas_enkf_post.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ENKFPOSTSH:-${SCRgfs}/exgdas_enkf_post.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index aa82d53eae5..ec991c1c411 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -51,18 +51,18 @@ mkdir -p "${COMOUT_ATMOS_ANALYSIS}" export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006${GSUFFIX}" if [[ ! -f ${ATMGES_ENSMEAN} ]]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" - exit 1 + export err=1 + err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" fi -# Ignore masking of chained commands and possible misspelling warning -# shellcheck disable=SC2153,SC2312 +set +eu +set -o pipefail LEVS=$(${NCDUMP} -h "${ATMGES_ENSMEAN}" | grep -i "pfull" | head -1 | awk -F" = " '{print $2}' | awk -F" " '{print $1}') # get LEVS -# shellcheck disable= -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi +export err=$? +err_chk +set +o pipefail +set_strict + export LEVS # Link observational data @@ -121,12 +121,9 @@ done ############################################################### # Run relevant script -${INVOBSSH:-${SCRgfs}/exgdas_enkf_select_obs.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${INVOBSSH:-${SCRgfs}/exgdas_enkf_select_obs.sh} && true +export err=$? +err_chk ############################################## # Send Alerts diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index f0ddc93429e..a81453b8f90 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -42,12 +42,9 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ ############################################################### # Run relevant script -${ENKFRESFCSH:-${SCRgfs}/exgdas_enkf_sfc.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ENKFRESFCSH:-${SCRgfs}/exgdas_enkf_sfc.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index 24faf5469fb..56a0260e1a9 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -36,12 +36,9 @@ MEMDIR="ensstat" RUN="enkfgdas" YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ ############################################################### # Run relevant script -${ENKFUPDSH:-${SCRgfs}/exgdas_enkf_update.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ENKFUPDSH:-${SCRgfs}/exgdas_enkf_update.sh} && true +export err=$? +err_chk ############################################## # Send Alerts diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index e015ae131f8..8d9212dd805 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -45,23 +45,20 @@ mkdir -p "${COMOUT_ATMOS_ANALYSIS}" export ATMGES="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.nc" if [ ! -f ${ATMGES} ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" - exit 1 + export err=1 + err_chk "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" fi # Get LEVS -export LEVS=$(${NCLEN} ${ATMGES} pfull) -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +export LEVS=$(${NCLEN} ${ATMGES} pfull) && true +export err=$? +err_chk if [ ${DOHYBVAR} = "YES" ]; then export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_ENS_PREV}/${GPREFIX_ENS}atmf006.ensmean.nc" if [ ! -f ${ATMGES_ENSMEAN} ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" - exit 2 + export err=2 + err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" fi fi @@ -89,12 +86,9 @@ fi ############################################################### # Run relevant script -${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh} && true +export err=$? +err_chk ############################################## # Send Alerts diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index 255e29774a4..d72c4ecc92b 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -41,17 +41,14 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ export ATMGES="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.nc" if [ ! -f ${ATMGES} ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" - exit 1 + export err=1 + err_chk "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" fi # Get LEVS -export LEVS=$(${NCLEN} ${ATMGES} pfull) -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +export LEVS=$(${NCLEN} ${ATMGES} pfull) && true +export err=$? +err_chk # Generate Gaussian surface analysis # TODO: Should this be removed now that sfcanl is its own job? export DOGAUSFCANL=${DOGAUSFCANL:-"YES"} @@ -60,12 +57,9 @@ export DOGAUSFCANL=${DOGAUSFCANL:-"YES"} ############################################################### # Run relevant script -${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index 33a5150040c..233f4e2f99c 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -32,12 +32,9 @@ mkdir -p "${COMOUT_ATMOS_RESTART}" ############################################################### # Run relevant script -${SFCANALSH:-${SCRgfs}/exglobal_atmos_sfcanl.sh} -err=$? -if [[ ${err} -ne 0 ]]; then - exit "${err}" -fi - +${SFCANALSH:-${SCRgfs}/exglobal_atmos_sfcanl.sh} && true +export err=$? +err_chk ############################################## # End JOB SPECIFIC work diff --git a/jobs/JGLOBAL_ATMOS_VMINMON b/jobs/JGLOBAL_ATMOS_VMINMON index 84e1014c196..da82aae2962 100755 --- a/jobs/JGLOBAL_ATMOS_VMINMON +++ b/jobs/JGLOBAL_ATMOS_VMINMON @@ -31,11 +31,9 @@ if [[ ! -d ${M_TANKverf} ]]; then mkdir -p "${M_TANKverf}" ; fi ######################################################## # Execute the script. -"${SCRgfs}/exglobal_atmos_vminmon.sh" -err=$? -if (( err != 0 )); then - exit "${err}" -fi +"${SCRgfs}/exglobal_atmos_vminmon.sh" && true +export err=$? +err_chk ################################ # Remove the Working Directory diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index b663641d99b..a78626c94ab 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -154,7 +154,7 @@ EOF export pgm=$CHGRESNCEXEC . prep_step - $APRUN_CHGRES $CHGRESNCEXEC chgres_nc_gauss0$FHR.nml + $APRUN_CHGRES $CHGRESNCEXEC chgres_nc_gauss0$FHR.nml && true export err=$?; err_chk fi done @@ -169,7 +169,7 @@ EOF export pgm=$CHGRESNCEXEC . prep_step - $APRUNCFP_CHGRES $DATA/mp_chgres.sh + $APRUNCFP_CHGRES $DATA/mp_chgres.sh && true export err=$?; err_chk fi fi diff --git a/scripts/exgdas_atmos_verfozn.sh b/scripts/exgdas_atmos_verfozn.sh index 75d6ef973e0..0928569614d 100755 --- a/scripts/exgdas_atmos_verfozn.sh +++ b/scripts/exgdas_atmos_verfozn.sh @@ -7,7 +7,7 @@ # (OznMon) DA package. # ################################################################################ -err=0 +export err=0 data_available=0 @@ -36,13 +36,13 @@ if [[ -s ${oznstat} ]]; then export OZNMON_NETCDF=${netcdf} - "${USHgfs}/ozn_xtrct.sh" - err=$? + "${USHgfs}/ozn_xtrct.sh" && true + export err=$? else # oznstat file not found - err=1 + export err=1 fi -exit ${err} - +err_chk +exit 0 diff --git a/scripts/exgdas_atmos_verfrad.sh b/scripts/exgdas_atmos_verfrad.sh index 8b8bb592b87..424f0759607 100755 --- a/scripts/exgdas_atmos_verfrad.sh +++ b/scripts/exgdas_atmos_verfrad.sh @@ -19,6 +19,9 @@ data_available=0 +# Do not exit on errors so that restricted data can be protected +set +eu + if [[ -s ${radstat} && -s ${biascr} ]]; then data_available=1 @@ -136,19 +139,13 @@ fi ##################################################################### # Postprocessing -err=0 +export err=0 if [[ ${data_available} -ne 1 ]]; then - err=1 -elif [[ ${rc_angle} -ne 0 ]]; then - err=${rc_angle} -elif [[ ${rc_bcoef} -ne 0 ]]; then - err=${rc_bcoef} -elif [[ ${rc_bcor} -ne 0 ]]; then - err=${rc_bcor} -elif [[ ${rc_time} -ne 0 ]]; then - err=${rc_time} + export err=1 fi +export err=$((err + rc_angle + rc_bcoef + rc_bcor + rc_time)) + ##################################################################### # Restrict select sensors and satellites export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} @@ -159,5 +156,6 @@ for rtype in ${rlist}; do fi done +err_chk exit ${err} diff --git a/scripts/exgdas_enkf_ecen.sh b/scripts/exgdas_enkf_ecen.sh index d662bee61e1..ce8a76ada44 100755 --- a/scripts/exgdas_enkf_ecen.sh +++ b/scripts/exgdas_enkf_ecen.sh @@ -222,8 +222,13 @@ else LEVS_ENKF=${LEVS_ENKF:-$($NCLEN atminc_ensmean lev)} # get LEVS fi JCAP_ENKF=${JCAP_ENKF:--9999} # there is no jcap in these files -[ $JCAP_ENKF -eq -9999 -a $LATB_ENKF -ne -9999 ] && JCAP_ENKF=$((LATB_ENKF-2)) -[ $LONB_ENKF -eq -9999 -o $LATB_ENKF -eq -9999 -o $LEVS_ENKF -eq -9999 -o $JCAP_ENKF -eq -9999 ] && exit -9999 +if [[ ${JCAP_ENKF} -eq -9999 && ${LATB_ENKF} -ne -9999 ]]; then + JCAP_ENKF=$((LATB_ENKF-2)) +fi +if [[ ${LONB_ENKF} -eq -9999 || ${LATB_ENKF} -eq -9999 || ${LEVS_ENKF} -eq -9999 || ${JCAP_ENKF} -eq -9999 ]]; then + export err=9 + err_chk +fi ################################################################################ # This is to give the user the option to recenter, default is YES diff --git a/scripts/exgdas_enkf_post.sh b/scripts/exgdas_enkf_post.sh index 9391608cba5..f0634c02a7f 100755 --- a/scripts/exgdas_enkf_post.sh +++ b/scripts/exgdas_enkf_post.sh @@ -109,20 +109,20 @@ rc=0 for fhr in $(seq $FHMIN $FHOUT $FHMAX); do fhrchar=$(printf %03i $fhr) - export pgm=$GETSFCENSMEANEXEC + export pgm=${GETSFCENSMEANEXEC} . prep_step - $APRUN_EPOS ${DATA}/$(basename $GETSFCENSMEANEXEC) ./ sfcf${fhrchar}.ensmean sfcf${fhrchar} $NMEM_ENS + ${APRUN_EPOS} "${DATA}/$(basename ${GETSFCENSMEANEXEC})" ./ "sfcf${fhrchar}.ensmean" "sfcf${fhrchar}" "${NMEM_ENS}" && true ra=$? rc=$((rc+ra)) - export_pgm=$GETATMENSMEANEXEC + export_pgm=${GETATMENSMEANEXEC} . prep_step if [ $ENKF_SPREAD = "YES" ]; then - $APRUN_EPOS ${DATA}/$(basename $GETATMENSMEANEXEC) ./ atmf${fhrchar}.ensmean atmf${fhrchar} $NMEM_ENS atmf${fhrchar}.ensspread + $APRUN_EPOS "${DATA}/$(basename ${GETATMENSMEANEXEC})" ./ "atmf${fhrchar}.ensmean" "atmf${fhrchar}" "${NMEM_ENS}" "atmf${fhrchar}.ensspread" && true else - $APRUN_EPOS ${DATA}/$(basename $GETATMENSMEANEXEC) ./ atmf${fhrchar}.ensmean atmf${fhrchar} $NMEM_ENS + $APRUN_EPOS "${DATA}/$(basename ${GETATMENSMEANEXEC})" ./ "atmf${fhrchar}.ensmean" "atmf${fhrchar}" "${NMEM_ENS}" && true fi ra=$? rc=$((rc+ra)) @@ -163,4 +163,4 @@ fi # Postprocessing cd $pwd -exit $err +exit ${err} diff --git a/scripts/exgdas_enkf_sfc.sh b/scripts/exgdas_enkf_sfc.sh index aeb3b24fb8b..b79b574fbb8 100755 --- a/scripts/exgdas_enkf_sfc.sh +++ b/scripts/exgdas_enkf_sfc.sh @@ -200,7 +200,7 @@ if [ $DOIAU = "YES" ]; then done # ensembles - CDATE="${PDY}${cyc}" ${CYCLESH} + CDATE="${PDY}${cyc}" ${CYCLESH} && true export err=$?; err_chk # Copy outputs from DATA to COMOUT @@ -271,7 +271,7 @@ if [[ "${DOSFCANL_ENKF}" == "YES" ]]; then fi done - CDATE="${PDY}${cyc}" ${CYCLESH} + CDATE="${PDY}${cyc}" "${CYCLESH}" && true export err=$?; err_chk # Copy outputs from DATA to COMOUT diff --git a/scripts/exgdas_enkf_update.sh b/scripts/exgdas_enkf_update.sh index 8073692fa45..9bd31e13fcf 100755 --- a/scripts/exgdas_enkf_update.sh +++ b/scripts/exgdas_enkf_update.sh @@ -259,7 +259,7 @@ if [[ $USE_CFP = "YES" ]]; then if [[ $ncmd -gt 0 ]]; then ncmd_max=$((ncmd < max_tasks_per_node ? ncmd : max_tasks_per_node)) APRUNCFP=$(eval echo $APRUNCFP) - $APRUNCFP $DATA/mp_untar.sh + $APRUNCFP $DATA/mp_untar.sh && true export err=$?; err_chk fi fi @@ -405,7 +405,7 @@ export pgm=$ENKFEXEC . prep_step $NCP $ENKFEXEC $DATA -$APRUN_ENKF ${DATA}/$(basename $ENKFEXEC) 1>stdout 2>stderr +$APRUN_ENKF "${DATA}/$(basename $ENKFEXEC)" 1>stdout 2>stderr && export err=$?; err_chk # Cat runtime output files. @@ -419,4 +419,4 @@ if [[ "${mkdata}" == "YES" ]]; then fi -exit ${err} +exit "${err}" From 170e77e5d2ef83632fa18482784e7c061a5a5a8e Mon Sep 17 00:00:00 2001 From: David Huber Date: Fri, 4 Apr 2025 11:01:15 -0400 Subject: [PATCH 3/9] Double quote err --- scripts/exgdas_atmos_verfrad.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exgdas_atmos_verfrad.sh b/scripts/exgdas_atmos_verfrad.sh index 424f0759607..d429d7444da 100755 --- a/scripts/exgdas_atmos_verfrad.sh +++ b/scripts/exgdas_atmos_verfrad.sh @@ -157,5 +157,5 @@ for rtype in ${rlist}; do done err_chk -exit ${err} +exit "${err}" From c2f3a87685cc27bc3e8621d50e30cbafabd215ee Mon Sep 17 00:00:00 2001 From: David Huber Date: Fri, 4 Apr 2025 18:45:33 +0000 Subject: [PATCH 4/9] Add missing true --- scripts/exgdas_enkf_update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/exgdas_enkf_update.sh b/scripts/exgdas_enkf_update.sh index 9bd31e13fcf..9e28ec01e72 100755 --- a/scripts/exgdas_enkf_update.sh +++ b/scripts/exgdas_enkf_update.sh @@ -405,8 +405,9 @@ export pgm=$ENKFEXEC . prep_step $NCP $ENKFEXEC $DATA -$APRUN_ENKF "${DATA}/$(basename $ENKFEXEC)" 1>stdout 2>stderr && -export err=$?; err_chk +$APRUN_ENKF "${DATA}/$(basename $ENKFEXEC)" 1>stdout 2>stderr && true +export err=$? +err_chk # Cat runtime output files. cat stdout stderr > "${COMOUT_ATMOS_ANALYSIS_STAT}/${ENKFSTAT}" From 72018e7e1acf145d41bad73e00ef8e517890ab87 Mon Sep 17 00:00:00 2001 From: David Huber Date: Fri, 4 Apr 2025 18:45:49 +0000 Subject: [PATCH 5/9] Run err_chk on separate line --- scripts/exgdas_atmos_chgres_forenkf.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index a78626c94ab..ab363b035f1 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -155,7 +155,8 @@ EOF . prep_step $APRUN_CHGRES $CHGRESNCEXEC chgres_nc_gauss0$FHR.nml && true - export err=$?; err_chk + export err=$? + err_chk fi done @@ -170,7 +171,8 @@ EOF . prep_step $APRUNCFP_CHGRES $DATA/mp_chgres.sh && true - export err=$?; err_chk + export err=$? + err_chk fi fi From 2fc4a8840a3576624537b4a4c79888d4dccca81e Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Fri, 4 Apr 2025 16:06:20 -0400 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: Rahul Mahajan --- jobs/JGDAS_ENKF_SELECT_OBS | 2 +- scripts/exgdas_atmos_chgres_forenkf.sh | 4 ++-- scripts/exgdas_enkf_post.sh | 8 ++++---- scripts/exgdas_enkf_sfc.sh | 2 +- scripts/exgdas_enkf_update.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index ec991c1c411..845228f994b 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -57,7 +57,7 @@ fi set +eu set -o pipefail -LEVS=$(${NCDUMP} -h "${ATMGES_ENSMEAN}" | grep -i "pfull" | head -1 | awk -F" = " '{print $2}' | awk -F" " '{print $1}') # get LEVS +LEVS=$(${NCLEN} ${ATMGES} pfull) && true export err=$? err_chk set +o pipefail diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index ab363b035f1..38291fcefc3 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -154,7 +154,7 @@ EOF export pgm=$CHGRESNCEXEC . prep_step - $APRUN_CHGRES $CHGRESNCEXEC chgres_nc_gauss0$FHR.nml && true + ${APRUN_CHGRES} "${CHGRESNCEXEC}" "chgres_nc_gauss0${FHR}.nml" && true export err=$? err_chk fi @@ -170,7 +170,7 @@ EOF export pgm=$CHGRESNCEXEC . prep_step - $APRUNCFP_CHGRES $DATA/mp_chgres.sh && true + ${APRUNCFP_CHGRES} "${DATA}/mp_chgres.sh" && true export err=$? err_chk fi diff --git a/scripts/exgdas_enkf_post.sh b/scripts/exgdas_enkf_post.sh index f0634c02a7f..b388ebd2254 100755 --- a/scripts/exgdas_enkf_post.sh +++ b/scripts/exgdas_enkf_post.sh @@ -116,13 +116,13 @@ for fhr in $(seq $FHMIN $FHOUT $FHMAX); do ra=$? rc=$((rc+ra)) - export_pgm=${GETATMENSMEANEXEC} + export pgm=${GETATMENSMEANEXEC} . prep_step if [ $ENKF_SPREAD = "YES" ]; then - $APRUN_EPOS "${DATA}/$(basename ${GETATMENSMEANEXEC})" ./ "atmf${fhrchar}.ensmean" "atmf${fhrchar}" "${NMEM_ENS}" "atmf${fhrchar}.ensspread" && true + ${APRUN_EPOS} "${DATA}/$(basename ${GETATMENSMEANEXEC})" ./ "atmf${fhrchar}.ensmean" "atmf${fhrchar}" "${NMEM_ENS}" "atmf${fhrchar}.ensspread" && true else - $APRUN_EPOS "${DATA}/$(basename ${GETATMENSMEANEXEC})" ./ "atmf${fhrchar}.ensmean" "atmf${fhrchar}" "${NMEM_ENS}" && true + ${APRUN_EPOS} "${DATA}/$(basename ${GETATMENSMEANEXEC})" ./ "atmf${fhrchar}.ensmean" "atmf${fhrchar}" "${NMEM_ENS}" && true fi ra=$? rc=$((rc+ra)) @@ -163,4 +163,4 @@ fi # Postprocessing cd $pwd -exit ${err} +exit "${err}" diff --git a/scripts/exgdas_enkf_sfc.sh b/scripts/exgdas_enkf_sfc.sh index b79b574fbb8..9ced48bffc9 100755 --- a/scripts/exgdas_enkf_sfc.sh +++ b/scripts/exgdas_enkf_sfc.sh @@ -200,7 +200,7 @@ if [ $DOIAU = "YES" ]; then done # ensembles - CDATE="${PDY}${cyc}" ${CYCLESH} && true + CDATE="${PDY}${cyc}" "${CYCLESH}" && true export err=$?; err_chk # Copy outputs from DATA to COMOUT diff --git a/scripts/exgdas_enkf_update.sh b/scripts/exgdas_enkf_update.sh index 9e28ec01e72..670bb92338c 100755 --- a/scripts/exgdas_enkf_update.sh +++ b/scripts/exgdas_enkf_update.sh @@ -259,7 +259,7 @@ if [[ $USE_CFP = "YES" ]]; then if [[ $ncmd -gt 0 ]]; then ncmd_max=$((ncmd < max_tasks_per_node ? ncmd : max_tasks_per_node)) APRUNCFP=$(eval echo $APRUNCFP) - $APRUNCFP $DATA/mp_untar.sh && true + ${APRUNCFP} "${DATA}/mp_untar.sh" && true export err=$?; err_chk fi fi From 43ef9aaea830a03c097ea886bb8fc4b965b2fcc0 Mon Sep 17 00:00:00 2001 From: David Huber Date: Fri, 4 Apr 2025 16:10:21 -0400 Subject: [PATCH 7/9] Double quote pgmout --- jobs/JGDAS_ENKF_SELECT_OBS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 845228f994b..ff19d720399 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -141,7 +141,7 @@ fi # Final processing ############################################## if [[ -e "${pgmout}" ]] ; then - cat ${pgmout} + cat "${pgmout}" fi ########################################## From e1a089c080914d85aa6aade086ea7d93da1b5a86 Mon Sep 17 00:00:00 2001 From: David Huber Date: Fri, 4 Apr 2025 16:24:04 -0400 Subject: [PATCH 8/9] Remove pipefail wrap that's no longer needed --- jobs/JGDAS_ENKF_SELECT_OBS | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index ff19d720399..f354991bbf6 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -55,12 +55,8 @@ if [[ ! -f ${ATMGES_ENSMEAN} ]]; then err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" fi -set +eu -set -o pipefail LEVS=$(${NCLEN} ${ATMGES} pfull) && true export err=$? -err_chk -set +o pipefail set_strict export LEVS From f6657407b106c136507de1915f5ffec6b02c42a2 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 8 Apr 2025 11:03:38 -0400 Subject: [PATCH 9/9] Do not log err_chk calls with error messages --- jobs/JGLOBAL_ARCHIVE_TARS | 5 ++++- jobs/JGLOBAL_ENS_ARCHIVE_TARS | 5 ++++- ush/jjob_header.sh | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/jobs/JGLOBAL_ARCHIVE_TARS b/jobs/JGLOBAL_ARCHIVE_TARS index 87127b94172..0d53480a5b6 100755 --- a/jobs/JGLOBAL_ARCHIVE_TARS +++ b/jobs/JGLOBAL_ARCHIVE_TARS @@ -75,7 +75,10 @@ fi set +eu ${GLOBALARCHIVESH:-${SCRgfs}/exglobal_archive_tars.py} -export err=$?; err_chk "FATAL ERROR: failed to archive the COM structure" +export err=$? +set +x +err_chk "FATAL ERROR: failed to archive the COM structure" +set_trace set_strict ############################################## diff --git a/jobs/JGLOBAL_ENS_ARCHIVE_TARS b/jobs/JGLOBAL_ENS_ARCHIVE_TARS index dcb4d05210b..a57d405c5a1 100755 --- a/jobs/JGLOBAL_ENS_ARCHIVE_TARS +++ b/jobs/JGLOBAL_ENS_ARCHIVE_TARS @@ -21,7 +21,10 @@ if [[ ! -d ${COMOUT_CONF} ]]; then mkdir -p "${COMOUT_CONF}"; fi # Calls an external bash command; do not fail on unassigned/error set +eu "${SCRgfs}/exgdas_enkf_earc_tars.py" -export err=$?; err_chk "FATAL ERROR Failed to archive the ensemble COM structure" +export err=$? +set +x +err_chk "FATAL ERROR Failed to archive the ensemble COM structure" +set_trace set_strict ############################################################### diff --git a/ush/jjob_header.sh b/ush/jjob_header.sh index 3c5f85adc80..5efdc8fba1c 100755 --- a/ush/jjob_header.sh +++ b/ush/jjob_header.sh @@ -105,7 +105,9 @@ export EXPDIR="${EXPDIR:-${HOMEgfs}/parm/config}" for config in "${configs[@]:-''}"; do source "${EXPDIR}/config.${config}" && true export err=$? + set +x err_chk "FATAL ERROR [${BASH_SOURCE[0]}]: Unable to load config config.${config}" + set_trace done @@ -114,4 +116,6 @@ done ########################################## source "${HOMEgfs}/env/${machine}.env" "${env_job}" && true export err=$? +set +x err_chk "FATAL ERROR: [${BASH_SOURCE[0]}]: Error while sourcing machine environment ${machine}.env for job ${env_job}" +set_trace