From b187e2aa15bfd7600c49627fd4c2d02915b50abe Mon Sep 17 00:00:00 2001 From: Walter Kolczynski - NOAA Date: Thu, 16 Dec 2021 22:15:45 -0500 Subject: [PATCH 1/2] Replace all backticks for command substitution (#526) All instances where backticks are used for command substitution are replaced with $( ). This standardizes usage around $( ), which can be nested and does not be confused with single quotation marks. Refs: #397 --- docs/doxygen/compile | 2 +- driver/gdas/run_JGDAS_NCEPPOST.sh | 2 +- driver/gdas/test_gdas_analysis_high.sh | 4 +- driver/gdas/test_gdas_enkf_fcst.sh | 4 +- .../gdas/test_gdas_enkf_inflate_recenter.sh | 4 +- driver/gdas/test_gdas_enkf_innovate_obs.sh | 4 +- driver/gdas/test_gdas_enkf_post.sh | 4 +- driver/gdas/test_gdas_enkf_select_obs.sh | 4 +- driver/gdas/test_gdas_enkf_update.sh | 4 +- driver/gdas/test_gdas_forecast_high.sh | 4 +- driver/gdas/test_gdas_gldas.sh | 8 +- driver/gdas/test_jgdas_verfozn.sh | 6 +- driver/gdas/test_jgdas_verfozn_cray.sh | 6 +- driver/gdas/test_jgdas_verfrad.sh | 6 +- driver/gdas/test_jgdas_verfrad_cray.sh | 4 +- driver/gdas/test_jgdas_vminmon.sh | 6 +- driver/gdas/test_jgdas_vminmon_cray.sh | 4 +- driver/gfs/test_gfs_analysis.sh | 4 +- driver/gfs/test_gfs_forecast_high.sh | 4 +- driver/gfs/test_gfs_forecast_low.sh | 4 +- driver/gfs/test_jgfs_vminmon.sh | 6 +- driver/gfs/test_jgfs_vminmon_cray.sh | 4 +- driver/product/change_gfs_downstream_date.sh | 6 +- driver/product/change_gfs_downstream_envir.sh | 6 +- ...un_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_00 | 4 +- ...un_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_06 | 4 +- ...un_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_12 | 4 +- ...un_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_18 | 4 +- .../product/run_JGDAS_ATMOS_GEMPAK_dell.sh_00 | 4 +- .../product/run_JGDAS_ATMOS_GEMPAK_dell.sh_06 | 4 +- .../product/run_JGDAS_ATMOS_GEMPAK_dell.sh_12 | 4 +- .../product/run_JGDAS_ATMOS_GEMPAK_dell.sh_18 | 4 +- ...un_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_00 | 4 +- ...un_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_06 | 4 +- ...un_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_12 | 4 +- ...un_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_18 | 4 +- .../run_JGFS_ATMOS_AWIPS_G2_dell.sh_00 | 4 +- .../run_JGFS_ATMOS_AWIPS_G2_dell.sh_06 | 4 +- .../run_JGFS_ATMOS_AWIPS_G2_dell.sh_12 | 4 +- .../run_JGFS_ATMOS_AWIPS_G2_dell.sh_18 | 4 +- .../product/run_JGFS_ATMOS_FBWIND_dell.sh_00 | 4 +- .../product/run_JGFS_ATMOS_FBWIND_dell.sh_06 | 4 +- .../product/run_JGFS_ATMOS_FBWIND_dell.sh_12 | 4 +- .../product/run_JGFS_ATMOS_FBWIND_dell.sh_18 | 4 +- .../run_JGFS_ATMOS_GEMPAK_META_dell.sh_00 | 4 +- .../run_JGFS_ATMOS_GEMPAK_META_dell.sh_06 | 4 +- .../run_JGFS_ATMOS_GEMPAK_META_dell.sh_12 | 4 +- .../run_JGFS_ATMOS_GEMPAK_META_dell.sh_18 | 4 +- ..._JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_00 | 4 +- ..._JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_06 | 4 +- ..._JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_12 | 4 +- ..._JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_18 | 4 +- ...un_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_00 | 4 +- ...un_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_06 | 4 +- ...un_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_12 | 4 +- ...un_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_18 | 4 +- .../product/run_JGFS_ATMOS_GEMPAK_dell.sh_00 | 4 +- .../product/run_JGFS_ATMOS_GEMPAK_dell.sh_06 | 4 +- .../product/run_JGFS_ATMOS_GEMPAK_dell.sh_12 | 4 +- .../product/run_JGFS_ATMOS_GEMPAK_dell.sh_18 | 4 +- ...un_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_00 | 4 +- ...un_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_06 | 4 +- ...un_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_12 | 4 +- ...un_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_18 | 4 +- driver/product/run_JGFS_NCEPPOST | 4 +- driver/product/run_JGFS_NCEPPOST.sh | 4 +- driver/product/run_gfs_downstream.sh | 6 +- gempak/ush/gdas_ecmwf_meta_ver.sh | 32 +-- gempak/ush/gdas_meta_loop.sh | 18 +- gempak/ush/gdas_meta_na.sh | 2 +- gempak/ush/gdas_ukmet_meta_ver.sh | 74 ++--- gempak/ush/gempak_gdas_f000_gif.sh | 4 +- gempak/ush/gempak_gfs_f00_gif.sh | 4 +- gempak/ush/gempak_gfs_f12_gif.sh | 4 +- gempak/ush/gempak_gfs_f24_gif.sh | 4 +- gempak/ush/gempak_gfs_f36_gif.sh | 4 +- gempak/ush/gempak_gfs_f48_gif.sh | 4 +- gempak/ush/gfs_meta_ak.sh | 2 +- gempak/ush/gfs_meta_bwx.sh | 2 +- gempak/ush/gfs_meta_comp.sh | 70 ++--- gempak/ush/gfs_meta_crb.sh | 10 +- gempak/ush/gfs_meta_hi.sh | 2 +- gempak/ush/gfs_meta_hur.sh | 8 +- gempak/ush/gfs_meta_mar_atl.sh | 2 +- gempak/ush/gfs_meta_mar_comp.sh | 70 ++--- gempak/ush/gfs_meta_mar_pac.sh | 2 +- gempak/ush/gfs_meta_mar_ql.sh | 2 +- gempak/ush/gfs_meta_mar_skewt.sh | 2 +- gempak/ush/gfs_meta_mar_ver.sh | 2 +- gempak/ush/gfs_meta_nhsh.sh | 2 +- gempak/ush/gfs_meta_opc_na_ver | 172 +++++------ gempak/ush/gfs_meta_opc_np_ver | 172 +++++------ gempak/ush/gfs_meta_precip.sh | 2 +- gempak/ush/gfs_meta_qpf.sh | 2 +- gempak/ush/gfs_meta_sa.sh | 2 +- gempak/ush/gfs_meta_sa2.sh | 26 +- gempak/ush/gfs_meta_trop.sh | 2 +- gempak/ush/gfs_meta_us.sh | 2 +- gempak/ush/gfs_meta_usext.sh | 4 +- gempak/ush/gfs_meta_ver.sh | 268 +++++++++--------- jobs/JGFS_ATMOS_CYCLONE_GENESIS | 4 +- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 4 +- jobs/JGFS_ATMOS_FSU_GENESIS | 2 +- jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS | 10 +- jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP | 2 +- jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 2 +- jobs/JGLOBAL_FORECAST | 2 +- jobs/JGLOBAL_WAVE_PREP | 4 +- jobs/rocoto/arch.sh | 16 +- jobs/rocoto/awips.sh | 12 +- jobs/rocoto/earc.sh | 14 +- jobs/rocoto/wafs.sh | 2 +- parm/config/config.base.emc.dyn | 2 +- parm/config/config.base.nco.static | 2 +- parm/config/config.efcs | 2 +- parm/config/config.fcst | 2 +- parm/config/config.vrfy | 2 +- scripts/exgdas_atmos_nawips.sh | 2 +- scripts/exgfs_atmos_awips_20km_1p0deg.sh | 6 +- scripts/exgfs_atmos_fbwind.sh | 2 +- scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh | 4 +- scripts/exgfs_atmos_gempak_meta.sh | 8 +- scripts/exgfs_atmos_goes_nawips.sh | 20 +- scripts/exgfs_atmos_grib2_special_npoess.sh | 14 +- scripts/exgfs_atmos_grib_awips.sh | 2 +- scripts/exgfs_atmos_nawips.sh | 2 +- scripts/exgfs_atmos_postsnd.sh | 6 +- scripts/exgfs_nceppost_cpl.sh | 16 +- scripts/exgfs_pmgr.sh | 8 +- scripts/exgfs_prdgen_manager.sh | 6 +- scripts/exgfs_wave_init.sh | 16 +- scripts/exgfs_wave_post_gridded_sbs.sh | 24 +- scripts/exgfs_wave_post_pnt.sh | 42 +-- scripts/exgfs_wave_prdgen_bulls.sh | 16 +- scripts/exgfs_wave_prdgen_gridded.sh | 14 +- scripts/exgfs_wave_prep.sh | 102 +++---- scripts/exglobal_atmos_tropcy_qc_reloc.sh | 6 +- scripts/run_gfsmos_master.sh.cray | 8 +- scripts/run_gfsmos_master.sh.dell | 20 +- scripts/run_gfsmos_master.sh.hera | 20 +- scripts/run_reg2grb2.sh | 16 +- sorc/build_all.sh | 2 +- sorc/build_gfs_util.sh | 2 +- sorc/build_gfs_wafs.sh | 2 +- sorc/build_gldas.sh | 2 +- sorc/build_gsi.sh | 2 +- sorc/build_ncep_post.sh | 2 +- sorc/build_ufs_utils.sh | 2 +- sorc/fv3nc2nemsio.fd/makefile.sh | 4 +- sorc/machine-setup.sh | 4 +- sorc/regrid_nemsio.fd/Makefile | 2 +- ush/forecast_postdet.sh | 18 +- ush/forecast_predet.sh | 6 +- ush/fv3gfs_downstream_nems_cpl.sh | 22 +- ush/fv3gfs_nc2nemsio.sh | 2 +- ush/fv3gfs_regrid_nemsio.sh | 8 +- ush/fv3gfs_remap.sh | 2 +- ush/getdump.sh | 4 +- ush/gfs_bfr2gpk.sh | 2 +- ush/gfs_bufr.sh | 8 +- ush/gfs_bufr_netcdf.sh | 8 +- ush/gfs_sndp.sh | 2 +- ush/global_extrkr.sh | 96 +++---- ush/hpssarch_gen.sh | 2 +- ush/inter_flux.sh | 4 +- ush/syndat_getjtbul.sh | 14 +- ush/syndat_qctropcy.sh | 10 +- ush/tropcy_relocate.sh | 22 +- ush/tropcy_relocate_extrkr.sh | 78 ++--- ush/wave_grib2_sbs.sh | 10 +- ush/wave_grid_interp_sbs.sh | 2 +- ush/wave_outp_cat.sh | 2 +- ush/wave_outp_spec.sh | 18 +- ush/wave_prnc_cur.sh | 2 +- ush/wave_tar.sh | 6 +- util/sorc/compile_gfs_util_wcoss.sh | 2 +- .../mkgfsawps.fd/compile_mkgfsawps_wcoss.sh | 2 +- .../overgridid.fd/compile_overgridid_wcoss.sh | 2 +- .../rdbfmsua.fd/compile_rdbfmsua_wcoss.sh | 2 +- .../webtitle.fd/compile_webtitle_wcoss.sh | 2 +- util/ush/finddate.sh | 40 +-- util/ush/make_NTC_file.pl | 2 +- util/ush/make_ntcfile.pl | 2 +- util/ush/mkawpgrb.sh | 4 +- util/ush/month_name.sh | 8 +- util/ush/snd2forgn | 32 +-- util/ush/snd2forgntbl.sh | 4 +- util/ush/sndncdc | 8 +- util/ush/verfdate.sh | 18 +- util/ush/xlf_links.sh | 4 +- 190 files changed, 1115 insertions(+), 1115 deletions(-) diff --git a/docs/doxygen/compile b/docs/doxygen/compile index e5f95b673a..226f267ac9 100755 --- a/docs/doxygen/compile +++ b/docs/doxygen/compile @@ -14,7 +14,7 @@ elif [ $machine = "JET" ]; then else echo "machine $machine is unrecognized, ABORT!" echo "try system doxygen" - doxygen=`which doxygen` + doxygen=$(which doxygen) fi $doxygen diff --git a/driver/gdas/run_JGDAS_NCEPPOST.sh b/driver/gdas/run_JGDAS_NCEPPOST.sh index ecacffc177..374ba25b50 100755 --- a/driver/gdas/run_JGDAS_NCEPPOST.sh +++ b/driver/gdas/run_JGDAS_NCEPPOST.sh @@ -43,7 +43,7 @@ export envir=prod # set up running dir -export user=`whoami` +export user=$(whoami) export DATA=/gpfs/hps/ptmp/${user}/gdas.${PDY}${cyc}_nemsio_mpiio mkdir -p $DATA cd $DATA diff --git a/driver/gdas/test_gdas_analysis_high.sh b/driver/gdas/test_gdas_analysis_high.sh index 43405355e0..b57727c2d2 100755 --- a/driver/gdas/test_gdas_analysis_high.sh +++ b/driver/gdas/test_gdas_analysis_high.sh @@ -25,8 +25,8 @@ export CDATE=2017030806 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_analysis_high_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_enkf_fcst.sh b/driver/gdas/test_gdas_enkf_fcst.sh index c33f610b67..097cb2711c 100755 --- a/driver/gdas/test_gdas_enkf_fcst.sh +++ b/driver/gdas/test_gdas_enkf_fcst.sh @@ -34,8 +34,8 @@ fi # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_enkf_fcst_grp${grp}_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_enkf_inflate_recenter.sh b/driver/gdas/test_gdas_enkf_inflate_recenter.sh index afff1ff9a2..d188ac80e2 100755 --- a/driver/gdas/test_gdas_enkf_inflate_recenter.sh +++ b/driver/gdas/test_gdas_enkf_inflate_recenter.sh @@ -27,8 +27,8 @@ export CDATE=2017011900 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_enkf_inflate_recenter_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_enkf_innovate_obs.sh b/driver/gdas/test_gdas_enkf_innovate_obs.sh index 3fe4df49cf..15313e809a 100755 --- a/driver/gdas/test_gdas_enkf_innovate_obs.sh +++ b/driver/gdas/test_gdas_enkf_innovate_obs.sh @@ -31,8 +31,8 @@ fi # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_enkf_innovate_obs_grp${grp}_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_enkf_post.sh b/driver/gdas/test_gdas_enkf_post.sh index 87bfa63603..472e3f26ba 100755 --- a/driver/gdas/test_gdas_enkf_post.sh +++ b/driver/gdas/test_gdas_enkf_post.sh @@ -24,8 +24,8 @@ export CDATE=2017011900 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_enkf_post_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_enkf_select_obs.sh b/driver/gdas/test_gdas_enkf_select_obs.sh index bef6518207..8636b74710 100755 --- a/driver/gdas/test_gdas_enkf_select_obs.sh +++ b/driver/gdas/test_gdas_enkf_select_obs.sh @@ -24,8 +24,8 @@ export CDATE=2017030806 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_enkf_select_obs_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_enkf_update.sh b/driver/gdas/test_gdas_enkf_update.sh index fc4b5d23f7..cf0d8f4318 100755 --- a/driver/gdas/test_gdas_enkf_update.sh +++ b/driver/gdas/test_gdas_enkf_update.sh @@ -25,8 +25,8 @@ export CDATE=2017030806 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_enkf_update_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_forecast_high.sh b/driver/gdas/test_gdas_forecast_high.sh index 4e82979967..a8d8af6116 100755 --- a/driver/gdas/test_gdas_forecast_high.sh +++ b/driver/gdas/test_gdas_forecast_high.sh @@ -27,8 +27,8 @@ export CDATE=2017012506 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gdas_forecast_high_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_gdas_gldas.sh b/driver/gdas/test_gdas_gldas.sh index 46b5391b54..92e40ced3d 100755 --- a/driver/gdas/test_gdas_gldas.sh +++ b/driver/gdas/test_gdas_gldas.sh @@ -32,12 +32,12 @@ export CDATE=${CDATE:-2019110700} ############################################################# export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` -export PDY=`echo $CDATE | cut -c1-8` +export PDY=$(date -u +%Y%m%d) +export PDY=$(echo $CDATE | cut -c1-8) -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) -export cyc=`echo $CDATE | cut -c9-10` +export cyc=$(echo $CDATE | cut -c9-10) export cycle=t${cyc}z set -xa diff --git a/driver/gdas/test_jgdas_verfozn.sh b/driver/gdas/test_jgdas_verfozn.sh index e6f5d703d5..699849b782 100755 --- a/driver/gdas/test_jgdas_verfozn.sh +++ b/driver/gdas/test_jgdas_verfozn.sh @@ -23,14 +23,14 @@ export NET=${NET:-gfs} export RUN=${RUN:-gdas} -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gdas_verfozn.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} export envir=${envir:-test} -me=`hostname | cut -c1` +me=$(hostname | cut -c1) export DATAROOT=${DATAROOT:-/gpfs/${me}d2/emc/da/noscrub/${LOGNAME}/test_data} export COMROOT=${COMROOT:-/ptmpp1/${LOGNAME}/com} export OZN_WORK_DIR=${OZN_WORK_DIR:-/stmpp1/${LOGNAME}/oznmon.${pid}} diff --git a/driver/gdas/test_jgdas_verfozn_cray.sh b/driver/gdas/test_jgdas_verfozn_cray.sh index 883afce25e..fb2457624a 100755 --- a/driver/gdas/test_jgdas_verfozn_cray.sh +++ b/driver/gdas/test_jgdas_verfozn_cray.sh @@ -21,14 +21,14 @@ export NET=${NET:-gfs} export RUN=${RUN:-gdas} -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gdas_verfozn.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} export envir=${envir:-test} -me=`hostname | cut -c1` +me=$(hostname | cut -c1) export DATAROOT=${DATAROOT:-/gpfs/hps3/emc/da/noscrub/${LOGNAME}/test_data} export COMROOT=${COMROOT:-/gpfs/hps2/ptmp/${LOGNAME}/com} export OZN_WORK_DIR=${OZN_WORK_DIR:-/gpfs/hps2/stmp/${LOGNAME}/oznmon.${pid}} diff --git a/driver/gdas/test_jgdas_verfrad.sh b/driver/gdas/test_jgdas_verfrad.sh index 555cc2f43d..f286185185 100755 --- a/driver/gdas/test_jgdas_verfrad.sh +++ b/driver/gdas/test_jgdas_verfrad.sh @@ -18,13 +18,13 @@ export PDATE=${PDATE:-2018022112} ############################################################# # Specify whether the run is production or development ############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gdas_verfrad.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} export envir=para -me=`hostname | cut -c1` +me=$(hostname | cut -c1) export DATAROOT=${DATAROOT:-/gpfs/${me}d2/emc/da/noscrub/${LOGNAME}/test_data} export COMROOT=${COMROOT:-/ptmpp1/$LOGNAME/com} diff --git a/driver/gdas/test_jgdas_verfrad_cray.sh b/driver/gdas/test_jgdas_verfrad_cray.sh index b40812cc1b..d9668984ad 100755 --- a/driver/gdas/test_jgdas_verfrad_cray.sh +++ b/driver/gdas/test_jgdas_verfrad_cray.sh @@ -16,8 +16,8 @@ export PDATE=${PDATE:-2016100106} ############################################################# # Specify whether the run is production or development ############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gdas_verfrad.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gdas/test_jgdas_vminmon.sh b/driver/gdas/test_jgdas_vminmon.sh index ef3903c879..983a0e7c24 100755 --- a/driver/gdas/test_jgdas_vminmon.sh +++ b/driver/gdas/test_jgdas_vminmon.sh @@ -18,9 +18,9 @@ export PDATE=${PDATE:-2016030706} ############################################################# # Specify whether the run is production or development ############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -me=`hostname | cut -c1` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) +me=$(hostname | cut -c1) export job=gdas_vminmon.${cyc} export pid=${pid:-$$} diff --git a/driver/gdas/test_jgdas_vminmon_cray.sh b/driver/gdas/test_jgdas_vminmon_cray.sh index e51a04a819..6078d2ade4 100755 --- a/driver/gdas/test_jgdas_vminmon_cray.sh +++ b/driver/gdas/test_jgdas_vminmon_cray.sh @@ -16,8 +16,8 @@ export PDATE=${PDATE:-2016030700} ############################################################# # Specify whether the run is production or development ############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gdas_vminmon.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gfs/test_gfs_analysis.sh b/driver/gfs/test_gfs_analysis.sh index f7a8693ea3..4b697f6a7f 100755 --- a/driver/gfs/test_gfs_analysis.sh +++ b/driver/gfs/test_gfs_analysis.sh @@ -25,8 +25,8 @@ export CDATE=2017040700 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gfs_analysis_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gfs/test_gfs_forecast_high.sh b/driver/gfs/test_gfs_forecast_high.sh index 843648d2f9..ceef917ee8 100755 --- a/driver/gfs/test_gfs_forecast_high.sh +++ b/driver/gfs/test_gfs_forecast_high.sh @@ -27,8 +27,8 @@ export CDATE=2017012506 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gfs_forecast_high_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gfs/test_gfs_forecast_low.sh b/driver/gfs/test_gfs_forecast_low.sh index 219b9814f9..af36679da0 100755 --- a/driver/gfs/test_gfs_forecast_low.sh +++ b/driver/gfs/test_gfs_forecast_low.sh @@ -27,8 +27,8 @@ export CDATE=2017012506 # Specify whether the run is production or development ############################################################# export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export job=gfs_forecast_low_${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/gfs/test_jgfs_vminmon.sh b/driver/gfs/test_jgfs_vminmon.sh index 63a51c0eca..1483b3352e 100755 --- a/driver/gfs/test_jgfs_vminmon.sh +++ b/driver/gfs/test_jgfs_vminmon.sh @@ -17,14 +17,14 @@ export NET='gfs' export RUN='gfs' export PDATE=${PDATE:-2016030206} -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gfs_vminmon.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} export envir=para export Z=${Z:-gz} -me=`hostname | cut -c1` +me=$(hostname | cut -c1) export DATAROOT=${DATAROOT:-/gpfs/${me}d2/emc/da/noscrub/Edward.Safford/test_data} export COMROOT=${COMROOT:-/ptmpp1/$LOGNAME/com} diff --git a/driver/gfs/test_jgfs_vminmon_cray.sh b/driver/gfs/test_jgfs_vminmon_cray.sh index 67b52497ab..fd3c6f19a3 100755 --- a/driver/gfs/test_jgfs_vminmon_cray.sh +++ b/driver/gfs/test_jgfs_vminmon_cray.sh @@ -16,8 +16,8 @@ export PDATE=${PDATE:-2016030800} ############################################################# # Specify whether the run is production or development ############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` +export PDY=$(echo $PDATE | cut -c1-8) +export cyc=$(echo $PDATE | cut -c9-10) export job=gfs_vminmon.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} diff --git a/driver/product/change_gfs_downstream_date.sh b/driver/product/change_gfs_downstream_date.sh index 70f01324d2..c9d4f10e29 100755 --- a/driver/product/change_gfs_downstream_date.sh +++ b/driver/product/change_gfs_downstream_date.sh @@ -3,9 +3,9 @@ set -x # export cyc=12 # export cyc=18 export fhr=012 -export dir=` pwd ` -export PDY=`date -u +%Y%m%d` -export PDY1=`expr $PDY - 1` +export dir=$( pwd ) +export PDY=$(date -u +%Y%m%d) +export PDY1=$(expr $PDY - 1) export olddate=20200712 export newdate=20200922 diff --git a/driver/product/change_gfs_downstream_envir.sh b/driver/product/change_gfs_downstream_envir.sh index 11fa6bddac..e10e22fb1f 100755 --- a/driver/product/change_gfs_downstream_envir.sh +++ b/driver/product/change_gfs_downstream_envir.sh @@ -3,9 +3,9 @@ set -x # export cyc=12 # export cyc=18 export fhr=012 -export dir=` pwd ` -export PDY=`date -u +%Y%m%d` -export PDY1=`expr $PDY - 1` +export dir=$( pwd ) +export PDY=$(date -u +%Y%m%d) +export PDY1=$(expr $PDY - 1) export olddate=20200106 export newdate=20200712 diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_00 b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_00 index 7dfd1e5bc4..bae8bc42df 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_00 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_06 b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_06 index 2a39094bcf..557efb82de 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_06 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_12 b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_12 index 7dd7070ef7..7212dec812 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_12 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_18 b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_18 index 4cee23853a..15f8fca7a1 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_18 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_META_NCDC_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_00 b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_00 index 05b5cb53c6..6deb0f9168 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_00 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_06 b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_06 index ca6dfe61b1..eb1d9b32ea 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_06 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_12 b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_12 index 8ae9c25818..32b2ae1829 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_12 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_18 b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_18 index 38441aacbd..7974bfecf6 100755 --- a/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_18 +++ b/driver/product/run_JGDAS_ATMOS_GEMPAK_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_00 b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_00 index f796569dd6..74a6484c24 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_06 b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_06 index 7ee93467bd..7a74d22acf 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_12 b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_12 index b115bee0a1..e8ad9e9e20 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_18 b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_18 index 69124df7f4..40404067dc 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_20KM_1P0DEG_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_00 b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_00 index cea1667c3b..1fdffa726c 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_06 b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_06 index ac96fa6ceb..efa6146f91 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_12 b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_12 index 59175f1b05..6a6218700c 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_18 b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_18 index 7826e2c5d7..70f732bf9b 100755 --- a/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_AWIPS_G2_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_00 b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_00 index 38686454bd..3852d0092b 100755 --- a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_06 b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_06 index bea42a7e22..2008f44310 100755 --- a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_12 b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_12 index bab3ba0612..13af5f5fe9 100755 --- a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_18 b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_18 index de6b7fae14..d4352db500 100755 --- a/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_FBWIND_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_00 b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_00 index 359337ea00..e033eb3731 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_00 @@ -13,10 +13,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200114 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_06 b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_06 index e9413d4053..6959859b5c 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_06 @@ -13,10 +13,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_12 b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_12 index cc15bb32d3..ea5e7599da 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_12 @@ -13,10 +13,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_18 b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_18 index 19be9606a7..c1ad53b100 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_META_dell.sh_18 @@ -13,10 +13,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_00 b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_00 index 7f52fe5e16..6a91b052e9 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200114 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_06 b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_06 index bd17a3725c..7228e4f36a 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_12 b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_12 index 16a86904d6..d44c484db6 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_18 b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_18 index 2a78d848d0..e59b2ce39d 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_00 b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_00 index 7b906e14d5..d75205798c 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_00 @@ -12,9 +12,9 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_06 b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_06 index b7c5bd9067..67cb3bd8c6 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_06 @@ -12,9 +12,9 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_12 b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_12 index 80cd68ed52..c84760622c 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_12 @@ -12,9 +12,9 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_18 b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_18 index 5a455d5577..6675407304 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_PGRB2_SPEC_dell.sh_18 @@ -12,9 +12,9 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_00 b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_00 index 4fa3355b6e..6eb92a1294 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_06 b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_06 index 7dc444431f..7008c8c2b0 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_12 b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_12 index 42ccc2faa5..a15fdc77fc 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_18 b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_18 index 4d6aa38911..e772c06a58 100755 --- a/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_GEMPAK_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_00 b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_00 index e288c4d488..a9c848724c 100755 --- a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_00 +++ b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_00 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=00 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_06 b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_06 index ca1da8d8fa..5657ad324a 100755 --- a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_06 +++ b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_06 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=06 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_12 b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_12 index 304fa2ede9..0f2952c540 100755 --- a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_12 +++ b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_12 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=12 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_18 b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_18 index e1e0085826..cacb6b7d07 100755 --- a/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_18 +++ b/driver/product/run_JGFS_ATMOS_PGRB2_SPEC_NPOESS_dell.sh_18 @@ -12,10 +12,10 @@ export KMP_AFFINITY=disabled -export PDY=`date -u +%Y%m%d` +export PDY=$(date -u +%Y%m%d) export PDY=20200922 -export PDY1=`expr $PDY - 1` +export PDY1=$(expr $PDY - 1) export cyc=18 export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_NCEPPOST b/driver/product/run_JGFS_NCEPPOST index 88698d36df..b4a6baf9f9 100755 --- a/driver/product/run_JGFS_NCEPPOST +++ b/driver/product/run_JGFS_NCEPPOST @@ -41,8 +41,8 @@ export hwrf_ver=v10.0.6 # specify PDY (the cycle start yyyymmdd) and cycle export CDATE=2017052500 -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export cycle=t${cyc}z diff --git a/driver/product/run_JGFS_NCEPPOST.sh b/driver/product/run_JGFS_NCEPPOST.sh index 88285cbf8d..e2169b1215 100755 --- a/driver/product/run_JGFS_NCEPPOST.sh +++ b/driver/product/run_JGFS_NCEPPOST.sh @@ -78,8 +78,8 @@ export DATA_IN=/ptmpd2/$USER #### export CDATE=2016020900 export CDATE=2016022600 -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` +export PDY=$(echo $CDATE | cut -c1-8) +export cyc=$(echo $CDATE | cut -c9-10) export DATA=$DATA_IN/nceppostgfs_${PDY} export NET=gfs diff --git a/driver/product/run_gfs_downstream.sh b/driver/product/run_gfs_downstream.sh index fa7c407cc2..e6e46b907d 100755 --- a/driver/product/run_gfs_downstream.sh +++ b/driver/product/run_gfs_downstream.sh @@ -3,9 +3,9 @@ set -x # export cyc=12 # export cyc=18 export fhr=012 -export dir=` pwd ` -export PDY=`date -u +%Y%m%d` -export PDY1=`expr $PDY - 1` +export dir=$( pwd ) +export PDY=$(date -u +%Y%m%d) +export PDY1=$(expr $PDY - 1) export gdas=/gpfs/dell1/nco/ops/com/gfs/prod/gdas.${PDY}/${cyc} export gdasgp=/gpfs/dell1/nco/ops/com/gfs/prod/gdas.${PDY}/${cyc}/gempak diff --git a/gempak/ush/gdas_ecmwf_meta_ver.sh b/gempak/ush/gdas_ecmwf_meta_ver.sh index ef71b2c0ed..e4fffd9c8a 100755 --- a/gempak/ush/gdas_ecmwf_meta_ver.sh +++ b/gempak/ush/gdas_ecmwf_meta_ver.sh @@ -25,7 +25,7 @@ export pgm=gdplot2_nc;. prep_step; startmsg cyc=12 device="nc | ecmwfver.meta" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # # Copy in datatype table to define gdfile type @@ -39,26 +39,26 @@ fi # # DEFINE YESTERDAY -date1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -sdate1=`echo ${date1} | cut -c 3-` +date1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +sdate1=$(echo ${date1} | cut -c 3-) # DEFINE 2 DAYS AGO -date2=`$NDATE -48 ${PDY}${cyc} | cut -c -8` -sdate2=`echo ${date2} | cut -c 3-` +date2=$($NDATE -48 ${PDY}${cyc} | cut -c -8) +sdate2=$(echo ${date2} | cut -c 3-) # DEFINE 3 DAYS AGO -date3=`$NDATE -72 ${PDY}${cyc} | cut -c -8` -sdate3=`echo ${date3} | cut -c 3-` +date3=$($NDATE -72 ${PDY}${cyc} | cut -c -8) +sdate3=$(echo ${date3} | cut -c 3-) # DEFINE 4 DAYS AGO -date4=`$NDATE -96 ${PDY}${cyc} | cut -c -8` -sdate4=`echo ${date4} | cut -c 3-` +date4=$($NDATE -96 ${PDY}${cyc} | cut -c -8) +sdate4=$(echo ${date4} | cut -c 3-) # DEFINE 5 DAYS AGO -date5=`$NDATE -120 ${PDY}${cyc} | cut -c -8` -sdate5=`echo ${date5} | cut -c 3-` +date5=$($NDATE -120 ${PDY}${cyc} | cut -c -8) +sdate5=$(echo ${date5} | cut -c 3-) # DEFINE 6 DAYS AGO -date6=`$NDATE -144 ${PDY}${cyc} | cut -c -8` -sdate6=`echo ${date6} | cut -c 3-` +date6=$($NDATE -144 ${PDY}${cyc} | cut -c -8) +sdate6=$(echo ${date6} | cut -c 3-) # DEFINE 7 DAYS AGO -date7=`$NDATE -168 ${PDY}${cyc} | cut -c -8` -sdate7=`echo ${date7} | cut -c 3-` +date7=$($NDATE -168 ${PDY}${cyc} | cut -c -8) +sdate7=$(echo ${date7} | cut -c 3-) vergrid="F-GDAS | ${PDY2}/0600" fcsthr="0600f006" @@ -82,7 +82,7 @@ for area in $areas fi for verday in $verdays do - verddate=`echo ${verday} | cut -c 3-` + verddate=$(echo ${verday} | cut -c 3-) if [ ${verday} -eq ${date1} ] ; then dgdattim=f024 sdatenum=$sdate1 diff --git a/gempak/ush/gdas_meta_loop.sh b/gempak/ush/gdas_meta_loop.sh index 90c30af771..cd0d9b781b 100755 --- a/gempak/ush/gdas_meta_loop.sh +++ b/gempak/ush/gdas_meta_loop.sh @@ -19,7 +19,7 @@ set -xa device="nc | gdasloop.meta" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) if [ "$envir" = "para" ] ; then export m_title="GDASP" @@ -43,19 +43,19 @@ fi # # Define previous days # -PDYm1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -PDYm2=`$NDATE -48 ${PDY}${cyc} | cut -c -8` -PDYm3=`$NDATE -72 ${PDY}${cyc} | cut -c -8` -PDYm4=`$NDATE -96 ${PDY}${cyc} | cut -c -8` -PDYm5=`$NDATE -120 ${PDY}${cyc} | cut -c -8` -PDYm6=`$NDATE -144 ${PDY}${cyc} | cut -c -8` +PDYm1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +PDYm2=$($NDATE -48 ${PDY}${cyc} | cut -c -8) +PDYm3=$($NDATE -72 ${PDY}${cyc} | cut -c -8) +PDYm4=$($NDATE -96 ${PDY}${cyc} | cut -c -8) +PDYm5=$($NDATE -120 ${PDY}${cyc} | cut -c -8) +PDYm6=$($NDATE -144 ${PDY}${cyc} | cut -c -8) # verdays="$PDYm6 $PDYm5 $PDYm4 $PDYm3 $PDYm2 $PDYm1 $PDY" for day in $verdays do - PDY2=`echo $day | cut -c 3-` + PDY2=$(echo $day | cut -c 3-) if [ $day -eq $PDY ] ; then if [ $cyc -eq "00" ] ; then cycles="00" @@ -159,7 +159,7 @@ done for day in $verdays do - PDY2=`echo $day | cut -c 3-` + PDY2=$(echo $day | cut -c 3-) if [ $day -eq $PDY ] ; then if [ $cyc -eq "00" ] ; then cycles="00" diff --git a/gempak/ush/gdas_meta_na.sh b/gempak/ush/gdas_meta_na.sh index 3ad7962999..6c4768cfb7 100755 --- a/gempak/ush/gdas_meta_na.sh +++ b/gempak/ush/gdas_meta_na.sh @@ -21,7 +21,7 @@ set -xa device="nc | gdas.meta" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) if [ "$envir" = "para" ] ; then export m_title="GDASP" diff --git a/gempak/ush/gdas_ukmet_meta_ver.sh b/gempak/ush/gdas_ukmet_meta_ver.sh index cd6cf146da..dcc350ea74 100755 --- a/gempak/ush/gdas_ukmet_meta_ver.sh +++ b/gempak/ush/gdas_ukmet_meta_ver.sh @@ -24,7 +24,7 @@ fi export pgm=gdplot2_nc;. prep_step; startmsg device="nc | ukmetver_12.meta" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # # Copy in datatype table to define gdfile type @@ -33,50 +33,50 @@ cp $FIXgempak/datatype.tbl datatype.tbl # # DEFINE 1 CYCLE AGO -dc1=`$NDATE -06 ${PDY}${cyc} | cut -c -10` -date1=`echo ${dc1} | cut -c -8` -sdate1=`echo ${dc1} | cut -c 3-8` -cycle1=`echo ${dc1} | cut -c 9,10` +dc1=$($NDATE -06 ${PDY}${cyc} | cut -c -10) +date1=$(echo ${dc1} | cut -c -8) +sdate1=$(echo ${dc1} | cut -c 3-8) +cycle1=$(echo ${dc1} | cut -c 9,10) # DEFINE 2 CYCLES AGO -dc2=`$NDATE -18 ${PDY}${cyc} | cut -c -10` -date2=`echo ${dc2} | cut -c -8` -sdate2=`echo ${dc2} | cut -c 3-8` -cycle2=`echo ${dc2} | cut -c 9,10` +dc2=$($NDATE -18 ${PDY}${cyc} | cut -c -10) +date2=$(echo ${dc2} | cut -c -8) +sdate2=$(echo ${dc2} | cut -c 3-8) +cycle2=$(echo ${dc2} | cut -c 9,10) # DEFINE 3 CYCLES AGO -dc3=`$NDATE -30 ${PDY}${cyc} | cut -c -10` -date3=`echo ${dc3} | cut -c -8` -sdate3=`echo ${dc3} | cut -c 3-8` -cycle3=`echo ${dc3} | cut -c 9,10` +dc3=$($NDATE -30 ${PDY}${cyc} | cut -c -10) +date3=$(echo ${dc3} | cut -c -8) +sdate3=$(echo ${dc3} | cut -c 3-8) +cycle3=$(echo ${dc3} | cut -c 9,10) # DEFINE 4 CYCLES AGO -dc4=`$NDATE -42 ${PDY}${cyc} | cut -c -10` -date4=`echo ${dc4} | cut -c -8` -sdate4=`echo ${dc4} | cut -c 3-8` -cycle4=`echo ${dc4} | cut -c 9,10` +dc4=$($NDATE -42 ${PDY}${cyc} | cut -c -10) +date4=$(echo ${dc4} | cut -c -8) +sdate4=$(echo ${dc4} | cut -c 3-8) +cycle4=$(echo ${dc4} | cut -c 9,10) # DEFINE 5 CYCLES AGO -dc5=`$NDATE -54 ${PDY}${cyc} | cut -c -10` -date5=`echo ${dc5} | cut -c -8` -sdate5=`echo ${dc5} | cut -c 3-8` -cycle5=`echo ${dc5} | cut -c 9,10` +dc5=$($NDATE -54 ${PDY}${cyc} | cut -c -10) +date5=$(echo ${dc5} | cut -c -8) +sdate5=$(echo ${dc5} | cut -c 3-8) +cycle5=$(echo ${dc5} | cut -c 9,10) # DEFINE 6 CYCLES AGO -dc6=`$NDATE -66 ${PDY}${cyc} | cut -c -10` -date6=`echo ${dc6} | cut -c -8` -sdate6=`echo ${dc6} | cut -c 3-8` -cycle6=`echo ${dc6} | cut -c 9,10` +dc6=$($NDATE -66 ${PDY}${cyc} | cut -c -10) +date6=$(echo ${dc6} | cut -c -8) +sdate6=$(echo ${dc6} | cut -c 3-8) +cycle6=$(echo ${dc6} | cut -c 9,10) # DEFINE 7 CYCLES AGO -dc7=`$NDATE -90 ${PDY}${cyc} | cut -c -10` -date7=`echo ${dc7} | cut -c -8` -sdate7=`echo ${dc7} | cut -c 3-8` -cycle7=`echo ${dc7} | cut -c 9,10` +dc7=$($NDATE -90 ${PDY}${cyc} | cut -c -10) +date7=$(echo ${dc7} | cut -c -8) +sdate7=$(echo ${dc7} | cut -c 3-8) +cycle7=$(echo ${dc7} | cut -c 9,10) # DEFINE 8 CYCLES AGO -dc8=`$NDATE -114 ${PDY}${cyc} | cut -c -10` -date8=`echo ${dc8} | cut -c -8` -sdate8=`echo ${dc8} | cut -c 3-8` -cycle8=`echo ${dc8} | cut -c 9,10` +dc8=$($NDATE -114 ${PDY}${cyc} | cut -c -10) +date8=$(echo ${dc8} | cut -c -8) +sdate8=$(echo ${dc8} | cut -c 3-8) +cycle8=$(echo ${dc8} | cut -c 9,10) # DEFINE 9 CYCLES AGO -dc9=`$NDATE -138 ${PDY}${cyc} | cut -c -10` -date9=`echo ${dc9} | cut -c -8` -sdate9=`echo ${dc9} | cut -c 3-8` -cycle9=`echo ${dc9} | cut -c 9,10` +dc9=$($NDATE -138 ${PDY}${cyc} | cut -c -10) +date9=$(echo ${dc9} | cut -c -8) +sdate9=$(echo ${dc9} | cut -c 3-8) +cycle9=$(echo ${dc9} | cut -c 9,10) # SET CURRENT CYCLE AS THE VERIFICATION GRIDDED FILE. vergrid="F-GDAS | ${PDY2}/0600" diff --git a/gempak/ush/gempak_gdas_f000_gif.sh b/gempak/ush/gempak_gdas_f000_gif.sh index cc018da782..cdf7659155 100755 --- a/gempak/ush/gempak_gdas_f000_gif.sh +++ b/gempak/ush/gempak_gdas_f000_gif.sh @@ -38,7 +38,7 @@ # $WEBTITLE < dates ${UTILgfs}/exec/webtitle < dates - export TITLE=`cat title.output` + export TITLE=$(cat title.output) echo "\n\n TITLE = $TITLE \n" # Define labels and file names for Northern Hemisphere analysis charts @@ -67,7 +67,7 @@ # Set grid date and input file name - gdattim=`echo ${PDY} | cut -c3-8`/${cyc}00F000 + gdattim=$(echo ${PDY} | cut -c3-8)/${cyc}00F000 gdfile=gem_grids${fhr}.gem diff --git a/gempak/ush/gempak_gfs_f00_gif.sh b/gempak/ush/gempak_gfs_f00_gif.sh index b2acd3df95..172cb687a2 100755 --- a/gempak/ush/gempak_gfs_f00_gif.sh +++ b/gempak/ush/gempak_gfs_f00_gif.sh @@ -39,7 +39,7 @@ export FORT55="title.output" # $WEBTITLE < dates ${UTILgfs}/exec/webtitle < dates - export TITLE=`cat title.output` + export TITLE=$(cat title.output) echo "\n\n TITLE = $TITLE \n" # Define labels and file names for analysis charts @@ -95,7 +95,7 @@ # Set grid date and input file name - gdattim=`echo ${PDY} | cut -c3-8`/${cyc}00F000 + gdattim=$(echo ${PDY} | cut -c3-8)/${cyc}00F000 gdfile=gem_grids${fhr}.gem # Execute the GEMPAK program diff --git a/gempak/ush/gempak_gfs_f12_gif.sh b/gempak/ush/gempak_gfs_f12_gif.sh index 6df29e60c7..611252a2e2 100755 --- a/gempak/ush/gempak_gfs_f12_gif.sh +++ b/gempak/ush/gempak_gfs_f12_gif.sh @@ -40,7 +40,7 @@ # $WEBTITLE < dates ${UTILgfs}/exec/webtitle < dates - export TITLE=`cat title.output` + export TITLE=$(cat title.output) echo "\n\n TITLE = $TITLE \n" @@ -59,7 +59,7 @@ # Set grid date and input file name - gdattim=`echo ${PDY} | cut -c3-8`/${cyc}00F0${fhr} + gdattim=$(echo ${PDY} | cut -c3-8)/${cyc}00F0${fhr} gdfile=gem_grids${fhr}.gem # Execute the GEMPAK program diff --git a/gempak/ush/gempak_gfs_f24_gif.sh b/gempak/ush/gempak_gfs_f24_gif.sh index f83640b2b6..53670a29bd 100755 --- a/gempak/ush/gempak_gfs_f24_gif.sh +++ b/gempak/ush/gempak_gfs_f24_gif.sh @@ -48,7 +48,7 @@ # $WEBTITLE < dates ${UTILgfs}/exec/webtitle < dates - export TITLE=`cat title.output` + export TITLE=$(cat title.output) echo "\n\n TITLE = $TITLE \n" @@ -68,7 +68,7 @@ # Set grid date and input file name - gdattim=`echo ${PDY} | cut -c3-8`/${cyc}00F0${fhr} + gdattim=$(echo ${PDY} | cut -c3-8)/${cyc}00F0${fhr} gdfile=gem_grids${fhr}.gem diff --git a/gempak/ush/gempak_gfs_f36_gif.sh b/gempak/ush/gempak_gfs_f36_gif.sh index e5e5d5e30e..e1999090c0 100755 --- a/gempak/ush/gempak_gfs_f36_gif.sh +++ b/gempak/ush/gempak_gfs_f36_gif.sh @@ -47,7 +47,7 @@ # $WEBTITLE < dates ${UTILgfs}/exec/webtitle < dates - export TITLE=`cat title.output` + export TITLE=$(cat title.output) echo "\n\n TITLE = $TITLE \n" @@ -67,7 +67,7 @@ # Set grid date and input file name - gdattim=`echo ${PDY} | cut -c3-8`/${cyc}00F0${fhr} + gdattim=$(echo ${PDY} | cut -c3-8)/${cyc}00F0${fhr} gdfile=gem_grids${fhr}.gem diff --git a/gempak/ush/gempak_gfs_f48_gif.sh b/gempak/ush/gempak_gfs_f48_gif.sh index c82385b134..1e0ba532fd 100755 --- a/gempak/ush/gempak_gfs_f48_gif.sh +++ b/gempak/ush/gempak_gfs_f48_gif.sh @@ -47,7 +47,7 @@ # $WEBTITLE < dates ${UTILgfs}/exec/webtitle < dates - export TITLE=`cat title.output` + export TITLE=$(cat title.output) echo "\n\n TITLE = $TITLE \n" @@ -67,7 +67,7 @@ # Set grid date and input file name - gdattim=`echo ${PDY} | cut -c3-8`/${cyc}00F0${fhr} + gdattim=$(echo ${PDY} | cut -c3-8)/${cyc}00F0${fhr} gdfile=gem_grids${fhr}.gem diff --git a/gempak/ush/gfs_meta_ak.sh b/gempak/ush/gfs_meta_ak.sh index 75c34cd577..c258b7e83a 100755 --- a/gempak/ush/gfs_meta_ak.sh +++ b/gempak/ush/gfs_meta_ak.sh @@ -27,7 +27,7 @@ cd $DATA/ak cp $FIXgempak/datatype.tbl datatype.tbl device="nc | gfs.meta.ak" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) fend=F216 diff --git a/gempak/ush/gfs_meta_bwx.sh b/gempak/ush/gfs_meta_bwx.sh index 9af5f7ec47..f5b4e1d944 100755 --- a/gempak/ush/gfs_meta_bwx.sh +++ b/gempak/ush/gfs_meta_bwx.sh @@ -31,7 +31,7 @@ MDL="GFS" metatype="bwx" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # #if [ ${cyc} -eq 00 ] ; then # fend=F126 diff --git a/gempak/ush/gfs_meta_comp.sh b/gempak/ush/gfs_meta_comp.sh index ff7f31378e..4e9a3d8820 100755 --- a/gempak/ush/gfs_meta_comp.sh +++ b/gempak/ush/gfs_meta_comp.sh @@ -38,7 +38,7 @@ MDL=GFS metatype="comp" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # #XXW export MODEL=$COMROOT/nawips/prod # BV export MODEL=$COMROOT/nawips/${envir} @@ -73,16 +73,16 @@ export HPCNAM=${COMINnam}.$PDY/gempak # export HPCNGM=$COMROOT/nawips/prod/ngm.$PDY # # DEFINE YESTERDAY -PDYm1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -PDY2m1=`echo $PDYm1 | cut -c 3-` +PDYm1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +PDY2m1=$(echo $PDYm1 | cut -c 3-) # # DEFINE 2 DAYS AGO -PDYm2=`$NDATE -48 ${PDY}${cyc} | cut -c -8` -PDY2m2=`echo $PDYm2 | cut -c 3-` +PDYm2=$($NDATE -48 ${PDY}${cyc} | cut -c -8) +PDY2m2=$(echo $PDYm2 | cut -c 3-) # # DEFINE 3 DAYS AGO -PDYm3=`$NDATE -72 ${PDY}${cyc} | cut -c -8` -PDY2m3=`echo $PDYm3 | cut -c 3-` +PDYm3=$($NDATE -72 ${PDY}${cyc} | cut -c -8) +PDY2m3=$(echo $PDYm3 | cut -c 3-) # # THE 1200 UTC CYCLE # @@ -147,8 +147,8 @@ if [ ${cyc} -eq 12 ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z VS ${desc} ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr=F${gfsfhr} if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -157,10 +157,10 @@ if [ ${cyc} -eq 12 ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg @@ -223,7 +223,7 @@ export err=$?;err_chk # for gfsfhr in 00 12 24 36 48 60 84 108 for gfsfhr in 00 12 24 84 108 do - ukmetfhr=F`expr ${gfsfhr} + 12` + ukmetfhr=F$(expr ${gfsfhr} + 12) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg @@ -303,7 +303,7 @@ export err=$?;err_chk grid2=${COMINecmwf}.${PDYm1}/gempak/ecmwf_glob_${PDYm1}12 for gfsfhr in 00 24 48 72 96 120 do - ecmwffhr=F`expr ${gfsfhr} + 24` + ecmwffhr=F$(expr ${gfsfhr} + 24) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg @@ -523,8 +523,8 @@ if [ ${cyc} -eq 00 ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z VS ${desc} ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr=F${gfsfhr} if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -533,10 +533,10 @@ if [ ${cyc} -eq 00 ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg @@ -599,7 +599,7 @@ export err=$?;err_chk # for gfsfhr in 00 12 24 36 48 60 84 108 for gfsfhr in 00 12 24 84 108 do - ukmetfhr=F`expr ${gfsfhr} + 12` + ukmetfhr=F$(expr ${gfsfhr} + 12) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg @@ -680,7 +680,7 @@ export err=$?;err_chk grid2="${COMINecmwf}.${PDYm1}/gempak/ecmwf_glob_${PDYm1}12" for gfsfhr in 12 36 60 84 108 do - ecmwffhr=F`expr ${gfsfhr} + 12` + ecmwffhr=F$(expr ${gfsfhr} + 12) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg @@ -894,8 +894,8 @@ if [ ${cyc} -eq 18 ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z VS ${desc} ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr="F${gfsfhr}" if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -904,10 +904,10 @@ if [ ${cyc} -eq 18 ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg $GEMEXE/gdplot2_nc << EOF @@ -1024,8 +1024,8 @@ if [ ${cyc} -eq 06 ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z VS ${desc} ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr="F${gfsfhr}" if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -1034,10 +1034,10 @@ if [ ${cyc} -eq 06 ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg $GEMEXE/gdplot2_nc << EOF diff --git a/gempak/ush/gfs_meta_crb.sh b/gempak/ush/gfs_meta_crb.sh index 25bddbd4b0..4800578238 100755 --- a/gempak/ush/gfs_meta_crb.sh +++ b/gempak/ush/gfs_meta_crb.sh @@ -24,11 +24,11 @@ MDL=GFS metatype="crb" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # # DEFINE YESTERDAY -PDYm1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -PDY2m1=`echo ${PDYm1} | cut -c 3-` +PDYm1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +PDY2m1=$(echo ${PDYm1} | cut -c 3-) # #if [ ${cyc} -eq 00 ] ; then # fend=F126 @@ -270,7 +270,7 @@ if [ ${cyc} -eq 00 ] ; then grid3="F-UKMETHPC | ${PDY2m1}/1200" for gfsfhr in 12 36 60 84 108 do - ecmwffhr="F`expr ${gfsfhr} + 12`" + ecmwffhr="F$(expr ${gfsfhr} + 12)" gfsfhr="F${gfsfhr}" export pgm=gdplot2_nc;. prep_step; startmsg @@ -335,7 +335,7 @@ export err=$?;err_chk done for gfsfhr in 00 12 24 36 48 60 84 108 132 do - ukmetfhr="F`expr ${gfsfhr} + 12`" + ukmetfhr="F$(expr ${gfsfhr} + 12)" gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_hi.sh b/gempak/ush/gfs_meta_hi.sh index fd2244744e..2b47474e12 100755 --- a/gempak/ush/gfs_meta_hi.sh +++ b/gempak/ush/gfs_meta_hi.sh @@ -23,7 +23,7 @@ cp $FIXgempak/datatype.tbl datatype.tbl device="nc | mrfhi.meta" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) if [ "$envir" = "prod" ] ; then export m_title="GFS" diff --git a/gempak/ush/gfs_meta_hur.sh b/gempak/ush/gfs_meta_hur.sh index 011f9c9200..9590f07b3e 100755 --- a/gempak/ush/gfs_meta_hur.sh +++ b/gempak/ush/gfs_meta_hur.sh @@ -32,11 +32,11 @@ MDL=GFS metatype="hur" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # # DEFINE YESTERDAY -PDYm1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -PDY2m1=`echo ${PDYm1} | cut -c 3-` +PDYm1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +PDY2m1=$(echo ${PDYm1} | cut -c 3-) # if [ ${cyc} -eq 00 ] ; then gdat="F000-F126-06" @@ -344,7 +344,7 @@ if [ ${cyc} -eq 00 ] ; then grid3="F-UKMETHPC | ${PDY2}/${cyc}00" for gfsfhr in 12 36 60 84 108 do - ecmwffhr="F`expr ${gfsfhr} + 12`" + ecmwffhr="F$(expr ${gfsfhr} + 12)" gfsfhr="F${gfsfhr}" export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_mar_atl.sh b/gempak/ush/gfs_meta_mar_atl.sh index 7cc1e706cf..c8db3e59d4 100755 --- a/gempak/ush/gfs_meta_mar_atl.sh +++ b/gempak/ush/gfs_meta_mar_atl.sh @@ -19,7 +19,7 @@ MDL="GFS" metatype="mar_atl" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_mar_comp.sh b/gempak/ush/gfs_meta_mar_comp.sh index c475542131..d7262814b5 100755 --- a/gempak/ush/gfs_meta_mar_comp.sh +++ b/gempak/ush/gfs_meta_mar_comp.sh @@ -27,7 +27,7 @@ MDL="GFS" metatype="mar_comp" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # # BV export MODEL=/com/nawips/prod #XXW export HPCGFS=${MODEL}/${mdl}.$PDY @@ -60,16 +60,16 @@ export HPCNAM=${COMINnam}.$PDY/gempak # export HPCNGM=${MODEL}/ngm.$PDY # # DEFINE YESTERDAY -PDYm1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -PDY2m1=`echo $PDYm1 | cut -c 3-` +PDYm1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +PDY2m1=$(echo $PDYm1 | cut -c 3-) # # DEFINE 2 DAYS AGO -PDYm2=`$NDATE -48 ${PDY}${cyc} | cut -c -8` -PDY2m2=`echo $PDYm2 | cut -c 3-` +PDYm2=$($NDATE -48 ${PDY}${cyc} | cut -c -8) +PDY2m2=$(echo $PDYm2 | cut -c 3-) # # DEFINE 3 DAYS AGO -PDYm3=`$NDATE -72 ${PDY}${cyc} | cut -c -8` -PDY2m3=`echo $PDYm3 | cut -c 3-` +PDYm3=$($NDATE -72 ${PDY}${cyc} | cut -c -8) +PDY2m3=$(echo $PDYm3 | cut -c 3-) # # THE 1200 UTC CYCLE # @@ -112,8 +112,8 @@ if [ ${cyc} -eq 12 ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z vs ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr=F${gfsfhr} if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -122,10 +122,10 @@ if [ ${cyc} -eq 12 ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg @@ -186,7 +186,7 @@ export err=$?;err_chk # for gfsfhr in 00 12 24 36 48 60 84 108 for gfsfhr in 00 12 24 84 108 do - ukmetfhr=F`expr ${gfsfhr} + 12` + ukmetfhr=F$(expr ${gfsfhr} + 12) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg @@ -264,7 +264,7 @@ export err=$?;err_chk grid2=${COMINecmwf}.${PDYm1}/gempak/ecmwf_glob_${PDYm1}12 for gfsfhr in 00 24 48 72 96 120 do - ecmwffhr=F`expr ${gfsfhr} + 24` + ecmwffhr=F$(expr ${gfsfhr} + 24) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg @@ -465,8 +465,8 @@ if [ ${cyc} = "00" ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z vs ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr=F${gfsfhr} if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -475,10 +475,10 @@ if [ ${cyc} = "00" ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg $GEMEXE/gdplot2_nc << EOF @@ -539,7 +539,7 @@ export err=$?;err_chk # for gfsfhr in 00 12 24 36 48 60 84 108 for gfsfhr in 00 12 24 84 108 do - ukmetfhr=F`expr ${gfsfhr} + 12` + ukmetfhr=F$(expr ${gfsfhr} + 12) gfsfhr=F${gfsfhr} export pgm=gdplot2_nc;. prep_step; startmsg $GEMEXE/gdplot2_nc << EOF @@ -617,7 +617,7 @@ export err=$?;err_chk grid2="${COMINecmwf}.${PDYm1}/gempak/ecmwf_glob_${PDYm1}12" for gfsfhr in 12 36 60 84 108 do - ecmwffhr=F`expr ${gfsfhr} + 12` + ecmwffhr=F$(expr ${gfsfhr} + 12) gfsfhr=F${gfsfhr} $GEMEXE/gdplot2_nc << EOF @@ -813,8 +813,8 @@ if [ ${cyc} -eq "18" ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z vs ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr="F${gfsfhr}" if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -823,10 +823,10 @@ if [ ${cyc} -eq "18" ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg @@ -925,8 +925,8 @@ if [ ${cyc} -eq "06" ] ; then title4="5/-2/~ ? ^ ${MDL} PMSL (${cyc}Z YELLOW)|^${gareas} ${cyc}Z vs ${cyc2}Z PMSL" for gfsfhr in 00 06 12 18 24 30 36 42 48 54 60 66 72 78 84 do - gfsoldfhr=F`expr ${gfsfhr} + ${add}` - gfsfhr2=`echo ${gfsfhr}` + gfsoldfhr=F$(expr ${gfsfhr} + ${add}) + gfsfhr2=$(echo ${gfsfhr}) gfsfhr="F${gfsfhr}" if [ ${gfsfhr2} -gt ${testgfsfhr} ] ; then grid="F-${MDL} | ${PDY2}/${cyc}00" @@ -935,10 +935,10 @@ if [ ${cyc} -eq "06" ] ; then gdpfun1="sm5s(hght)" gdpfun2="sm5s(pmsl)" line="5/1/3/2/2" - hilo1=`echo ${hilo3}` - hilo2=`echo ${hilo4}` - title1=`echo ${title3}` - title2=`echo ${title4}` + hilo1=$(echo ${hilo3}) + hilo2=$(echo ${hilo4}) + title1=$(echo ${title3}) + title2=$(echo ${title4}) fi export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_mar_pac.sh b/gempak/ush/gfs_meta_mar_pac.sh index d65fc9f2d4..b44f60a2f7 100755 --- a/gempak/ush/gfs_meta_mar_pac.sh +++ b/gempak/ush/gfs_meta_mar_pac.sh @@ -19,7 +19,7 @@ MDL="GFS" metatype="mar_pac" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_mar_ql.sh b/gempak/ush/gfs_meta_mar_ql.sh index e5d1c9a1e3..f1abf3d395 100755 --- a/gempak/ush/gfs_meta_mar_ql.sh +++ b/gempak/ush/gfs_meta_mar_ql.sh @@ -19,7 +19,7 @@ MDL="GFS" metatype="mar_ql" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # fend=180 export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_mar_skewt.sh b/gempak/ush/gfs_meta_mar_skewt.sh index 3348223a92..040e09e932 100755 --- a/gempak/ush/gfs_meta_mar_skewt.sh +++ b/gempak/ush/gfs_meta_mar_skewt.sh @@ -19,7 +19,7 @@ MDL="GFS" metatype="mar_skewt" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) for fhr in 000 006 012 018 024 030 036 042 048 054 060 066 072 do diff --git a/gempak/ush/gfs_meta_mar_ver.sh b/gempak/ush/gfs_meta_mar_ver.sh index ba2e646981..63ccba00ed 100755 --- a/gempak/ush/gfs_meta_mar_ver.sh +++ b/gempak/ush/gfs_meta_mar_ver.sh @@ -19,7 +19,7 @@ MDL="GFS" metatype="mar_ver" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) export pgm=gdplot2_nc;. prep_step; startmsg diff --git a/gempak/ush/gfs_meta_nhsh.sh b/gempak/ush/gfs_meta_nhsh.sh index daa567cce4..3e0146270e 100755 --- a/gempak/ush/gfs_meta_nhsh.sh +++ b/gempak/ush/gfs_meta_nhsh.sh @@ -21,7 +21,7 @@ mkdir -p -m 775 $DATA/mrfnhsh cd $DATA/mrfnhsh cp $FIXgempak/datatype.tbl datatype.tbl -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) if [ "$envir" = "para" ] ; then export m_title="GFSP" diff --git a/gempak/ush/gfs_meta_opc_na_ver b/gempak/ush/gfs_meta_opc_na_ver index ef1ae56d60..8d5f394b3d 100755 --- a/gempak/ush/gfs_meta_opc_na_ver +++ b/gempak/ush/gfs_meta_opc_na_ver @@ -21,113 +21,113 @@ MDL="GFS" metatype="ver" metaname="gfsver_mpc_na_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # # DEFINE 1 CYCLE AGO -dc1=`$NDATE -06 ${PDY}${cyc} | cut -c -10` -date1=`echo ${dc1} | cut -c -8` -sdate1=`echo ${dc1} | cut -c 3-8` -cycle1=`echo ${dc1} | cut -c 9,10` +dc1=$($NDATE -06 ${PDY}${cyc} | cut -c -10) +date1=$(echo ${dc1} | cut -c -8) +sdate1=$(echo ${dc1} | cut -c 3-8) +cycle1=$(echo ${dc1} | cut -c 9,10) # DEFINE 2 CYCLES AGO -dc2=`$NDATE -12 ${PDY}${cyc} | cut -c -10` -date2=`echo ${dc2} | cut -c -8` -sdate2=`echo ${dc2} | cut -c 3-8` -cycle2=`echo ${dc2} | cut -c 9,10` +dc2=$($NDATE -12 ${PDY}${cyc} | cut -c -10) +date2=$(echo ${dc2} | cut -c -8) +sdate2=$(echo ${dc2} | cut -c 3-8) +cycle2=$(echo ${dc2} | cut -c 9,10) # DEFINE 3 CYCLES AGO -dc3=`$NDATE -18 ${PDY}${cyc} | cut -c -10` -date3=`echo ${dc3} | cut -c -8` -sdate3=`echo ${dc3} | cut -c 3-8` -cycle3=`echo ${dc3} | cut -c 9,10` +dc3=$($NDATE -18 ${PDY}${cyc} | cut -c -10) +date3=$(echo ${dc3} | cut -c -8) +sdate3=$(echo ${dc3} | cut -c 3-8) +cycle3=$(echo ${dc3} | cut -c 9,10) # DEFINE 4 CYCLES AGO -dc4=`$NDATE -24 ${PDY}${cyc} | cut -c -10` -date4=`echo ${dc4} | cut -c -8` -sdate4=`echo ${dc4} | cut -c 3-8` -cycle4=`echo ${dc4} | cut -c 9,10` +dc4=$($NDATE -24 ${PDY}${cyc} | cut -c -10) +date4=$(echo ${dc4} | cut -c -8) +sdate4=$(echo ${dc4} | cut -c 3-8) +cycle4=$(echo ${dc4} | cut -c 9,10) # DEFINE 5 CYCLES AGO -dc5=`$NDATE -30 ${PDY}${cyc} | cut -c -10` -date5=`echo ${dc5} | cut -c -8` -sdate5=`echo ${dc5} | cut -c 3-8` -cycle5=`echo ${dc5} | cut -c 9,10` +dc5=$($NDATE -30 ${PDY}${cyc} | cut -c -10) +date5=$(echo ${dc5} | cut -c -8) +sdate5=$(echo ${dc5} | cut -c 3-8) +cycle5=$(echo ${dc5} | cut -c 9,10) # DEFINE 6 CYCLES AGO -dc6=`$NDATE -36 ${PDY}${cyc} | cut -c -10` -date6=`echo ${dc6} | cut -c -8` -sdate6=`echo ${dc6} | cut -c 3-8` -cycle6=`echo ${dc6} | cut -c 9,10` +dc6=$($NDATE -36 ${PDY}${cyc} | cut -c -10) +date6=$(echo ${dc6} | cut -c -8) +sdate6=$(echo ${dc6} | cut -c 3-8) +cycle6=$(echo ${dc6} | cut -c 9,10) # DEFINE 7 CYCLES AGO -dc7=`$NDATE -42 ${PDY}${cyc} | cut -c -10` -date7=`echo ${dc7} | cut -c -8` -sdate7=`echo ${dc7} | cut -c 3-8` -cycle7=`echo ${dc7} | cut -c 9,10` +dc7=$($NDATE -42 ${PDY}${cyc} | cut -c -10) +date7=$(echo ${dc7} | cut -c -8) +sdate7=$(echo ${dc7} | cut -c 3-8) +cycle7=$(echo ${dc7} | cut -c 9,10) # DEFINE 8 CYCLES AGO -dc8=`$NDATE -48 ${PDY}${cyc} | cut -c -10` -date8=`echo ${dc8} | cut -c -8` -sdate8=`echo ${dc8} | cut -c 3-8` -cycle8=`echo ${dc8} | cut -c 9,10` +dc8=$($NDATE -48 ${PDY}${cyc} | cut -c -10) +date8=$(echo ${dc8} | cut -c -8) +sdate8=$(echo ${dc8} | cut -c 3-8) +cycle8=$(echo ${dc8} | cut -c 9,10) # DEFINE 9 CYCLES AGO -dc9=`$NDATE -54 ${PDY}${cyc} | cut -c -10` -date9=`echo ${dc9} | cut -c -8` -sdate9=`echo ${dc9} | cut -c 3-8` -cycle9=`echo ${dc9} | cut -c 9,10` +dc9=$($NDATE -54 ${PDY}${cyc} | cut -c -10) +date9=$(echo ${dc9} | cut -c -8) +sdate9=$(echo ${dc9} | cut -c 3-8) +cycle9=$(echo ${dc9} | cut -c 9,10) # DEFINE 10 CYCLES AGO -dc10=`$NDATE -60 ${PDY}${cyc} | cut -c -10` -date10=`echo ${dc10} | cut -c -8` -sdate10=`echo ${dc10} | cut -c 3-8` -cycle10=`echo ${dc10} | cut -c 9,10` +dc10=$($NDATE -60 ${PDY}${cyc} | cut -c -10) +date10=$(echo ${dc10} | cut -c -8) +sdate10=$(echo ${dc10} | cut -c 3-8) +cycle10=$(echo ${dc10} | cut -c 9,10) # DEFINE 11 CYCLES AGO -dc11=`$NDATE -66 ${PDY}${cyc} | cut -c -10` -date11=`echo ${dc11} | cut -c -8` -sdate11=`echo ${dc11} | cut -c 3-8` -cycle11=`echo ${dc11} | cut -c 9,10` +dc11=$($NDATE -66 ${PDY}${cyc} | cut -c -10) +date11=$(echo ${dc11} | cut -c -8) +sdate11=$(echo ${dc11} | cut -c 3-8) +cycle11=$(echo ${dc11} | cut -c 9,10) # DEFINE 12 CYCLES AGO -dc12=`$NDATE -72 ${PDY}${cyc} | cut -c -10` -date12=`echo ${dc12} | cut -c -8` -sdate12=`echo ${dc12} | cut -c 3-8` -cycle12=`echo ${dc12} | cut -c 9,10` +dc12=$($NDATE -72 ${PDY}${cyc} | cut -c -10) +date12=$(echo ${dc12} | cut -c -8) +sdate12=$(echo ${dc12} | cut -c 3-8) +cycle12=$(echo ${dc12} | cut -c 9,10) # DEFINE 13 CYCLES AGO -dc13=`$NDATE -78 ${PDY}${cyc} | cut -c -10` -date13=`echo ${dc13} | cut -c -8` -sdate13=`echo ${dc13} | cut -c 3-8` -cycle13=`echo ${dc13} | cut -c 9,10` +dc13=$($NDATE -78 ${PDY}${cyc} | cut -c -10) +date13=$(echo ${dc13} | cut -c -8) +sdate13=$(echo ${dc13} | cut -c 3-8) +cycle13=$(echo ${dc13} | cut -c 9,10) # DEFINE 14 CYCLES AGO -dc14=`$NDATE -84 ${PDY}${cyc} | cut -c -10` -date14=`echo ${dc14} | cut -c -8` -sdate14=`echo ${dc14} | cut -c 3-8` -cycle14=`echo ${dc14} | cut -c 9,10` +dc14=$($NDATE -84 ${PDY}${cyc} | cut -c -10) +date14=$(echo ${dc14} | cut -c -8) +sdate14=$(echo ${dc14} | cut -c 3-8) +cycle14=$(echo ${dc14} | cut -c 9,10) # DEFINE 15 CYCLES AGO -dc15=`$NDATE -90 ${PDY}${cyc} | cut -c -10` -date15=`echo ${dc15} | cut -c -8` -sdate15=`echo ${dc15} | cut -c 3-8` -cycle15=`echo ${dc15} | cut -c 9,10` +dc15=$($NDATE -90 ${PDY}${cyc} | cut -c -10) +date15=$(echo ${dc15} | cut -c -8) +sdate15=$(echo ${dc15} | cut -c 3-8) +cycle15=$(echo ${dc15} | cut -c 9,10) # DEFINE 16 CYCLES AGO -dc16=`$NDATE -96 ${PDY}${cyc} | cut -c -10` -date16=`echo ${dc16} | cut -c -8` -sdate16=`echo ${dc16} | cut -c 3-8` -cycle16=`echo ${dc16} | cut -c 9,10` +dc16=$($NDATE -96 ${PDY}${cyc} | cut -c -10) +date16=$(echo ${dc16} | cut -c -8) +sdate16=$(echo ${dc16} | cut -c 3-8) +cycle16=$(echo ${dc16} | cut -c 9,10) # DEFINE 17 CYCLES AGO -dc17=`$NDATE -102 ${PDY}${cyc} | cut -c -10` -date17=`echo ${dc17} | cut -c -8` -sdate17=`echo ${dc17} | cut -c 3-8` -cycle17=`echo ${dc17} | cut -c 9,10` +dc17=$($NDATE -102 ${PDY}${cyc} | cut -c -10) +date17=$(echo ${dc17} | cut -c -8) +sdate17=$(echo ${dc17} | cut -c 3-8) +cycle17=$(echo ${dc17} | cut -c 9,10) # DEFINE 18 CYCLES AGO -dc18=`$NDATE -108 ${PDY}${cyc} | cut -c -10` -date18=`echo ${dc18} | cut -c -8` -sdate18=`echo ${dc18} | cut -c 3-8` -cycle18=`echo ${dc18} | cut -c 9,10` +dc18=$($NDATE -108 ${PDY}${cyc} | cut -c -10) +date18=$(echo ${dc18} | cut -c -8) +sdate18=$(echo ${dc18} | cut -c 3-8) +cycle18=$(echo ${dc18} | cut -c 9,10) # DEFINE 19 CYCLES AGO -dc19=`$NDATE -114 ${PDY}${cyc} | cut -c -10` -date19=`echo ${dc19} | cut -c -8` -sdate19=`echo ${dc19} | cut -c 3-8` -cycle19=`echo ${dc19} | cut -c 9,10` +dc19=$($NDATE -114 ${PDY}${cyc} | cut -c -10) +date19=$(echo ${dc19} | cut -c -8) +sdate19=$(echo ${dc19} | cut -c 3-8) +cycle19=$(echo ${dc19} | cut -c 9,10) # DEFINE 20 CYCLES AGO -dc20=`$NDATE -120 ${PDY}${cyc} | cut -c -10` -date20=`echo ${dc20} | cut -c -8` -sdate20=`echo ${dc20} | cut -c 3-8` -cycle20=`echo ${dc20} | cut -c 9,10` +dc20=$($NDATE -120 ${PDY}${cyc} | cut -c -10) +date20=$(echo ${dc20} | cut -c -8) +sdate20=$(echo ${dc20} | cut -c 3-8) +cycle20=$(echo ${dc20} | cut -c 9,10) # DEFINE 21 CYCLES AGO -dc21=`$NDATE -126 ${PDY}${cyc} | cut -c -10` -date21=`echo ${dc21} | cut -c -8` -sdate21=`echo ${dc21} | cut -c 3-8` -cycle21=`echo ${dc21} | cut -c 9,10` +dc21=$($NDATE -126 ${PDY}${cyc} | cut -c -10) +date21=$(echo ${dc21} | cut -c -8) +sdate21=$(echo ${dc21} | cut -c 3-8) +cycle21=$(echo ${dc21} | cut -c 9,10) # SET CURRENT CYCLE AS THE VERIFICATION GRIDDED FILE. vergrid="F-${MDL} | ${PDY2}/${cyc}00" @@ -146,7 +146,7 @@ fi MDL2="GFSHPC" for verday in ${verdays} do - cominday=`echo ${verday} | cut -c -8` + cominday=$(echo ${verday} | cut -c -8) #XXW export HPCGFS=$COMROOT/nawips/prod/${mdl}.${cominday} # BV export HPCGFS=$COMROOT/nawips/${envir}/${mdl}.${cominday} export HPCGFS=${COMINgempak}/${mdl}.${cominday}/${cyc}/${COMPONENT}/gempak diff --git a/gempak/ush/gfs_meta_opc_np_ver b/gempak/ush/gfs_meta_opc_np_ver index dfb320ea82..5cb9fba3c9 100755 --- a/gempak/ush/gfs_meta_opc_np_ver +++ b/gempak/ush/gfs_meta_opc_np_ver @@ -21,114 +21,114 @@ MDL="GFS" metatype="ver" metaname="gfsver_mpc_np_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # # # DEFINE 1 CYCLE AGO -dc1=`$NDATE -06 ${PDY}${cyc} | cut -c -10` -date1=`echo ${dc1} | cut -c -8` -sdate1=`echo ${dc1} | cut -c 3-8` -cycle1=`echo ${dc1} | cut -c 9,10` +dc1=$($NDATE -06 ${PDY}${cyc} | cut -c -10) +date1=$(echo ${dc1} | cut -c -8) +sdate1=$(echo ${dc1} | cut -c 3-8) +cycle1=$(echo ${dc1} | cut -c 9,10) # DEFINE 2 CYCLES AGO -dc2=`$NDATE -12 ${PDY}${cyc} | cut -c -10` -date2=`echo ${dc2} | cut -c -8` -sdate2=`echo ${dc2} | cut -c 3-8` -cycle2=`echo ${dc2} | cut -c 9,10` +dc2=$($NDATE -12 ${PDY}${cyc} | cut -c -10) +date2=$(echo ${dc2} | cut -c -8) +sdate2=$(echo ${dc2} | cut -c 3-8) +cycle2=$(echo ${dc2} | cut -c 9,10) # DEFINE 3 CYCLES AGO -dc3=`$NDATE -18 ${PDY}${cyc} | cut -c -10` -date3=`echo ${dc3} | cut -c -8` -sdate3=`echo ${dc3} | cut -c 3-8` -cycle3=`echo ${dc3} | cut -c 9,10` +dc3=$($NDATE -18 ${PDY}${cyc} | cut -c -10) +date3=$(echo ${dc3} | cut -c -8) +sdate3=$(echo ${dc3} | cut -c 3-8) +cycle3=$(echo ${dc3} | cut -c 9,10) # DEFINE 4 CYCLES AGO -dc4=`$NDATE -24 ${PDY}${cyc} | cut -c -10` -date4=`echo ${dc4} | cut -c -8` -sdate4=`echo ${dc4} | cut -c 3-8` -cycle4=`echo ${dc4} | cut -c 9,10` +dc4=$($NDATE -24 ${PDY}${cyc} | cut -c -10) +date4=$(echo ${dc4} | cut -c -8) +sdate4=$(echo ${dc4} | cut -c 3-8) +cycle4=$(echo ${dc4} | cut -c 9,10) # DEFINE 5 CYCLES AGO -dc5=`$NDATE -30 ${PDY}${cyc} | cut -c -10` -date5=`echo ${dc5} | cut -c -8` -sdate5=`echo ${dc5} | cut -c 3-8` -cycle5=`echo ${dc5} | cut -c 9,10` +dc5=$($NDATE -30 ${PDY}${cyc} | cut -c -10) +date5=$(echo ${dc5} | cut -c -8) +sdate5=$(echo ${dc5} | cut -c 3-8) +cycle5=$(echo ${dc5} | cut -c 9,10) # DEFINE 6 CYCLES AGO -dc6=`$NDATE -36 ${PDY}${cyc} | cut -c -10` -date6=`echo ${dc6} | cut -c -8` -sdate6=`echo ${dc6} | cut -c 3-8` -cycle6=`echo ${dc6} | cut -c 9,10` +dc6=$($NDATE -36 ${PDY}${cyc} | cut -c -10) +date6=$(echo ${dc6} | cut -c -8) +sdate6=$(echo ${dc6} | cut -c 3-8) +cycle6=$(echo ${dc6} | cut -c 9,10) # DEFINE 7 CYCLES AGO -dc7=`$NDATE -42 ${PDY}${cyc} | cut -c -10` -date7=`echo ${dc7} | cut -c -8` -sdate7=`echo ${dc7} | cut -c 3-8` -cycle7=`echo ${dc7} | cut -c 9,10` +dc7=$($NDATE -42 ${PDY}${cyc} | cut -c -10) +date7=$(echo ${dc7} | cut -c -8) +sdate7=$(echo ${dc7} | cut -c 3-8) +cycle7=$(echo ${dc7} | cut -c 9,10) # DEFINE 8 CYCLES AGO -dc8=`$NDATE -48 ${PDY}${cyc} | cut -c -10` -date8=`echo ${dc8} | cut -c -8` -sdate8=`echo ${dc8} | cut -c 3-8` -cycle8=`echo ${dc8} | cut -c 9,10` +dc8=$($NDATE -48 ${PDY}${cyc} | cut -c -10) +date8=$(echo ${dc8} | cut -c -8) +sdate8=$(echo ${dc8} | cut -c 3-8) +cycle8=$(echo ${dc8} | cut -c 9,10) # DEFINE 9 CYCLES AGO -dc9=`$NDATE -54 ${PDY}${cyc} | cut -c -10` -date9=`echo ${dc9} | cut -c -8` -sdate9=`echo ${dc9} | cut -c 3-8` -cycle9=`echo ${dc9} | cut -c 9,10` +dc9=$($NDATE -54 ${PDY}${cyc} | cut -c -10) +date9=$(echo ${dc9} | cut -c -8) +sdate9=$(echo ${dc9} | cut -c 3-8) +cycle9=$(echo ${dc9} | cut -c 9,10) # DEFINE 10 CYCLES AGO -dc10=`$NDATE -60 ${PDY}${cyc} | cut -c -10` -date10=`echo ${dc10} | cut -c -8` -sdate10=`echo ${dc10} | cut -c 3-8` -cycle10=`echo ${dc10} | cut -c 9,10` +dc10=$($NDATE -60 ${PDY}${cyc} | cut -c -10) +date10=$(echo ${dc10} | cut -c -8) +sdate10=$(echo ${dc10} | cut -c 3-8) +cycle10=$(echo ${dc10} | cut -c 9,10) # DEFINE 11 CYCLES AGO -dc11=`$NDATE -66 ${PDY}${cyc} | cut -c -10` -date11=`echo ${dc11} | cut -c -8` -sdate11=`echo ${dc11} | cut -c 3-8` -cycle11=`echo ${dc11} | cut -c 9,10` +dc11=$($NDATE -66 ${PDY}${cyc} | cut -c -10) +date11=$(echo ${dc11} | cut -c -8) +sdate11=$(echo ${dc11} | cut -c 3-8) +cycle11=$(echo ${dc11} | cut -c 9,10) # DEFINE 12 CYCLES AGO -dc12=`$NDATE -72 ${PDY}${cyc} | cut -c -10` -date12=`echo ${dc12} | cut -c -8` -sdate12=`echo ${dc12} | cut -c 3-8` -cycle12=`echo ${dc12} | cut -c 9,10` +dc12=$($NDATE -72 ${PDY}${cyc} | cut -c -10) +date12=$(echo ${dc12} | cut -c -8) +sdate12=$(echo ${dc12} | cut -c 3-8) +cycle12=$(echo ${dc12} | cut -c 9,10) # DEFINE 13 CYCLES AGO -dc13=`$NDATE -78 ${PDY}${cyc} | cut -c -10` -date13=`echo ${dc13} | cut -c -8` -sdate13=`echo ${dc13} | cut -c 3-8` -cycle13=`echo ${dc13} | cut -c 9,10` +dc13=$($NDATE -78 ${PDY}${cyc} | cut -c -10) +date13=$(echo ${dc13} | cut -c -8) +sdate13=$(echo ${dc13} | cut -c 3-8) +cycle13=$(echo ${dc13} | cut -c 9,10) # DEFINE 14 CYCLES AGO -dc14=`$NDATE -84 ${PDY}${cyc} | cut -c -10` -date14=`echo ${dc14} | cut -c -8` -sdate14=`echo ${dc14} | cut -c 3-8` -cycle14=`echo ${dc14} | cut -c 9,10` +dc14=$($NDATE -84 ${PDY}${cyc} | cut -c -10) +date14=$(echo ${dc14} | cut -c -8) +sdate14=$(echo ${dc14} | cut -c 3-8) +cycle14=$(echo ${dc14} | cut -c 9,10) # DEFINE 15 CYCLES AGO -dc15=`$NDATE -90 ${PDY}${cyc} | cut -c -10` -date15=`echo ${dc15} | cut -c -8` -sdate15=`echo ${dc15} | cut -c 3-8` -cycle15=`echo ${dc15} | cut -c 9,10` +dc15=$($NDATE -90 ${PDY}${cyc} | cut -c -10) +date15=$(echo ${dc15} | cut -c -8) +sdate15=$(echo ${dc15} | cut -c 3-8) +cycle15=$(echo ${dc15} | cut -c 9,10) # DEFINE 16 CYCLES AGO -dc16=`$NDATE -96 ${PDY}${cyc} | cut -c -10` -date16=`echo ${dc16} | cut -c -8` -sdate16=`echo ${dc16} | cut -c 3-8` -cycle16=`echo ${dc16} | cut -c 9,10` +dc16=$($NDATE -96 ${PDY}${cyc} | cut -c -10) +date16=$(echo ${dc16} | cut -c -8) +sdate16=$(echo ${dc16} | cut -c 3-8) +cycle16=$(echo ${dc16} | cut -c 9,10) # DEFINE 17 CYCLES AGO -dc17=`$NDATE -102 ${PDY}${cyc} | cut -c -10` -date17=`echo ${dc17} | cut -c -8` -sdate17=`echo ${dc17} | cut -c 3-8` -cycle17=`echo ${dc17} | cut -c 9,10` +dc17=$($NDATE -102 ${PDY}${cyc} | cut -c -10) +date17=$(echo ${dc17} | cut -c -8) +sdate17=$(echo ${dc17} | cut -c 3-8) +cycle17=$(echo ${dc17} | cut -c 9,10) # DEFINE 18 CYCLES AGO -dc18=`$NDATE -108 ${PDY}${cyc} | cut -c -10` -date18=`echo ${dc18} | cut -c -8` -sdate18=`echo ${dc18} | cut -c 3-8` -cycle18=`echo ${dc18} | cut -c 9,10` +dc18=$($NDATE -108 ${PDY}${cyc} | cut -c -10) +date18=$(echo ${dc18} | cut -c -8) +sdate18=$(echo ${dc18} | cut -c 3-8) +cycle18=$(echo ${dc18} | cut -c 9,10) # DEFINE 19 CYCLES AGO -dc19=`$NDATE -114 ${PDY}${cyc} | cut -c -10` -date19=`echo ${dc19} | cut -c -8` -sdate19=`echo ${dc19} | cut -c 3-8` -cycle19=`echo ${dc19} | cut -c 9,10` +dc19=$($NDATE -114 ${PDY}${cyc} | cut -c -10) +date19=$(echo ${dc19} | cut -c -8) +sdate19=$(echo ${dc19} | cut -c 3-8) +cycle19=$(echo ${dc19} | cut -c 9,10) # DEFINE 20 CYCLES AGO -dc20=`$NDATE -120 ${PDY}${cyc} | cut -c -10` -date20=`echo ${dc20} | cut -c -8` -sdate20=`echo ${dc20} | cut -c 3-8` -cycle20=`echo ${dc20} | cut -c 9,10` +dc20=$($NDATE -120 ${PDY}${cyc} | cut -c -10) +date20=$(echo ${dc20} | cut -c -8) +sdate20=$(echo ${dc20} | cut -c 3-8) +cycle20=$(echo ${dc20} | cut -c 9,10) # DEFINE 21 CYCLES AGO -dc21=`$NDATE -126 ${PDY}${cyc} | cut -c -10` -date21=`echo ${dc21} | cut -c -8` -sdate21=`echo ${dc21} | cut -c 3-8` -cycle21=`echo ${dc21} | cut -c 9,10` +dc21=$($NDATE -126 ${PDY}${cyc} | cut -c -10) +date21=$(echo ${dc21} | cut -c -8) +sdate21=$(echo ${dc21} | cut -c 3-8) +cycle21=$(echo ${dc21} | cut -c 9,10) # SET CURRENT CYCLE AS THE VERIFICATION GRIDDED FILE. vergrid="F-${MDL} | ${PDY2}/${cyc}00" @@ -147,7 +147,7 @@ fi MDL2="GFSHPC" for verday in ${verdays} do - cominday=`echo ${verday} | cut -c -8` + cominday=$(echo ${verday} | cut -c -8) #XXW export HPCGFS=$COMROOT/nawips/prod/${mdl}.${cominday} # BV export HPCGFS=$COMROOT/nawips/${envir}/${mdl}.${cominday} export HPCGFS=${COMINgempak}/${mdl}.${cominday}/${cyc}/${COMPONENT}/gempak diff --git a/gempak/ush/gfs_meta_precip.sh b/gempak/ush/gfs_meta_precip.sh index 6d23003f21..cf3db9cbae 100755 --- a/gempak/ush/gfs_meta_precip.sh +++ b/gempak/ush/gfs_meta_precip.sh @@ -21,7 +21,7 @@ MDL=GFS metatype="precip" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) # # Set range of forecast hours. GFS is available every 6 hours through F192, then diff --git a/gempak/ush/gfs_meta_qpf.sh b/gempak/ush/gfs_meta_qpf.sh index 45e943d6ce..49ca0d8bd4 100755 --- a/gempak/ush/gfs_meta_qpf.sh +++ b/gempak/ush/gfs_meta_qpf.sh @@ -33,7 +33,7 @@ MDL=GFS metatype="qpf" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) gdat="F000-F126-06" gdatpcpn06="F006-F126-06" gdatpcpn12="F012-F126-06" diff --git a/gempak/ush/gfs_meta_sa.sh b/gempak/ush/gfs_meta_sa.sh index 7eef585536..47984e641d 100755 --- a/gempak/ush/gfs_meta_sa.sh +++ b/gempak/ush/gfs_meta_sa.sh @@ -31,7 +31,7 @@ MDL=GFS metatype="sa" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # #if [ ${cyc} -eq 00 ] ; then # fend=F126 diff --git a/gempak/ush/gfs_meta_sa2.sh b/gempak/ush/gfs_meta_sa2.sh index eab320e4cd..de538a249d 100755 --- a/gempak/ush/gfs_meta_sa2.sh +++ b/gempak/ush/gfs_meta_sa2.sh @@ -37,22 +37,22 @@ device="nc | ${metaname}" if [ ${cyc} -eq "12" ] || [ ${cyc} -eq "18" ] then exit -# elif [ ${cyc} -eq "00" ] && [ `echo $COMIN | awk -F/ '{print $5}' | awk -F. '{print $1}'` = "gfs" ] +# elif [ ${cyc} -eq "00" ] && [ $(echo $COMIN | awk -F/ '{print $5}' | awk -F. '{print $1}') = "gfs" ] elif [ ${cyc} -eq "00" ] && [ ${mdl} = "gfs" ] then # don't want to run from 00z gfs exit fi -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # export HPCGFS=$COMROOT/nawips/${envir}/gfs.${PDY} export HPCGFS=${COMINgempak}/${mdl}.${PDY}/${cyc}/${COMPONENT}/gempak grid1="F-GFSHPC | ${PDY2}/${cyc}00" # DEFINE YESTERDAY -PDYm1=`$NDATE -24 ${PDY}${cyc} | cut -c -8` -PDY2m1=`echo ${PDYm1} | cut -c 3-` +PDYm1=$($NDATE -24 ${PDY}${cyc} | cut -c -8) +PDY2m1=$(echo ${PDYm1} | cut -c 3-) $GEMEXE/gdplot2_nc << EOF \$MAPFIL= mepowo.gsf @@ -207,16 +207,16 @@ else times="006 030 054 078 102 126" fi -for gfsfhr in `echo ${times}` +for gfsfhr in $(echo ${times}) do if [ ${cyc} == "06" ]; then - ecmwffhr="F`expr ${gfsfhr} + 18`" + ecmwffhr="F$(expr ${gfsfhr} + 18)" else - ecmwffhr="F`expr ${gfsfhr} + 12`" + ecmwffhr="F$(expr ${gfsfhr} + 12)" fi - while [ `expr length $ecmwffhr` -lt 3 ] + while [ $(expr length $ecmwffhr) -lt 3 ] do - ecmwffhr="F0`expr ${gfsfhr} + 6`" + ecmwffhr="F0$(expr ${gfsfhr} + 6)" done gfsfhr="F${gfsfhr}" grid2="${COMINecmwf}.${PDYm1}/gempak/ecmwf_glob_${PDYm1}12" @@ -291,13 +291,13 @@ elif [ ${cyc} -eq "06" ]; then times="006 018 030 042 054 066 090 114 138" fi -for gfsfhr in `echo ${times}` +for gfsfhr in $(echo ${times}) do if [ ${cyc} -eq "06" ]; then - ukmetfhr="`expr ${gfsfhr} + 6`" - while [ `expr length $ukmetfhr` -lt 3 ] + ukmetfhr="$(expr ${gfsfhr} + 6)" + while [ $(expr length $ukmetfhr) -lt 3 ] do - ukmetfhr="0`expr ${gfsfhr} + 6`" + ukmetfhr="0$(expr ${gfsfhr} + 6)" done else ukmetfhr=${gfsfhr} diff --git a/gempak/ush/gfs_meta_trop.sh b/gempak/ush/gfs_meta_trop.sh index 9ad2503f5a..d0cc0dbd14 100755 --- a/gempak/ush/gfs_meta_trop.sh +++ b/gempak/ush/gfs_meta_trop.sh @@ -36,7 +36,7 @@ MDL=GFS metatype="trop" metaname="${mdl}_${metatype}_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # for a in ATL PAC WPAC do diff --git a/gempak/ush/gfs_meta_us.sh b/gempak/ush/gfs_meta_us.sh index a7607da3d5..7a818c338b 100755 --- a/gempak/ush/gfs_meta_us.sh +++ b/gempak/ush/gfs_meta_us.sh @@ -25,7 +25,7 @@ cd $DATA/us cp $FIXgempak/datatype.tbl datatype.tbl device="nc | gfs.meta" -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) export fend=F216 diff --git a/gempak/ush/gfs_meta_usext.sh b/gempak/ush/gfs_meta_usext.sh index 5b4388f6e7..dc522bb896 100755 --- a/gempak/ush/gfs_meta_usext.sh +++ b/gempak/ush/gfs_meta_usext.sh @@ -35,7 +35,7 @@ device="nc | mrf.meta" #XXW cp $FIXgempak/model/gfs/ak_sfstns.tbl alaska.tbl cp $FIXgempak/ak_sfstns.tbl alaska.tbl -month=`echo $PDY | cut -c5,6` +month=$(echo $PDY | cut -c5,6) if [ $month -ge 5 -a $month -le 9 ] ; then # fint="40;45;50;55;60;65;70;75;80;85;90;95;100" # fline="26;25;24;23;22;21;20;19;18;17;16;15;14;31" @@ -46,7 +46,7 @@ else fline="4;30;29;28;27;26;25;24;23;22;21;20;19;18;17;16;15;14;31" fi -PDY2=`echo $PDY | cut -c3-` +PDY2=$(echo $PDY | cut -c3-) if [ "$envir" = "para" ] ; then export m_title="GFSP" diff --git a/gempak/ush/gfs_meta_ver.sh b/gempak/ush/gfs_meta_ver.sh index 54697264be..d63f6bc6df 100755 --- a/gempak/ush/gfs_meta_ver.sh +++ b/gempak/ush/gfs_meta_ver.sh @@ -35,173 +35,173 @@ MDL=GFS metatype="ver" metaname="gfsver_${cyc}.meta" device="nc | ${metaname}" -PDY2=`echo ${PDY} | cut -c3-` +PDY2=$(echo ${PDY} | cut -c3-) # # DEFINE 1 CYCLE AGO -dc1=`$NDATE -06 ${PDY}${cyc} | cut -c -10` -date1=`echo ${dc1} | cut -c -8` -sdate1=`echo ${dc1} | cut -c 3-8` -cycle1=`echo ${dc1} | cut -c 9,10` +dc1=$($NDATE -06 ${PDY}${cyc} | cut -c -10) +date1=$(echo ${dc1} | cut -c -8) +sdate1=$(echo ${dc1} | cut -c 3-8) +cycle1=$(echo ${dc1} | cut -c 9,10) # DEFINE 2 CYCLES AGO -dc2=`$NDATE -12 ${PDY}${cyc} | cut -c -10` -date2=`echo ${dc2} | cut -c -8` -sdate2=`echo ${dc2} | cut -c 3-8` -cycle2=`echo ${dc2} | cut -c 9,10` +dc2=$($NDATE -12 ${PDY}${cyc} | cut -c -10) +date2=$(echo ${dc2} | cut -c -8) +sdate2=$(echo ${dc2} | cut -c 3-8) +cycle2=$(echo ${dc2} | cut -c 9,10) # DEFINE 3 CYCLES AGO -dc3=`$NDATE -18 ${PDY}${cyc} | cut -c -10` -date3=`echo ${dc3} | cut -c -8` -sdate3=`echo ${dc3} | cut -c 3-8` -cycle3=`echo ${dc3} | cut -c 9,10` +dc3=$($NDATE -18 ${PDY}${cyc} | cut -c -10) +date3=$(echo ${dc3} | cut -c -8) +sdate3=$(echo ${dc3} | cut -c 3-8) +cycle3=$(echo ${dc3} | cut -c 9,10) # DEFINE 4 CYCLES AGO -dc4=`$NDATE -24 ${PDY}${cyc} | cut -c -10` -date4=`echo ${dc4} | cut -c -8` -sdate4=`echo ${dc4} | cut -c 3-8` -cycle4=`echo ${dc4} | cut -c 9,10` +dc4=$($NDATE -24 ${PDY}${cyc} | cut -c -10) +date4=$(echo ${dc4} | cut -c -8) +sdate4=$(echo ${dc4} | cut -c 3-8) +cycle4=$(echo ${dc4} | cut -c 9,10) # DEFINE 5 CYCLES AGO -dc5=`$NDATE -30 ${PDY}${cyc} | cut -c -10` -date5=`echo ${dc5} | cut -c -8` -sdate5=`echo ${dc5} | cut -c 3-8` -cycle5=`echo ${dc5} | cut -c 9,10` +dc5=$($NDATE -30 ${PDY}${cyc} | cut -c -10) +date5=$(echo ${dc5} | cut -c -8) +sdate5=$(echo ${dc5} | cut -c 3-8) +cycle5=$(echo ${dc5} | cut -c 9,10) # DEFINE 6 CYCLES AGO -dc6=`$NDATE -36 ${PDY}${cyc} | cut -c -10` -date6=`echo ${dc6} | cut -c -8` -sdate6=`echo ${dc6} | cut -c 3-8` -cycle6=`echo ${dc6} | cut -c 9,10` +dc6=$($NDATE -36 ${PDY}${cyc} | cut -c -10) +date6=$(echo ${dc6} | cut -c -8) +sdate6=$(echo ${dc6} | cut -c 3-8) +cycle6=$(echo ${dc6} | cut -c 9,10) # DEFINE 7 CYCLES AGO -dc7=`$NDATE -42 ${PDY}${cyc} | cut -c -10` -date7=`echo ${dc7} | cut -c -8` -sdate7=`echo ${dc7} | cut -c 3-8` -cycle7=`echo ${dc7} | cut -c 9,10` +dc7=$($NDATE -42 ${PDY}${cyc} | cut -c -10) +date7=$(echo ${dc7} | cut -c -8) +sdate7=$(echo ${dc7} | cut -c 3-8) +cycle7=$(echo ${dc7} | cut -c 9,10) # DEFINE 8 CYCLES AGO -dc8=`$NDATE -48 ${PDY}${cyc} | cut -c -10` -date8=`echo ${dc8} | cut -c -8` -sdate8=`echo ${dc8} | cut -c 3-8` -cycle8=`echo ${dc8} | cut -c 9,10` +dc8=$($NDATE -48 ${PDY}${cyc} | cut -c -10) +date8=$(echo ${dc8} | cut -c -8) +sdate8=$(echo ${dc8} | cut -c 3-8) +cycle8=$(echo ${dc8} | cut -c 9,10) # DEFINE 9 CYCLES AGO -dc9=`$NDATE -54 ${PDY}${cyc} | cut -c -10` -date9=`echo ${dc9} | cut -c -8` -sdate9=`echo ${dc9} | cut -c 3-8` -cycle9=`echo ${dc9} | cut -c 9,10` +dc9=$($NDATE -54 ${PDY}${cyc} | cut -c -10) +date9=$(echo ${dc9} | cut -c -8) +sdate9=$(echo ${dc9} | cut -c 3-8) +cycle9=$(echo ${dc9} | cut -c 9,10) # DEFINE 10 CYCLES AGO -dc10=`$NDATE -60 ${PDY}${cyc} | cut -c -10` -date10=`echo ${dc10} | cut -c -8` -sdate10=`echo ${dc10} | cut -c 3-8` -cycle10=`echo ${dc10} | cut -c 9,10` +dc10=$($NDATE -60 ${PDY}${cyc} | cut -c -10) +date10=$(echo ${dc10} | cut -c -8) +sdate10=$(echo ${dc10} | cut -c 3-8) +cycle10=$(echo ${dc10} | cut -c 9,10) # DEFINE 11 CYCLES AGO -dc11=`$NDATE -66 ${PDY}${cyc} | cut -c -10` -date11=`echo ${dc11} | cut -c -8` -sdate11=`echo ${dc11} | cut -c 3-8` -cycle11=`echo ${dc11} | cut -c 9,10` +dc11=$($NDATE -66 ${PDY}${cyc} | cut -c -10) +date11=$(echo ${dc11} | cut -c -8) +sdate11=$(echo ${dc11} | cut -c 3-8) +cycle11=$(echo ${dc11} | cut -c 9,10) # DEFINE 12 CYCLES AGO -dc12=`$NDATE -72 ${PDY}${cyc} | cut -c -10` -date12=`echo ${dc12} | cut -c -8` -sdate12=`echo ${dc12} | cut -c 3-8` -cycle12=`echo ${dc12} | cut -c 9,10` +dc12=$($NDATE -72 ${PDY}${cyc} | cut -c -10) +date12=$(echo ${dc12} | cut -c -8) +sdate12=$(echo ${dc12} | cut -c 3-8) +cycle12=$(echo ${dc12} | cut -c 9,10) # DEFINE 13 CYCLES AGO -dc13=`$NDATE -78 ${PDY}${cyc} | cut -c -10` -date13=`echo ${dc13} | cut -c -8` -sdate13=`echo ${dc13} | cut -c 3-8` -cycle13=`echo ${dc13} | cut -c 9,10` +dc13=$($NDATE -78 ${PDY}${cyc} | cut -c -10) +date13=$(echo ${dc13} | cut -c -8) +sdate13=$(echo ${dc13} | cut -c 3-8) +cycle13=$(echo ${dc13} | cut -c 9,10) # DEFINE 14 CYCLES AGO -dc14=`$NDATE -84 ${PDY}${cyc} | cut -c -10` -date14=`echo ${dc14} | cut -c -8` -sdate14=`echo ${dc14} | cut -c 3-8` -cycle14=`echo ${dc14} | cut -c 9,10` +dc14=$($NDATE -84 ${PDY}${cyc} | cut -c -10) +date14=$(echo ${dc14} | cut -c -8) +sdate14=$(echo ${dc14} | cut -c 3-8) +cycle14=$(echo ${dc14} | cut -c 9,10) # DEFINE 15 CYCLES AGO -dc15=`$NDATE -90 ${PDY}${cyc} | cut -c -10` -date15=`echo ${dc15} | cut -c -8` -sdate15=`echo ${dc15} | cut -c 3-8` -cycle15=`echo ${dc15} | cut -c 9,10` +dc15=$($NDATE -90 ${PDY}${cyc} | cut -c -10) +date15=$(echo ${dc15} | cut -c -8) +sdate15=$(echo ${dc15} | cut -c 3-8) +cycle15=$(echo ${dc15} | cut -c 9,10) # DEFINE 16 CYCLES AGO -dc16=`$NDATE -96 ${PDY}${cyc} | cut -c -10` -date16=`echo ${dc16} | cut -c -8` -sdate16=`echo ${dc16} | cut -c 3-8` -cycle16=`echo ${dc16} | cut -c 9,10` +dc16=$($NDATE -96 ${PDY}${cyc} | cut -c -10) +date16=$(echo ${dc16} | cut -c -8) +sdate16=$(echo ${dc16} | cut -c 3-8) +cycle16=$(echo ${dc16} | cut -c 9,10) # DEFINE 17 CYCLES AGO -dc17=`$NDATE -102 ${PDY}${cyc} | cut -c -10` -date17=`echo ${dc17} | cut -c -8` -sdate17=`echo ${dc17} | cut -c 3-8` -cycle17=`echo ${dc17} | cut -c 9,10` +dc17=$($NDATE -102 ${PDY}${cyc} | cut -c -10) +date17=$(echo ${dc17} | cut -c -8) +sdate17=$(echo ${dc17} | cut -c 3-8) +cycle17=$(echo ${dc17} | cut -c 9,10) # DEFINE 18 CYCLES AGO -dc18=`$NDATE -108 ${PDY}${cyc} | cut -c -10` -date18=`echo ${dc18} | cut -c -8` -sdate18=`echo ${dc18} | cut -c 3-8` -cycle18=`echo ${dc18} | cut -c 9,10` +dc18=$($NDATE -108 ${PDY}${cyc} | cut -c -10) +date18=$(echo ${dc18} | cut -c -8) +sdate18=$(echo ${dc18} | cut -c 3-8) +cycle18=$(echo ${dc18} | cut -c 9,10) # DEFINE 19 CYCLES AGO -dc19=`$NDATE -114 ${PDY}${cyc} | cut -c -10` -date19=`echo ${dc19} | cut -c -8` -sdate19=`echo ${dc19} | cut -c 3-8` -cycle19=`echo ${dc19} | cut -c 9,10` +dc19=$($NDATE -114 ${PDY}${cyc} | cut -c -10) +date19=$(echo ${dc19} | cut -c -8) +sdate19=$(echo ${dc19} | cut -c 3-8) +cycle19=$(echo ${dc19} | cut -c 9,10) # DEFINE 20 CYCLES AGO -dc20=`$NDATE -120 ${PDY}${cyc} | cut -c -10` -date20=`echo ${dc20} | cut -c -8` -sdate20=`echo ${dc20} | cut -c 3-8` -cycle20=`echo ${dc20} | cut -c 9,10` +dc20=$($NDATE -120 ${PDY}${cyc} | cut -c -10) +date20=$(echo ${dc20} | cut -c -8) +sdate20=$(echo ${dc20} | cut -c 3-8) +cycle20=$(echo ${dc20} | cut -c 9,10) # DEFINE 21 CYCLES AGO -dc21=`$NDATE -126 ${PDY}${cyc} | cut -c -10` -date21=`echo ${dc21} | cut -c -8` -sdate21=`echo ${dc21} | cut -c 3-8` -cycle21=`echo ${dc21} | cut -c 9,10` +dc21=$($NDATE -126 ${PDY}${cyc} | cut -c -10) +date21=$(echo ${dc21} | cut -c -8) +sdate21=$(echo ${dc21} | cut -c 3-8) +cycle21=$(echo ${dc21} | cut -c 9,10) # DEFINE 22 CYCLES AGO -dc22=`$NDATE -132 ${PDY}${cyc} | cut -c -10` -date22=`echo ${dc22} | cut -c -8` -sdate22=`echo ${dc22} | cut -c 3-8` -cycle22=`echo ${dc22} | cut -c 9,10` +dc22=$($NDATE -132 ${PDY}${cyc} | cut -c -10) +date22=$(echo ${dc22} | cut -c -8) +sdate22=$(echo ${dc22} | cut -c 3-8) +cycle22=$(echo ${dc22} | cut -c 9,10) # DEFINE 23 CYCLES AGO -dc23=`$NDATE -138 ${PDY}${cyc} | cut -c -10` -date23=`echo ${dc23} | cut -c -8` -sdate23=`echo ${dc23} | cut -c 3-8` -cycle23=`echo ${dc23} | cut -c 9,10` +dc23=$($NDATE -138 ${PDY}${cyc} | cut -c -10) +date23=$(echo ${dc23} | cut -c -8) +sdate23=$(echo ${dc23} | cut -c 3-8) +cycle23=$(echo ${dc23} | cut -c 9,10) # DEFINE 24 CYCLES AGO -dc24=`$NDATE -144 ${PDY}${cyc} | cut -c -10` -date24=`echo ${dc24} | cut -c -8` -sdate24=`echo ${dc24} | cut -c 3-8` -cycle24=`echo ${dc24} | cut -c 9,10` +dc24=$($NDATE -144 ${PDY}${cyc} | cut -c -10) +date24=$(echo ${dc24} | cut -c -8) +sdate24=$(echo ${dc24} | cut -c 3-8) +cycle24=$(echo ${dc24} | cut -c 9,10) # DEFINE 25 CYCLES AGO -dc25=`$NDATE -150 ${PDY}${cyc} | cut -c -10` -date25=`echo ${dc25} | cut -c -8` -sdate25=`echo ${dc25} | cut -c 3-8` -cycle25=`echo ${dc25} | cut -c 9,10` +dc25=$($NDATE -150 ${PDY}${cyc} | cut -c -10) +date25=$(echo ${dc25} | cut -c -8) +sdate25=$(echo ${dc25} | cut -c 3-8) +cycle25=$(echo ${dc25} | cut -c 9,10) # DEFINE 26 CYCLES AGO -dc26=`$NDATE -156 ${PDY}${cyc} | cut -c -10` -date26=`echo ${dc26} | cut -c -8` -sdate26=`echo ${dc26} | cut -c 3-8` -cycle26=`echo ${dc26} | cut -c 9,10` +dc26=$($NDATE -156 ${PDY}${cyc} | cut -c -10) +date26=$(echo ${dc26} | cut -c -8) +sdate26=$(echo ${dc26} | cut -c 3-8) +cycle26=$(echo ${dc26} | cut -c 9,10) # DEFINE 27 CYCLES AGO -dc27=`$NDATE -162 ${PDY}${cyc} | cut -c -10` -date27=`echo ${dc27} | cut -c -8` -sdate27=`echo ${dc27} | cut -c 3-8` -cycle27=`echo ${dc27} | cut -c 9,10` +dc27=$($NDATE -162 ${PDY}${cyc} | cut -c -10) +date27=$(echo ${dc27} | cut -c -8) +sdate27=$(echo ${dc27} | cut -c 3-8) +cycle27=$(echo ${dc27} | cut -c 9,10) # DEFINE 28 CYCLES AGO -dc28=`$NDATE -168 ${PDY}${cyc} | cut -c -10` -date28=`echo ${dc28} | cut -c -8` -sdate28=`echo ${dc28} | cut -c 3-8` -cycle28=`echo ${dc28} | cut -c 9,10` +dc28=$($NDATE -168 ${PDY}${cyc} | cut -c -10) +date28=$(echo ${dc28} | cut -c -8) +sdate28=$(echo ${dc28} | cut -c 3-8) +cycle28=$(echo ${dc28} | cut -c 9,10) # DEFINE 29 CYCLES AGO -dc29=`$NDATE -174 ${PDY}${cyc} | cut -c -10` -date29=`echo ${dc29} | cut -c -8` -sdate29=`echo ${dc29} | cut -c 3-8` -cycle29=`echo ${dc29} | cut -c 9,10` +dc29=$($NDATE -174 ${PDY}${cyc} | cut -c -10) +date29=$(echo ${dc29} | cut -c -8) +sdate29=$(echo ${dc29} | cut -c 3-8) +cycle29=$(echo ${dc29} | cut -c 9,10) # DEFINE 30 CYCLES AGO -dc30=`$NDATE -180 ${PDY}${cyc} | cut -c -10` -date30=`echo ${dc30} | cut -c -8` -sdate30=`echo ${dc30} | cut -c 3-8` -cycle30=`echo ${dc30} | cut -c 9,10` +dc30=$($NDATE -180 ${PDY}${cyc} | cut -c -10) +date30=$(echo ${dc30} | cut -c -8) +sdate30=$(echo ${dc30} | cut -c 3-8) +cycle30=$(echo ${dc30} | cut -c 9,10) # DEFINE 31 CYCLES AGO -dc31=`$NDATE -192 ${PDY}${cyc} | cut -c -10` -date31=`echo ${dc31} | cut -c -8` -sdate31=`echo ${dc31} | cut -c 3-8` -cycle31=`echo ${dc31} | cut -c 9,10` +dc31=$($NDATE -192 ${PDY}${cyc} | cut -c -10) +date31=$(echo ${dc31} | cut -c -8) +sdate31=$(echo ${dc31} | cut -c 3-8) +cycle31=$(echo ${dc31} | cut -c 9,10) # DEFINE 32 CYCLES AGO -dc32=`$NDATE -204 ${PDY}${cyc} | cut -c -10` -date32=`echo ${dc32} | cut -c -8` -sdate32=`echo ${dc32} | cut -c 3-8` -cycle32=`echo ${dc32} | cut -c 9,10` +dc32=$($NDATE -204 ${PDY}${cyc} | cut -c -10) +date32=$(echo ${dc32} | cut -c -8) +sdate32=$(echo ${dc32} | cut -c 3-8) +cycle32=$(echo ${dc32} | cut -c 9,10) # DEFINE 33 CYCLES AGO -dc33=`$NDATE -216 ${PDY}${cyc} | cut -c -10` -date33=`echo ${dc33} | cut -c -8` -sdate33=`echo ${dc33} | cut -c 3-8` -cycle33=`echo ${dc33} | cut -c 9,10` +dc33=$($NDATE -216 ${PDY}${cyc} | cut -c -10) +date33=$(echo ${dc33} | cut -c -8) +sdate33=$(echo ${dc33} | cut -c 3-8) +cycle33=$(echo ${dc33} | cut -c 9,10) # SET CURRENT CYCLE AS THE VERIFICATION GRIDDED FILE. vergrid="F-${MDL} | ${PDY2}/${cyc}00" @@ -224,7 +224,7 @@ ${dc20} ${dc21} ${dc22} ${dc23} ${dc24} ${dc25} ${dc26} ${dc27} ${dc28} ${dc29} MDL2="GFSHPC" for verday in ${verdays} do - cominday=`echo ${verday} | cut -c -8` + cominday=$(echo ${verday} | cut -c -8) #XXW export HPCGFS=$COMROOT/nawips/prod/${mdl}.${cominday} # BV export HPCGFS=$COMROOT/nawips/${envir}/${mdl}.${cominday} export HPCGFS=${COMINgempak}/${mdl}.${cominday}/${cyc}/${COMPONENT}/gempak diff --git a/jobs/JGFS_ATMOS_CYCLONE_GENESIS b/jobs/JGFS_ATMOS_CYCLONE_GENESIS index 7eb802963b..090e1e1bfb 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_GENESIS +++ b/jobs/JGFS_ATMOS_CYCLONE_GENESIS @@ -96,7 +96,7 @@ export gfsdir=${COMIN} export COMINgfs=${COMIN} export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT -export JYYYY=`echo ${PDY} | cut -c1-4` +export JYYYY=$(echo ${PDY} | cut -c1-4) export COMINgenvit=${COMINgenvit:-${COMOUT}/genesis_vital_${JYYYY}} export COMOUTgenvit=${COMOUTgenvit:-${COMOUT}/genesis_vital_${JYYYY}} #export COMINgenvit=${COMINgenvit:-${DATA}/genesis_vital_${JYYYY}} @@ -110,7 +110,7 @@ mkdir -m 775 -p $COMOUTgenvit # Run relevant script ############################################## env -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" $LOGSCRIPT diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index 7626ddc6bd..885dcc5f7d 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -116,7 +116,7 @@ fi # Run relevant script ############################################## env -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" $LOGSCRIPT @@ -132,7 +132,7 @@ ${USHens_tracker}/data_check_gfs.sh if [ $? -eq 6 ]; then exit; fi #------------------------------------------------ -machine=${machine:-`echo ${SITE}`} +machine=${machine:-$(echo ${SITE})} if [ $machine = TIDE -o $machine = GYRE ] ; then # For WCOSS machine=wcoss ${USHens_tracker}/extrkr_gfs.sh ${loopnum} ${cmodel} ${CDATE} ${pert} ${DATA} diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index 5a9f738434..57aa709e06 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -120,7 +120,7 @@ fi # Run relevant script ############################################## env -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" $LOGSCRIPT diff --git a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS index 704950ead6..7cc9f69309 100755 --- a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS +++ b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS @@ -95,14 +95,14 @@ export SLEEP_INT=5 #################################### if test -f $COMIN/$RUN.t${cyc}z.control.goessimpgrb2 then - modelrecvy=`cat < $COMIN/$RUN.t${cyc}z.control.goessimpgrb` - recvy_pdy=`echo $modelrecvy | cut -c1-8` - recvy_cyc=`echo $modelrecvy | cut -c9-10` - recvy_shour=`echo $modelrecvy | cut -c11-13` + modelrecvy=$(cat < $COMIN/$RUN.t${cyc}z.control.goessimpgrb) + recvy_pdy=$(echo $modelrecvy | cut -c1-8) + recvy_cyc=$(echo $modelrecvy | cut -c9-10) + recvy_shour=$(echo $modelrecvy | cut -c11-13) if test $RERUN = "NO" then - NEW_SHOUR=`expr $recvy_shour + $FHINC` + NEW_SHOUR=$(expr $recvy_shour + $FHINC) if test $NEW_SHOUR -ge $SHOUR then export SHOUR=$NEW_SHOUR diff --git a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP index 96db26e907..22389d6f05 100755 --- a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP +++ b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP @@ -74,7 +74,7 @@ export BLENDED_ICE_FILE_m6hrs=${BLENDED_ICE_FILE_m6hrs:-${COMINgfs_m6hrs}/${RUN} ############################################################### env -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" ${EMCSFCPREPSH:-$SCRgfs/exemcsfc_global_sfc_prep.sh} diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index 3b387919a7..e49e6a0244 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -105,7 +105,7 @@ export BKGFREQ=1 # for hourly relocation # Run relevant script ############################################## env -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" $LOGSCRIPT diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 24257308cf..d72a07614f 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -136,7 +136,7 @@ fi ############################################################### # Run relevant exglobal script env -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" $LOGSCRIPT diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index 9cf9bbb6eb..03aa4c514e 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -74,11 +74,11 @@ if [ $RUN_ENVIR = "nco" ]; then export COMIN_WAV_RTOFS=${COMIN_WAV_RTOFS:-$(compath.py ${WAVECUR_DID}/prod)} else if [ $WW3CURINP = "YES" ]; then - if [ ! -d $DMPDIR/${WAVECUR_DID}.${RPDY} ]; then export RPDY=`$NDATE -24 ${PDY}00 | cut -c1-8`; fi + if [ ! -d $DMPDIR/${WAVECUR_DID}.${RPDY} ]; then export RPDY=$($NDATE -24 ${PDY}00 | cut -c1-8); fi if [ ! -L $ROTDIR/${WAVECUR_DID}.${RPDY} ]; then # Check if symlink already exists in ROTDIR $NLN $DMPDIR/${WAVECUR_DID}.${RPDY} $ROTDIR/${WAVECUR_DID}.${RPDY} fi - BRPDY=`$NDATE -24 ${RPDY}00 | cut -c1-8` + BRPDY=$($NDATE -24 ${RPDY}00 | cut -c1-8) if [ ! -L $ROTDIR/${WAVECUR_DID}.${BRPDY} ]; then # Check if symlink already exists in ROTDIR $NLN $DMPDIR/${WAVECUR_DID}.${BRPDY} $ROTDIR/${WAVECUR_DID}.${BRPDY} fi diff --git a/jobs/rocoto/arch.sh b/jobs/rocoto/arch.sh index 3d9f6ec862..e99ff7396e 100755 --- a/jobs/rocoto/arch.sh +++ b/jobs/rocoto/arch.sh @@ -85,13 +85,13 @@ if [ $CDUMP = "gdas" ]; then fi if [ -s avno.t${cyc}z.cyclone.trackatcfunix ]; then - PLSOT4=`echo $PSLOT|cut -c 1-4 |tr '[a-z]' '[A-Z]'` + PLSOT4=$(echo $PSLOT|cut -c 1-4 |tr '[a-z]' '[A-Z]') cat avno.t${cyc}z.cyclone.trackatcfunix | sed s:AVNO:${PLSOT4}:g > ${ARCDIR}/atcfunix.${CDUMP}.$CDATE cat avnop.t${cyc}z.cyclone.trackatcfunix | sed s:AVNO:${PLSOT4}:g > ${ARCDIR}/atcfunixp.${CDUMP}.$CDATE fi if [ $CDUMP = "gdas" -a -s gdas.t${cyc}z.cyclone.trackatcfunix ]; then - PLSOT4=`echo $PSLOT|cut -c 1-4 |tr '[a-z]' '[A-Z]'` + PLSOT4=$(echo $PSLOT|cut -c 1-4 |tr '[a-z]' '[A-Z]') cat gdas.t${cyc}z.cyclone.trackatcfunix | sed s:AVNO:${PLSOT4}:g > ${ARCDIR}/atcfunix.${CDUMP}.$CDATE cat gdasp.t${cyc}z.cyclone.trackatcfunix | sed s:AVNO:${PLSOT4}:g > ${ARCDIR}/atcfunixp.${CDUMP}.$CDATE fi @@ -138,8 +138,8 @@ SAVEWARMICA="NO" SAVEWARMICB="NO" SAVEFCSTIC="NO" firstday=$($NDATE +24 $SDATE) -mm=`echo $CDATE|cut -c 5-6` -dd=`echo $CDATE|cut -c 7-8` +mm=$(echo $CDATE|cut -c 5-6) +dd=$(echo $CDATE|cut -c 7-8) nday=$(( (mm-1)*30+dd )) mod=$(($nday % $ARCH_WARMICFREQ)) if [ $CDATE -eq $firstday -a $cyc -eq $ARCHINC_CYC ]; then SAVEWARMICA="YES" ; fi @@ -295,7 +295,7 @@ while [ $GDATE -le $GDATEEND ]; do if [ -d $COMINrtofs -a $GDATE -lt $RTOFS_DATE ]; then rm -rf $COMINrtofs ; fi if [ $CDUMP != "gdas" -o $DO_GLDAS = "NO" -o $GDATE -lt $GLDAS_DATE ]; then if [ $CDUMP = "gdas" ]; then - for file in `ls $COMIN |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do + for file in $(ls $COMIN |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc); do rm -rf $COMIN/$file done else @@ -303,14 +303,14 @@ while [ $GDATE -le $GDATEEND ]; do fi else if [ $DO_GLDAS = "YES" ]; then - for file in `ls $COMIN |grep -v sflux |grep -v RESTART |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do + for file in $(ls $COMIN |grep -v sflux |grep -v RESTART |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc); do rm -rf $COMIN/$file done - for file in `ls $COMIN/RESTART |grep -v sfcanl `; do + for file in $(ls $COMIN/RESTART |grep -v sfcanl ); do rm -rf $COMIN/RESTART/$file done else - for file in `ls $COMIN |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do + for file in $(ls $COMIN |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc); do rm -rf $COMIN/$file done fi diff --git a/jobs/rocoto/awips.sh b/jobs/rocoto/awips.sh index 40c5db8cb4..a938587375 100755 --- a/jobs/rocoto/awips.sh +++ b/jobs/rocoto/awips.sh @@ -60,7 +60,7 @@ export jlogfile="$ROTDIR/logs/$CDATE/jgfs_awips.log" SLEEP_TIME=1800 SLEEP_INT=5 -SLEEP_LOOP_MAX=`expr $SLEEP_TIME / $SLEEP_INT` +SLEEP_LOOP_MAX=$(expr $SLEEP_TIME / $SLEEP_INT) for fhr in $fhrlst; do @@ -72,7 +72,7 @@ for fhr in $fhrlst; do fhmin=0 fhmax=84 if [ $fhr -ge $fhmin -a $fhr -le $fhmax ] ; then - if [[ `expr $fhr % 3` -eq 0 ]]; then + if [[ $(expr $fhr % 3) -eq 0 ]]; then fhr3=$(printf %03i $fhr) # Check for input file existence. If not present, sleep @@ -82,7 +82,7 @@ for fhr in $fhrlst; do if [ -s $COMOUT/$CDUMP.t${cyc}z.pgrb2b.0p25.f${fhr3}.idx ]; then break else - ic=`expr $ic + 1` + ic=$(expr $ic + 1) sleep $SLEEP_INT fi if [ $ic -eq $SLEEP_LOOP_MAX ]; then @@ -98,7 +98,7 @@ for fhr in $fhrlst; do $AWIPS20SH fi - if [[ `expr $fhr % 6` -eq 0 ]]; then + if [[ $(expr $fhr % 6) -eq 0 ]]; then export job="jgfs_awips_f${fcsthrs}_${cyc}" export DATA="${DATAROOT}/$job" $AWIPSG2SH @@ -109,7 +109,7 @@ for fhr in $fhrlst; do fhmax=240 if [ $fhr -ge $fhmin -a $fhr -le $fhmax ]; then - if [[ `expr $fhr % 6` -eq 0 ]]; then + if [[ $(expr $fhr % 6) -eq 0 ]]; then fhr3=$(printf %03i $fhr) # Check for input file existence. If not present, sleep @@ -119,7 +119,7 @@ for fhr in $fhrlst; do if [ -s $COMOUT/$CDUMP.t${cyc}z.pgrb2b.0p25.f${fhr3}.idx ]; then break else - ic=`expr $ic + 1` + ic=$(expr $ic + 1) sleep $SLEEP_INT fi if [ $ic -eq $SLEEP_LOOP_MAX ]; then diff --git a/jobs/rocoto/earc.sh b/jobs/rocoto/earc.sh index f33bbbbe76..17337bff12 100755 --- a/jobs/rocoto/earc.sh +++ b/jobs/rocoto/earc.sh @@ -65,8 +65,8 @@ if [[ $ENSGRP -gt 0 ]] && [[ $HPSSARCH = "YES" ]]; then #--determine when to save ICs for warm start SAVEWARMICA="NO" SAVEWARMICB="NO" - mm=`echo $CDATE|cut -c 5-6` - dd=`echo $CDATE|cut -c 7-8` + mm=$(echo $CDATE|cut -c 5-6) + dd=$(echo $CDATE|cut -c 7-8) nday=$(( (mm-1)*30+dd )) mod=$(($nday % $ARCH_WARMICFREQ)) if [ $CDATE -eq $firstday -a $cyc -eq $EARCINC_CYC ]; then SAVEWARMICA="YES" ; fi @@ -84,7 +84,7 @@ if [[ $ENSGRP -gt 0 ]] && [[ $HPSSARCH = "YES" ]]; then if [ $CDATE -gt $SDATE ]; then # Don't run for first half cycle - htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}_grp${ENSGRP}.tar `cat $ARCH_LIST/enkf${CDUMP}_grp${n}.txt` + htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}_grp${ENSGRP}.tar $(cat $ARCH_LIST/enkf${CDUMP}_grp${n}.txt) status=$? if [ $status -ne 0 -a $CDATE -ge $firstday ]; then echo "HTAR $CDATE enkf${CDUMP}_grp${ENSGRP}.tar failed" @@ -92,7 +92,7 @@ if [[ $ENSGRP -gt 0 ]] && [[ $HPSSARCH = "YES" ]]; then fi if [ $SAVEWARMICA = "YES" -a $cyc -eq $EARCINC_CYC ]; then - htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}_restarta_grp${ENSGRP}.tar `cat $ARCH_LIST/enkf${CDUMP}_restarta_grp${n}.txt` + htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}_restarta_grp${ENSGRP}.tar $(cat $ARCH_LIST/enkf${CDUMP}_restarta_grp${n}.txt) status=$? if [ $status -ne 0 ]; then echo "HTAR $CDATE enkf${CDUMP}_restarta_grp${ENSGRP}.tar failed" @@ -101,7 +101,7 @@ if [[ $ENSGRP -gt 0 ]] && [[ $HPSSARCH = "YES" ]]; then fi if [ $SAVEWARMICB = "YES" -a $cyc -eq $EARCICS_CYC ]; then - htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}_restartb_grp${ENSGRP}.tar `cat $ARCH_LIST/enkf${CDUMP}_restartb_grp${n}.txt` + htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}_restartb_grp${ENSGRP}.tar $(cat $ARCH_LIST/enkf${CDUMP}_restartb_grp${n}.txt) status=$? if [ $status -ne 0 ]; then echo "HTAR $CDATE enkf${CDUMP}_restartb_grp${ENSGRP}.tar failed" @@ -120,7 +120,7 @@ if [ $ENSGRP -eq 0 ]; then if [ $HPSSARCH = "YES" ]; then - htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}.tar `cat $ARCH_LIST/enkf${CDUMP}.txt` + htar -P -cvf $ATARDIR/$CDATE/enkf${CDUMP}.tar $(cat $ARCH_LIST/enkf${CDUMP}.txt) status=$? if [ $status -ne 0 -a $CDATE -ge $firstday ]; then echo "HTAR $CDATE enkf${CDUMP}.tar failed" @@ -170,7 +170,7 @@ if [ $ENSGRP -eq 0 ]; then rc=$? if [ $rc -eq 0 ]; then # Retain f006.ens files. Remove everything else - for file in `ls $COMIN_ENS | grep -v f006.ens`; do + for file in $(ls $COMIN_ENS | grep -v f006.ens); do rm -rf $COMIN_ENS/$file done fi diff --git a/jobs/rocoto/wafs.sh b/jobs/rocoto/wafs.sh index f3de9a141c..0516b327c1 100755 --- a/jobs/rocoto/wafs.sh +++ b/jobs/rocoto/wafs.sh @@ -45,7 +45,7 @@ while [ $hr -le 120 ]; do status=$? [[ $status -ne 0 ]] && exit $status - hr=`expr $hr + 6` + hr=$(expr $hr + 6) done diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 7b80e117e1..5f8825c04a 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -272,7 +272,7 @@ fi # IAU related parameters export DOIAU="YES" # Enable 4DIAU for control with 3 increments export IAUFHRS="3,6,9" -export IAU_FHROT=`echo $IAUFHRS | cut -c1` +export IAU_FHROT=$(echo $IAUFHRS | cut -c1) export IAU_DELTHRS=6 export IAU_OFFSET=6 export DOIAU_ENKF=${DOIAU:-"YES"} # Enable 4DIAU for EnKF ensemble diff --git a/parm/config/config.base.nco.static b/parm/config/config.base.nco.static index f4f5ac8887..7c47c27ad4 100755 --- a/parm/config/config.base.nco.static +++ b/parm/config/config.base.nco.static @@ -189,7 +189,7 @@ fi # IAU related parameters export DOIAU="YES" # Enable 4DIAU for control with 3 increments export IAUFHRS="3,6,9" -export IAU_FHROT=`echo $IAUFHRS | cut -c1` +export IAU_FHROT=$(echo $IAUFHRS | cut -c1) export IAU_DELTHRS=6 export IAU_OFFSET=6 export DOIAU_ENKF=${DOIAU:-"YES"} # Enable 4DIAU for EnKF ensemble diff --git a/parm/config/config.efcs b/parm/config/config.efcs index b678200fc2..cbecb71d3b 100755 --- a/parm/config/config.efcs +++ b/parm/config/config.efcs @@ -62,7 +62,7 @@ export OUTPUT_FILETYPES="$OUTPUT_FILE" if [[ "$OUTPUT_FILE" == "netcdf" ]]; then export ichunk2d=0; export jchunk2d=0 export ichunk3d=0; export jchunk3d=0; export kchunk3d=0 - RESTILE=`echo $CASE_ENKF |cut -c 2-` + RESTILE=$(echo $CASE_ENKF |cut -c 2-) if [[ "$machine" == "WCOSS_DELL_P3" ]]; then if [ $RESTILE -ge 384 ]; then export OUTPUT_FILETYPES=" 'netcdf_parallel' 'netcdf' " diff --git a/parm/config/config.fcst b/parm/config/config.fcst index 7c07c4f658..55a47906c4 100755 --- a/parm/config/config.fcst +++ b/parm/config/config.fcst @@ -206,7 +206,7 @@ export OUTPUT_FILETYPES="$OUTPUT_FILE" if [[ "$OUTPUT_FILE" == "netcdf" ]]; then export ichunk2d=0; export jchunk2d=0 export ichunk3d=0; export jchunk3d=0; export kchunk3d=0 - RESTILE=`echo $CASE |cut -c 2-` + RESTILE=$(echo $CASE |cut -c 2-) if [[ "$machine" == "WCOSS_DELL_P3" ]]; then if [ $RESTILE -ge 768 ]; then export OUTPUT_FILETYPES=" 'netcdf_parallel' 'netcdf_parallel' " diff --git a/parm/config/config.vrfy b/parm/config/config.vrfy index fb307abb7a..c2bba1ca8f 100755 --- a/parm/config/config.vrfy +++ b/parm/config/config.vrfy @@ -68,7 +68,7 @@ fi # All these call $VSDBSH if [ "$CDUMP" = "gfs" ] ; then - ddd=`echo $CDATE |cut -c 1-8` + ddd=$(echo $CDATE |cut -c 1-8) #if [ $ddd -eq 5 -o $ddd -eq 10 ]; then export VSDB_STEP2 = "YES" ;fi if [ $VSDB_STEP1 = "YES" -o $VSDB_STEP2 = "YES" -o $VRFYPRCP = "YES" -o $VRFYG2OBS = "YES" ]; then diff --git a/scripts/exgdas_atmos_nawips.sh b/scripts/exgdas_atmos_nawips.sh index b42b69b9ce..48146edf60 100755 --- a/scripts/exgdas_atmos_nawips.sh +++ b/scripts/exgdas_atmos_nawips.sh @@ -77,7 +77,7 @@ while [ $fhcnt -le $fend ] ; do typeset -Z3 fhr fhr=$fhcnt - fhcnt3=`expr $fhr % 3` + fhcnt3=$(expr $fhr % 3) fhr3=$fhcnt typeset -Z3 fhr3 diff --git a/scripts/exgfs_atmos_awips_20km_1p0deg.sh b/scripts/exgfs_atmos_awips_20km_1p0deg.sh index 8a899b2adb..1f4414c1b4 100755 --- a/scripts/exgfs_atmos_awips_20km_1p0deg.sh +++ b/scripts/exgfs_atmos_awips_20km_1p0deg.sh @@ -19,7 +19,7 @@ echo " " ############################################################################### fcsthrs="$1" num=$# -job_name=`echo $job|sed 's/[jpt]gfs/gfs/'` +job_name=$(echo $job|sed 's/[jpt]gfs/gfs/') if test "$num" -ge 1 then @@ -172,7 +172,7 @@ do # NOTE: numparm is the total of fields in grib2_awpgfs_20km_conusf000 file ########################################################################### numparm=247 -numrec=` $WGRIB2 awps_file_f${fcsthrs}_${GRID} | wc -l ` +numrec=$( $WGRIB2 awps_file_f${fcsthrs}_${GRID} | wc -l ) if [ $numrec -lt $numparm ] then @@ -186,7 +186,7 @@ fi export pgm; prep_step startmsg - if [ $GRID = "003" -a `expr ${fcsthrs} % 6` -eq 0 ] ; then + if [ $GRID = "003" -a $(expr ${fcsthrs} % 6) -eq 0 ] ; then export FORT11=awps_file_f${fcsthrs}_${GRID} export FORT31=awps_file_fi${fcsthrs}_${GRID} export FORT51=grib2.awpgfs${fcsthrs}.${GRID} diff --git a/scripts/exgfs_atmos_fbwind.sh b/scripts/exgfs_atmos_fbwind.sh index 81191fe816..2ca5870cbf 100755 --- a/scripts/exgfs_atmos_fbwind.sh +++ b/scripts/exgfs_atmos_fbwind.sh @@ -22,7 +22,7 @@ set -x msg="Begin job for $job" postmsg "$jlogfile" "$msg" -job_name=`echo $job|sed 's/[jpt]gfs/gfs/'` +job_name=$(echo $job|sed 's/[jpt]gfs/gfs/') set +x echo " " diff --git a/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh b/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh index 0137bce407..4de9d33736 100755 --- a/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh +++ b/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh @@ -75,7 +75,7 @@ set -x cd $DATA -export RSHPDY=`echo $PDY | cut -c5-``echo $PDY | cut -c3-4` +export RSHPDY=$(echo $PDY | cut -c5-)$(echo $PDY | cut -c3-4) cp $HOMEgfs/gempak/dictionaries/sonde.land.tbl . cp $HOMEgfs/gempak/dictionaries/metar.tbl . @@ -91,7 +91,7 @@ ${UTILgfs}/exec/rdbfmsua >> $pgmout 2> errfile err=$?;export err ;err_chk -export filesize=` ls -l rdbfmsua.out | awk '{print $5}' ` +export filesize=$( ls -l rdbfmsua.out | awk '{print $5}' ) ################################################################ # only run script if rdbfmsua.out contained upper air data. diff --git a/scripts/exgfs_atmos_gempak_meta.sh b/scripts/exgfs_atmos_gempak_meta.sh index 65c292c8e5..dfd5b38392 100755 --- a/scripts/exgfs_atmos_gempak_meta.sh +++ b/scripts/exgfs_atmos_gempak_meta.sh @@ -20,7 +20,7 @@ while [ $fhr -ge $fhbeg ] ; do if [ $err1 -eq 0 -o $fhr -eq $fhbeg ] ; then break fi - fhr=`expr $fhr - $fhinc` + fhr=$(expr $fhr - $fhinc) done maxtries=180 @@ -90,16 +90,16 @@ do fi fi - for script in `cat $DATA/tmpscript` + for script in $(cat $DATA/tmpscript) do eval "echo $script" >> $DATA/poescript done - num=`cat $DATA/poescript |wc -l` + num=$(cat $DATA/poescript |wc -l) while [ $num -lt $numproc ] ; do echo "hostname" >>poescript - num=`expr $num + 1` + num=$(expr $num + 1) done chmod 775 $DATA/poescript diff --git a/scripts/exgfs_atmos_goes_nawips.sh b/scripts/exgfs_atmos_goes_nawips.sh index af97d4074b..c18f2b8b42 100755 --- a/scripts/exgfs_atmos_goes_nawips.sh +++ b/scripts/exgfs_atmos_goes_nawips.sh @@ -27,17 +27,17 @@ postmsg "$jlogfile" "$msg" NAGRIB=$GEMEXE/nagrib2 # -entry=`grep "^$RUN " $NAGRIB_TABLE | awk 'index($1,"#") != 1 {print $0}'` +entry=$(grep "^$RUN " $NAGRIB_TABLE | awk 'index($1,"#") != 1 {print $0}') if [ "$entry" != "" ] ; then - cpyfil=`echo $entry | awk 'BEGIN {FS="|"} {print $2}'` - garea=`echo $entry | awk 'BEGIN {FS="|"} {print $3}'` - gbtbls=`echo $entry | awk 'BEGIN {FS="|"} {print $4}'` - maxgrd=`echo $entry | awk 'BEGIN {FS="|"} {print $5}'` - kxky=`echo $entry | awk 'BEGIN {FS="|"} {print $6}'` - grdarea=`echo $entry | awk 'BEGIN {FS="|"} {print $7}'` - proj=`echo $entry | awk 'BEGIN {FS="|"} {print $8}'` - output=`echo $entry | awk 'BEGIN {FS="|"} {print $9}'` + cpyfil=$(echo $entry | awk 'BEGIN {FS="|"} {print $2}') + garea=$(echo $entry | awk 'BEGIN {FS="|"} {print $3}') + gbtbls=$(echo $entry | awk 'BEGIN {FS="|"} {print $4}') + maxgrd=$(echo $entry | awk 'BEGIN {FS="|"} {print $5}') + kxky=$(echo $entry | awk 'BEGIN {FS="|"} {print $6}') + grdarea=$(echo $entry | awk 'BEGIN {FS="|"} {print $7}') + proj=$(echo $entry | awk 'BEGIN {FS="|"} {print $8}') + output=$(echo $entry | awk 'BEGIN {FS="|"} {print $9}') else cpyfil=gds garea=dset @@ -59,7 +59,7 @@ while [ $fhcnt -le $fend ] ; do # typeset -Z2 fhr # fi fhr=$fhcnt - fhcnt3=`expr $fhr % 3` + fhcnt3=$(expr $fhr % 3) fhr3=$fhcnt typeset -Z3 fhr3 diff --git a/scripts/exgfs_atmos_grib2_special_npoess.sh b/scripts/exgfs_atmos_grib2_special_npoess.sh index 74a570c38a..1e81f9815b 100755 --- a/scripts/exgfs_atmos_grib2_special_npoess.sh +++ b/scripts/exgfs_atmos_grib2_special_npoess.sh @@ -10,7 +10,7 @@ set -x cd $DATA -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" ############################################################ @@ -42,7 +42,7 @@ export opt26=' -set_grib_max_bits 25 -fi -if ' export opt27=":(APCP|ACPCP|PRATE|CPRAT|DZDT):" export opt28=' -new_grid_interpolation budget -fi ' -SLEEP_LOOP_MAX=`expr $SLEEP_TIME / $SLEEP_INT` +SLEEP_LOOP_MAX=$(expr $SLEEP_TIME / $SLEEP_INT) ############################################################################## # Specify Forecast Hour Range F000 - F024 for GFS_NPOESS_PGRB2_0P5DEG @@ -69,7 +69,7 @@ do then break else - ic=`expr $ic + 1` + ic=$(expr $ic + 1) sleep $SLEEP_INT fi ############################### @@ -112,7 +112,7 @@ do echo "$PDY$cyc$fhr" > $COMOUT/${RUN}.t${cyc}z.control.halfdeg.npoess fi rm tmpfile pgb2file - export fhr=`expr $fhr + $FHINC` + export fhr=$(expr $fhr + $FHINC) typeset -Z3 fhr done @@ -144,7 +144,7 @@ do then break else - ic=`expr $ic + 1` + ic=$(expr $ic + 1) sleep $SLEEP_INT fi ############################### @@ -205,10 +205,10 @@ do if test "$SENDECF" = 'YES' then - export fhour=`expr ${fhr} % 6 ` + export fhour=$(expr ${fhr} % 6 ) fi - export fhr=`expr $fhr + $FHINC` + export fhr=$(expr $fhr + $FHINC) typeset -Z3 fhr done diff --git a/scripts/exgfs_atmos_grib_awips.sh b/scripts/exgfs_atmos_grib_awips.sh index 669598f313..2e5ec91526 100755 --- a/scripts/exgfs_atmos_grib_awips.sh +++ b/scripts/exgfs_atmos_grib_awips.sh @@ -22,7 +22,7 @@ echo " FEB 2019 - Removed grid 225" set +x fcsthrs="$1" num=$# -job_name=`echo $job|sed 's/[jpt]gfs/gfs/'` +job_name=$(echo $job|sed 's/[jpt]gfs/gfs/') typeset -Z3 fcsthrs diff --git a/scripts/exgfs_atmos_nawips.sh b/scripts/exgfs_atmos_nawips.sh index bb6d83c45d..8e1ba652d6 100755 --- a/scripts/exgfs_atmos_nawips.sh +++ b/scripts/exgfs_atmos_nawips.sh @@ -59,7 +59,7 @@ if mkdir lock.$fhcnt ; then typeset -Z3 fhr fhr=$fhcnt - fhcnt3=`expr $fhr % 3` + fhcnt3=$(expr $fhr % 3) fhr3=$fhcnt typeset -Z3 fhr3 diff --git a/scripts/exgfs_atmos_postsnd.sh b/scripts/exgfs_atmos_postsnd.sh index c6e39998fc..67b9ce56fa 100755 --- a/scripts/exgfs_atmos_postsnd.sh +++ b/scripts/exgfs_atmos_postsnd.sh @@ -60,7 +60,7 @@ mkdir -p ${COMOUT}/bufr.${cycle} fi if [ $fformat == "netcdf" ] then -export LEVS=`$GETDIM $COMIN/${RUN}.${cycle}.atmf000.${atmfm} pfull` +export LEVS=$($GETDIM $COMIN/${RUN}.${cycle}.atmf000.${atmfm} pfull) else # Extract number of vertical levels from $STARTHOUR atmospheric file export NEMSIOGET=${NEMSIOGET:-$EXECbufrsnd/nemsio_get} @@ -76,7 +76,7 @@ while [ $FSTART -lt $ENDHOUR ] do export FINT=$NINT1 # Define the end hour for the input - export FEND=`expr $FSTART + $INCREMENT` + export FEND=$(expr $FSTART + $INCREMENT) if test $FEND -lt 100; then FEND=0$FEND; fi if [ $FSTART -eq 00 ] then @@ -96,7 +96,7 @@ export FINT=$NINT1 if [ ! -f $COMIN/${RUN}.${cycle}.logf$FEND.${logfm} ] then sleep 10 - ic=`expr $ic + 1` + ic=$(expr $ic + 1) else break fi diff --git a/scripts/exgfs_nceppost_cpl.sh b/scripts/exgfs_nceppost_cpl.sh index 6ce525a83b..487bf7d516 100755 --- a/scripts/exgfs_nceppost_cpl.sh +++ b/scripts/exgfs_nceppost_cpl.sh @@ -33,7 +33,7 @@ set -x cd $DATA # specify model output format type: 4 for nemsio, 3 for sigio -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" export POSTGPSH=${POSTGPSH:-$USHgfs/gfs_nceppost.sh} @@ -88,7 +88,7 @@ export IDRT=${IDRT:-0} # IDRT=0 is setting for outputting grib files on lat/lon # Post Analysis Files before starting the Forecast Post ############################################################ # Process analysis when post_times is 00 - export stime=`echo $post_times | cut -c1-3` + export stime=$(echo $post_times | cut -c1-3) if [ $OUTTYP -eq 4 ] ; then export loganl=$COMIN/${PREFIX}atmanl${SUFFIX} else @@ -234,7 +234,7 @@ fi else ## not_anl if_stime #---------------------------------- -SLEEP_LOOP_MAX=`expr $SLEEP_TIME / $SLEEP_INT` +SLEEP_LOOP_MAX=$(expr $SLEEP_TIME / $SLEEP_INT) # Chuang: modify to submit one post job at a time ############################################################ @@ -257,7 +257,7 @@ do then break else - ic=`expr $ic + 1` + ic=$(expr $ic + 1) sleep $SLEEP_INT fi ############################### @@ -296,7 +296,7 @@ do export IGEN=$IGEN_ANL fi - export VDATE=`${NDATE} +${fhr} ${PDY}${cyc}` + export VDATE=$(${NDATE} +${fhr} ${PDY}${cyc}) export OUTTYP=${OUTTYP:-4} export GFSOUT=${PREFIX}gfsio${fhr} @@ -356,7 +356,7 @@ do # Process pgb files if test "$PGBF" = 'YES' then - export FH=`expr $fhr + 0` + export FH=$(expr $fhr + 0) export downset=${downset:-2} $GFSDOWNSH export err=$?; err_chk @@ -400,7 +400,7 @@ do fi fi - # x3=`expr $fhr % 3` + # x3=$(expr $fhr % 3) # x3=0 ---> Standard 3-hourly or 12-hourly output # Only master grib files are needed for the hourly files # if [ $x3 -eq 0 ] ; then @@ -430,7 +430,7 @@ do #Add extra flux.1p00 file for coupled if test "$FLXGF" = 'YES' then - export FH=`expr $fhr + 0` + export FH=$(expr $fhr + 0) $GFSDOWNSHF export err=$?; err_chk fi diff --git a/scripts/exgfs_pmgr.sh b/scripts/exgfs_pmgr.sh index dcee75dd95..d16db66032 100755 --- a/scripts/exgfs_pmgr.sh +++ b/scripts/exgfs_pmgr.sh @@ -35,7 +35,7 @@ do let "hour=hour+12" fi done -postjobs=`cat posthours` +postjobs=$(cat posthours) # # Wait for all fcst hours to finish @@ -45,7 +45,7 @@ while [ $icnt -lt 1000 ] do for fhr in $postjobs do - fhr3=`printf "%03d" $fhr` + fhr3=$(printf "%03d" $fhr) if [ -s ${COMIN}/gfs.${cycle}.logf${fhr}.txt -o -s ${COMIN}/gfs.${cycle}.logf${fhr3}.txt ] then if [ $fhr -eq 0 ] @@ -54,11 +54,11 @@ do fi ecflow_client --event release_post${fhr} # Remove current fhr from list - postjobs=`echo $postjobs | sed "s/${fhr}//"` + postjobs=$(echo $postjobs | sed "s/${fhr}//") fi done - result_check=`echo $postjobs | wc -w` + result_check=$(echo $postjobs | wc -w) if [ $result_check -eq 0 ] then break diff --git a/scripts/exgfs_prdgen_manager.sh b/scripts/exgfs_prdgen_manager.sh index 6aaf915baf..6584178a7e 100755 --- a/scripts/exgfs_prdgen_manager.sh +++ b/scripts/exgfs_prdgen_manager.sh @@ -33,7 +33,7 @@ do let "hour=hour+12" fi done -pgrb2_jobs=`cat pgrb2_hours` +pgrb2_jobs=$(cat pgrb2_hours) # # Wait for all fcst hours to finish @@ -51,11 +51,11 @@ do # fi ecflow_client --event release_pgrb2_${fhr} # Remove current fhr from list - pgrb2_jobs=`echo ${pgrb2_jobs} | sed "s/${fhr}//"` + pgrb2_jobs=$(echo ${pgrb2_jobs} | sed "s/${fhr}//") fi done - result_check=`echo ${pgrb2_jobs} | wc -w` + result_check=$(echo ${pgrb2_jobs} | wc -w) if [ $result_check -eq 0 ] then break diff --git a/scripts/exgfs_wave_init.sh b/scripts/exgfs_wave_init.sh index 6801f0f943..536ff65d54 100755 --- a/scripts/exgfs_wave_init.sh +++ b/scripts/exgfs_wave_init.sh @@ -35,7 +35,7 @@ cd $DATA - msg="HAS BEGUN on `hostname`" + msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" msg="Starting MWW3 INIT CONFIG SCRIPT for ${CDUMP}wave" postmsg "$jlogfile" "$msg" @@ -48,7 +48,7 @@ echo ' Initial configuration script' echo " Model identifier : ${CDUMP}wave" echo ' ' - echo "Starting at : `date`" + echo "Starting at : $(date)" echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -86,7 +86,7 @@ # Eliminate duplicate grids array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) - grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` + grdALL=$(printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' ') for grdID in ${grdALL} do @@ -136,7 +136,7 @@ echo "$USHwave/wave_grid_moddef.sh $grdID > $grdID.out 2>&1" >> cmdfile fi - nmoddef=`expr $nmoddef + 1` + nmoddef=$(expr $nmoddef + 1) fi done @@ -153,14 +153,14 @@ [[ "$LOUD" = YES ]] && set -x # Set number of processes for mpmd - wavenproc=`wc -l cmdfile | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l cmdfile | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) # 1.a.3 Execute the serial or parallel cmdfile set +x echo ' ' - echo " Executing the mod_def command file at : `date`" + echo " Executing the mod_def command file at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -225,7 +225,7 @@ set +x echo ' ' - echo "Ending at : `date`" + echo "Ending at : $(date)" echo ' ' echo ' *** End of MWW3 Init Config ***' echo ' ' diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 35ea2dc626..75bca7e82b 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -43,7 +43,7 @@ cd $DATA - postmsg "$jlogfile" "HAS BEGUN on `hostname`" + postmsg "$jlogfile" "HAS BEGUN on $(hostname)" msg="Starting WAVE POSTPROCESSOR SCRIPT for $WAV_MOD_TAG" postmsg "$jlogfile" "$msg" @@ -54,7 +54,7 @@ echo ' *** WAVE POSTPROCESSOR SCRIPT ***' echo ' *********************************' echo ' ' - echo "Starting at : `date`" + echo "Starting at : $(date)" echo '-------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -95,7 +95,7 @@ # 0.c.3 Define CDATE_POST as a function of RERUN variable setting if [ "${RERUN}" = "YES" ]; then export CDATE_POST=${CDATE_RST} - export FHRUN=`$NHOUR ${CDATE_RST} ${CDATE}` + export FHRUN=$($NHOUR ${CDATE_RST} ${CDATE}) else # regular run export CDATE_POST=${CDATE} export FHRUN=0 @@ -220,7 +220,7 @@ set +x echo ' ' - echo " Input files read and processed at : `date`" + echo " Input files read and processed at : $(date)" echo ' ' echo ' Data summary : ' echo ' ---------------------------------------------' @@ -261,7 +261,7 @@ iwaitmax=120 # Maximum loop cycles for waiting until wave component output file is ready (fails after max) while [ $fhr -le $FHMAX_WAV ]; do - ymdh=`$NDATE $fhr $CDATE` + ymdh=$($NDATE $fhr $CDATE) YMD=$(echo $ymdh | cut -c1-8) HMS="$(echo $ymdh | cut -c9-10)0000" YMDHMS=${YMD}${HMS} @@ -305,11 +305,11 @@ nigrd=1 for grdID in $waveinterpGRD do - ymdh_int=`$NDATE -${WAVHINDH} $ymdh`; dt_int=3600.; n_int=9999 ; + ymdh_int=$($NDATE -${WAVHINDH} $ymdh); dt_int=3600.; n_int=9999 ; echo "$USHwave/wave_grid_interp_sbs.sh $grdID $ymdh_int $dt_int $n_int > grint_$grdID.out 2>&1" >> ${fcmdigrd}.${nigrd} if [ "$DOGRB_WAV" = 'YES' ] then - gribFL=\'`echo ${OUTPARS_WAV}`\' + gribFL=\'$(echo ${OUTPARS_WAV})\' case $grdID in glo_15mxt) GRDNAME='global' ; GRDRES=0p25 ; GRIDNR=255 ; MODNR=11 ;; glo_30mxt) GRDNAME='global' ; GRDRES=0p50 ; GRIDNR=255 ; MODNR=11 ;; @@ -331,7 +331,7 @@ then for grdID in ${wavepostGRD} # First concatenate grib files for sbs grids do - gribFL=\'`echo ${OUTPARS_WAV}`\' + gribFL=\'$(echo ${OUTPARS_WAV})\' case $grdID in aoc_9km) GRDNAME='arctic' ; GRDRES=9km ; GRIDNR=255 ; MODNR=11 ;; ant_9km) GRDNAME='antarc' ; GRDRES=9km ; GRIDNR=255 ; MODNR=11 ;; @@ -377,12 +377,12 @@ done fi - wavenproc=`wc -l ${fcmdnow} | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l ${fcmdnow} | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) set +x echo ' ' - echo " Executing the grib2_sbs scripts at : `date`" + echo " Executing the grib2_sbs scripts at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -456,7 +456,7 @@ set +x echo ' ' - echo "Ending at : `date`" + echo "Ending at : $(date)" echo '-----------' echo ' ' echo ' *** End of MWW3 postprocessor ***' diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index efe8de49b2..85f2383304 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -45,7 +45,7 @@ # if ensemble; waveMEMB var empty in deterministic export WAV_MOD_TAG=${CDUMP}wave${waveMEMB} - postmsg "$jlogfile" "HAS BEGUN on `hostname`" + postmsg "$jlogfile" "HAS BEGUN on $(hostname)" msg="Starting WAVE PNT POSTPROCESSOR SCRIPT for $WAV_MOD_TAG" postmsg "$jlogfile" "$msg" @@ -56,7 +56,7 @@ echo ' *** WAVE PNT POSTPROCESSOR SCRIPT ***' echo ' *************************************' echo ' ' - echo "Starting at : `date`" + echo "Starting at : $(date)" echo '-------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -129,7 +129,7 @@ [[ "$LOUD" = YES ]] && set -x cp -f $COMIN/rundata/${CDUMP}wave.mod_def.${grdID} mod_def.$grdID - iloop=`expr $iloop + 1` + iloop=$(expr $iloop + 1) fi done @@ -243,8 +243,8 @@ if [ "$DOSPC_WAV" = 'YES' ] || [ "$DOBLL_WAV" = 'YES' ] then - ymdh=`$NDATE -${WAVHINDH} $CDATE` - tstart="`echo $ymdh | cut -c1-8` `echo $ymdh | cut -c9-10`0000" + ymdh=$($NDATE -${WAVHINDH} $CDATE) + tstart="$(echo $ymdh | cut -c1-8) $(echo $ymdh | cut -c9-10)0000" dtspec=3600. # default time step (not used here) sed -e "s/TIME/$tstart/g" \ -e "s/DT/$dtspec/g" \ @@ -307,8 +307,8 @@ grep -F -f ibp_tags buoy_lst.loc > buoy_tmp1.loc #sed '$d' buoy_tmp1.loc > buoy_tmp2.loc - buoys=`awk '{ print $1 }' buoy_tmp1.loc` - Nb=`wc buoy_tmp1.loc | awk '{ print $1 }'` + buoys=$(awk '{ print $1 }' buoy_tmp1.loc) + Nb=$(wc buoy_tmp1.loc | awk '{ print $1 }') rm -f buoy_tmp1.loc if [ -s buoy_log.dat ] @@ -336,7 +336,7 @@ set +x echo ' ' - echo " Input files read and processed at : `date`" + echo " Input files read and processed at : $(date)" echo ' ' echo ' Data summary : ' echo ' ---------------------------------------------' @@ -363,8 +363,8 @@ fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV_PNT ]; do - echo " Creating the wave point scripts at : `date`" - ymdh=`$NDATE $fhr $CDATE` + echo " Creating the wave point scripts at : $(date)" + ymdh=$($NDATE $fhr $CDATE) YMD=$(echo $ymdh | cut -c1-8) HMS="$(echo $ymdh | cut -c9-10)0000" YMDHMS=${YMD}${HMS} @@ -474,12 +474,12 @@ done fi - wavenproc=`wc -l cmdfile | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l cmdfile | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) set +x echo ' ' - echo " Executing the wave point scripts at : `date`" + echo " Executing the wave point scripts at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -516,7 +516,7 @@ cd $DATA - echo "Before create cmdfile for cat bouy : `date`" + echo "Before create cmdfile for cat bouy : $(date)" rm -f cmdfile.bouy touch cmdfile.bouy chmod 744 cmdfile.bouy @@ -566,12 +566,12 @@ done fi - wavenproc=`wc -l cmdfile.bouy | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l cmdfile.bouy | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) set +x echo ' ' - echo " Executing the boundary point cat script at : `date`" + echo " Executing the boundary point cat script at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -668,12 +668,12 @@ fi fi - wavenproc=`wc -l cmdtarfile | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l cmdtarfile | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) set +x echo ' ' - echo " Executing the wave_tar scripts at : `date`" + echo " Executing the wave_tar scripts at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -711,7 +711,7 @@ set +x echo ' ' - echo "Ending at : `date`" + echo "Ending at : $(date)" echo '-----------' echo ' ' echo ' *** End of MWW3 pnt postprocessor ***' diff --git a/scripts/exgfs_wave_prdgen_bulls.sh b/scripts/exgfs_wave_prdgen_bulls.sh index 4eb511309e..dc46136a54 100755 --- a/scripts/exgfs_wave_prdgen_bulls.sh +++ b/scripts/exgfs_wave_prdgen_bulls.sh @@ -40,7 +40,7 @@ cd $DATA export wavelog=${DATA}/${RUNwave}_prdgbulls.log - postmsg "$jlogfile" "HAS BEGUN on `hostname`" + postmsg "$jlogfile" "HAS BEGUN on $(hostname)" msg="Starting MWW3 BULLETINS PRODUCTS SCRIPT" postmsg "$jlogfile" "$msg" @@ -55,7 +55,7 @@ echo ' **************************************' echo " $date $cycle" echo ' ' - echo "Starting at : `date`" + echo "Starting at : $(date)" echo ' ' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -115,8 +115,8 @@ # 1.b Output locations from bulletin files set +x - echo ' Nb=`ls -1 *.cbull | wc -l`' - Nb=`ls -1 *.cbull | wc -l` + echo ' Nb=$(ls -1 *.cbull | wc -l)' + Nb=$(ls -1 *.cbull | wc -l) [[ "$LOUD" = YES ]] && set -x echo ' ' echo " Number of bulletin files : $Nb" @@ -153,8 +153,8 @@ # 2.c Generate list of bulletins to process echo ' Generating buoy list ...' - echo 'bulls=`sed -e 's/export b//g' -e 's/=/ /' awipsbull.data | grep -v "#" |awk '{ print $1}'`' - bulls=`sed -e 's/export b//g' -e 's/=/ /' awipsbull.data | grep -v "#" |awk '{ print $1}'` + echo 'bulls=$(sed -e 's/export b//g' -e 's/=/ /' awipsbull.data | grep -v "#" |awk '{ print $1}')' + bulls=$(sed -e 's/export b//g' -e 's/=/ /' awipsbull.data | grep -v "#" |awk '{ print $1}') # 2.d Looping over buoys running formbul echo ' Looping over buoys ... \n' @@ -162,7 +162,7 @@ for bull in $bulls; do fname="${RUNwave}.$bull.cbull" oname="awipsbull.$bull.$cycle.${RUNwave}" - headr=`grep "b${bull}=" awipsbull.data | sed 's/=/ /g' | awk '{ print $3}'` + headr=$(grep "b${bull}=" awipsbull.data | sed 's/=/ /g' | awk '{ print $3}') echo " Processing $bull ($headr $oname) ..." if [ -z "$headr" ] || [ ! -s $fname ]; then @@ -239,7 +239,7 @@ set +x echo ' ' echo ' ' - echo "Ending at : `date`" + echo "Ending at : $(date)" echo ' ' echo ' *** End of MWW3 BULLETINS product generation ***' echo ' ' diff --git a/scripts/exgfs_wave_prdgen_gridded.sh b/scripts/exgfs_wave_prdgen_gridded.sh index 3243dacb3e..ed6141afec 100755 --- a/scripts/exgfs_wave_prdgen_gridded.sh +++ b/scripts/exgfs_wave_prdgen_gridded.sh @@ -42,7 +42,7 @@ cd $DATA export wavelog=${DATA}/${COMPONENTwave}_prdggridded.log - postmsg "$jlogfile" "HAS BEGUN on `hostname`" + postmsg "$jlogfile" "HAS BEGUN on $(hostname)" msg="Starting MWW3 GRIDDED PRODUCTS SCRIPT" postmsg "$jlogfile" "$msg" # Output grids @@ -58,7 +58,7 @@ echo ' ****************************' echo " $date $cycle" echo ' ' - echo "Starting at : `date`" + echo "Starting at : $(date)" echo ' ' echo " AWIPS grib fields" echo " Wave Grids : $grids" @@ -79,7 +79,7 @@ # (should be same as ASWELL) #export arrpar=(WIND UGRD VGRD HTSGW PERPW DIRPW WVHGT WVPER WVDIR WDIR ${ASWELL[@]} ${ASWDIR[@]} ${ASWPER[@]}) export arrpar=(WIND WDIR UGRD VGRD HTSGW PERPW DIRPW WVHGT ${ASWELL[@]} WVPER ${ASWPER[@]} WVDIR ${ASWDIR[@]} ) - export nparam=`echo ${arrpar[@]} | wc -w` + export nparam=$(echo ${arrpar[@]} | wc -w) # 1.a Grib file (AWIPS and FAX charts) @@ -131,8 +131,8 @@ iparam=1 while [ ${iparam} -le ${nparam} ]; do nip=${arrpar[$iparam-1]} - prepar=`echo $nip | rev | cut -c2- | rev` #Part prefix (assumes 1 digit index) - paridx=`echo $nip | rev | cut -c-1` + prepar=$(echo $nip | rev | cut -c2- | rev) #Part prefix (assumes 1 digit index) + paridx=$(echo $nip | rev | cut -c-1) npart=0 case $prepar in SWELL) npart=1 ;; @@ -150,7 +150,7 @@ $WGRIB2 -i $GRIBIN -grib temp.grib2 > wgrib.out 2>&1 $WGRIB2 temp.grib2 -append -grib $GRIBOUT fi - iparam=`expr ${iparam} + 1` + iparam=$(expr ${iparam} + 1) done #end wave param loop #====================================================================== GRIBIN=$RUNwave.$cycle.$grdID.f${fhr}.clipped.grib2 @@ -277,7 +277,7 @@ echo ' ' echo ' ' - echo "Ending at : `date`" + echo "Ending at : $(date)" echo ' ' echo ' *** End of MWW3 product generation ***' echo ' ' diff --git a/scripts/exgfs_wave_prep.sh b/scripts/exgfs_wave_prep.sh index f0533b5f8a..fc0180a808 100755 --- a/scripts/exgfs_wave_prep.sh +++ b/scripts/exgfs_wave_prep.sh @@ -54,7 +54,7 @@ cd $DATA mkdir outtmp - msg="HAS BEGUN on `hostname`" + msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" msg="Starting MWW3 PREPROCESSOR SCRIPT for $WAV_MOD_TAG" postmsg "$jlogfile" "$msg" @@ -67,7 +67,7 @@ echo ' PREP for wave component of NCEP coupled system' echo " Wave component identifier : $WAV_MOD_TAG " echo ' ' - echo "Starting at : `date`" + echo "Starting at : $(date)" echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -97,38 +97,38 @@ if [ $IAU_OFFSET = 0 ]; then ymdh_beg=$YMDH else - ymdh_beg=`$NDATE -$WAVHINDH $YMDH` + ymdh_beg=$($NDATE -$WAVHINDH $YMDH) fi - time_beg="`echo $ymdh_beg | cut -c1-8` `echo $ymdh_beg | cut -c9-10`0000" - ymdh_end=`$NDATE $FHMAX_WAV $YMDH` - time_end="`echo $ymdh_end | cut -c1-8` `echo $ymdh_end | cut -c9-10`0000" + time_beg="$(echo $ymdh_beg | cut -c1-8) $(echo $ymdh_beg | cut -c9-10)0000" + ymdh_end=$($NDATE $FHMAX_WAV $YMDH) + time_end="$(echo $ymdh_end | cut -c1-8) $(echo $ymdh_end | cut -c9-10)0000" ymdh_beg_out=$YMDH - time_beg_out="`echo $ymdh_beg_out | cut -c1-8` `echo $ymdh_beg_out | cut -c9-10`0000" + time_beg_out="$(echo $ymdh_beg_out | cut -c1-8) $(echo $ymdh_beg_out | cut -c9-10)0000" # Restart file times (already has IAU_FHROT in WAVHINDH) RSTOFFSET=$(( ${WAVHCYC} - ${WAVHINDH} )) # Update restart time is added offset relative to model start RSTOFFSET=$(( ${RSTOFFSET} + ${RSTIOFF_WAV} )) - ymdh_rst_ini=`$NDATE ${RSTOFFSET} $YMDH` + ymdh_rst_ini=$($NDATE ${RSTOFFSET} $YMDH) RST2OFFSET=$(( DT_2_RST_WAV / 3600 )) - ymdh_rst2_ini=`$NDATE ${RST2OFFSET} $YMDH` # DT2 relative to first-first-cycle restart file + ymdh_rst2_ini=$($NDATE ${RST2OFFSET} $YMDH) # DT2 relative to first-first-cycle restart file # First restart file for cycling - time_rst_ini="`echo $ymdh_rst_ini | cut -c1-8` `echo $ymdh_rst_ini | cut -c9-10`0000" + time_rst_ini="$(echo $ymdh_rst_ini | cut -c1-8) $(echo $ymdh_rst_ini | cut -c9-10)0000" if [ ${DT_1_RST_WAV} = 1 ]; then time_rst1_end=${time_rst_ini} else RST1OFFSET=$(( DT_1_RST_WAV / 3600 )) - ymdh_rst1_end=`$NDATE $RST1OFFSET $ymdh_rst_ini` - time_rst1_end="`echo $ymdh_rst1_end | cut -c1-8` `echo $ymdh_rst1_end | cut -c9-10`0000" + ymdh_rst1_end=$($NDATE $RST1OFFSET $ymdh_rst_ini) + time_rst1_end="$(echo $ymdh_rst1_end | cut -c1-8) $(echo $ymdh_rst1_end | cut -c9-10)0000" fi # Second restart file for checkpointing if [ "${RSTTYPE_WAV}" = "T" ]; then - time_rst2_ini="`echo $ymdh_rst2_ini | cut -c1-8` `echo $ymdh_rst2_ini | cut -c9-10`0000" + time_rst2_ini="$(echo $ymdh_rst2_ini | cut -c1-8) $(echo $ymdh_rst2_ini | cut -c9-10)0000" time_rst2_end=$time_end # Condition for gdas run or any other run when checkpoint stamp is > ymdh_end if [ $ymdh_rst2_ini -ge $ymdh_end ]; then - ymdh_rst2_ini=`$NDATE 3 $ymdh_end` - time_rst2_ini="`echo $ymdh_rst2_ini | cut -c1-8` `echo $ymdh_rst2_ini | cut -c9-10`0000" + ymdh_rst2_ini=$($NDATE 3 $ymdh_end) + time_rst2_ini="$(echo $ymdh_rst2_ini | cut -c1-8) $(echo $ymdh_rst2_ini | cut -c9-10)0000" time_rst2_end=$time_rst2_ini fi else @@ -322,11 +322,11 @@ do if [ ${CFP_MP:-"NO"} = "YES" ]; then echo "$nm $USHwave/wave_g2ges.sh $ymdh > grb_$ymdh.out 2>&1" >> cmdfile - nm=`expr $nm + 1` + nm=$(expr $nm + 1) else echo "$USHwave/wave_g2ges.sh $ymdh > grb_$ymdh.out 2>&1" >> cmdfile fi - ymdh=`$NDATE $WAV_WND_HOUR_INC $ymdh` + ymdh=$($NDATE $WAV_WND_HOUR_INC $ymdh) done # 3.b Execute the serial or parallel cmdfile @@ -334,12 +334,12 @@ # Set number of processes for mpmd cat cmdfile - wavenproc=`wc -l cmdfile | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l cmdfile | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) set +x echo ' ' - echo " Executing the wnd grib cmd file at : `date`" + echo " Executing the wnd grib cmd file at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -400,10 +400,10 @@ echo ' ' [[ "$LOUD" = YES ]] && set -x postmsg "$jlogfile" " File for $ymdh : error in wave_g2ges.sh" - nr_err=`expr $nr_err + 1` + nr_err=$(expr $nr_err + 1) rm -f gwnd.$ymdh else - grbfile=`grep 'File for' grb_${ymdh}.out` + grbfile=$(grep 'File for' grb_${ymdh}.out) if [ -z "$grbfile" ] then set +x @@ -411,7 +411,7 @@ echo " File for $ymdh : cannot identify source" echo ' ' [[ "$LOUD" = YES ]] && set -x - nr_err=`expr $nr_err + 1` + nr_err=$(expr $nr_err + 1) rm -f gwnd.$ymdh else if [ ! -f gwnd.$ymdh ] @@ -421,7 +421,7 @@ echo " File for $ymdh : file not found" echo ' ' [[ "$LOUD" = YES ]] && set -x - nr_err=`expr $nr_err + 1` + nr_err=$(expr $nr_err + 1) else set +x echo ' ' @@ -432,7 +432,7 @@ fi fi fi - ymdh=`$NDATE $WAV_WND_HOUR_INC $ymdh` + ymdh=$($NDATE $WAV_WND_HOUR_INC $ymdh) done if [ -f grb_*.out ] @@ -481,7 +481,7 @@ echo ' ' [[ "$LOUD" = YES ]] && set -x - files=`ls gwnd.* 2> /dev/null` + files=$(ls gwnd.* 2> /dev/null) if [ -z "$files" ] then @@ -571,12 +571,12 @@ windOK='yes' while read line do - date1=`echo $line | cut -d ' ' -f 1` - date2=`echo $line | cut -d ' ' -f 2` - ymdh="$date1`echo $date2 | cut -c1-2`" + date1=$(echo $line | cut -d ' ' -f 1) + date2=$(echo $line | cut -d ' ' -f 2) + ymdh="$date1$(echo $date2 | cut -c1-2)" if [ "$first_pass" = 'no' ] then - hr_inc=`$NHOUR $ymdh $ymdh_prev` + hr_inc=$($NHOUR $ymdh $ymdh_prev) if [ "${hr_inc}" -gt "${WAV_WND_HOUR_INC}" ] then set +x @@ -647,7 +647,7 @@ ymdh_rtofs=${RPDY}00 # RTOFS runs once daily use ${PDY}00 if [ "$ymdh_beg" -lt "$ymdh_rtofs" ];then #If the start time is before the first hour of RTOFS, use the previous cycle - export RPDY=`$NDATE -24 ${RPDY}00 | cut -c1-8` + export RPDY=$($NDATE -24 ${RPDY}00 | cut -c1-8) fi #Set the first time for RTOFS files to be the beginning time of simulation ymdh_rtofs=$ymdh_beg @@ -658,7 +658,7 @@ rtofsfile3=$COMIN_WAV_RTOFS/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f072_prog.nc if [ ! -f $rtofsfile1 ] || [ ! -f $rtofsfile2 ] || [ ! -f $rtofsfile3 ]; then #Needed current files are not available, so use RTOFS from previous day - export RPDY=`$NDATE -24 ${RPDY}00 | cut -c1-8` + export RPDY=$($NDATE -24 ${RPDY}00 | cut -c1-8) fi else rtofsfile1=$COMIN_WAV_RTOFS/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f096_prog.nc @@ -669,13 +669,13 @@ if [ ! -f $rtofsfile1 ] || [ ! -f $rtofsfile2 ] || [ ! -f $rtofsfile3 ] || [ ! -f $rtofsfile4 ] || [ ! -f $rtofsfile5 ]; then #Needed current files are not available, so use RTOFS from previous day - export RPDY=`$NDATE -24 ${RPDY}00 | cut -c1-8` + export RPDY=$($NDATE -24 ${RPDY}00 | cut -c1-8) fi fi export COMIN_WAV_CUR=$COMIN_WAV_RTOFS/${WAVECUR_DID}.${RPDY} - ymdh_end_rtofs=`$NDATE ${FHMAX_WAV_CUR} ${RPDY}00` + ymdh_end_rtofs=$($NDATE ${FHMAX_WAV_CUR} ${RPDY}00) if [ "$ymdh_end" -lt "$ymdh_end_rtofs" ]; then ymdh_end_rtofs=$ymdh_end fi @@ -690,8 +690,8 @@ do # Timing has to be made relative to the single 00z RTOFS cycle for RTOFS PDY (RPDY) # Start at first fhr for - fhr_rtofs=`${NHOUR} ${ymdh_rtofs} ${RPDY}00` - fh3_rtofs=`printf "%03d" "${fhr_rtofs#0}"` + fhr_rtofs=$(${NHOUR} ${ymdh_rtofs} ${RPDY}00) + fh3_rtofs=$(printf "%03d" "${fhr_rtofs#0}") curfile1h=${COMIN_WAV_CUR}/rtofs_glo_2ds_${fext}${fh3_rtofs}_prog.nc curfile3h=${COMIN_WAV_CUR}/rtofs_glo_2ds_${fext}${fh3_rtofs}_prog.nc @@ -723,7 +723,7 @@ if [ ${CFP_MP:-"NO"} = "YES" ]; then echo "$nm $USHwave/wave_prnc_cur.sh $ymdh_rtofs $curfile $fhr_rtofs $FLGFIRST > cur_$ymdh_rtofs.out 2>&1" >> cmdfile - nm=`expr $nm + 1` + nm=$(expr $nm + 1) else echo "$USHwave/wave_prnc_cur.sh $ymdh_rtofs $curfile $fhr_rtofs $FLGFIRST > cur_$ymdh_rtofs.out 2>&1" >> cmdfile fi @@ -735,16 +735,16 @@ if [ $fhr_rtofs -ge ${WAV_CUR_HF_FH} ] ; then NDATE_DT=${WAV_CUR_DT} fi - ymdh_rtofs=`$NDATE $NDATE_DT $ymdh_rtofs` + ymdh_rtofs=$($NDATE $NDATE_DT $ymdh_rtofs) done # Set number of processes for mpmd - wavenproc=`wc -l cmdfile | awk '{print $1}'` - wavenproc=`echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))` + wavenproc=$(wc -l cmdfile | awk '{print $1}') + wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) set +x echo ' ' - echo " Executing the curr prnc cmdfile at : `date`" + echo " Executing the curr prnc cmdfile at : $(date)" echo ' ------------------------------------' echo ' ' [[ "$LOUD" = YES ]] && set -x @@ -775,7 +775,7 @@ [[ "$LOUD" = YES ]] && set -x fi - files=`ls ${WAVECUR_DID}.* 2> /dev/null` + files=$(ls ${WAVECUR_DID}.* 2> /dev/null) if [ -z "$files" ] then @@ -882,12 +882,12 @@ # Check if waveesmfGRD is set if [ ${waveesmfGRD} ] then - NFGRIDS=`expr $NFGRIDS + 1` + NFGRIDS=$(expr $NFGRIDS + 1) fi case ${WW3ATMINP} in 'YES' ) - NFGRIDS=`expr $NFGRIDS + 1` + NFGRIDS=$(expr $NFGRIDS + 1) WINDLINE=" '$WAVEWND_FID' F F T F F F F F F" WINDFLAG="$WAVEWND_FID" ;; @@ -905,7 +905,7 @@ case ${WW3ICEINP} in 'YES' ) - NFGRIDS=`expr $NFGRIDS + 1` + NFGRIDS=$(expr $NFGRIDS + 1) ICEIFLAG='T' ICELINE=" '$WAVEICE_FID' F F F T F F F F F" ICEFLAG="$WAVEICE_FID" @@ -925,7 +925,7 @@ case ${WW3CURINP} in 'YES' ) if [ "$WAVECUR_FID" != "$WAVEICE_FID" ]; then - NFGRIDS=`expr $NFGRIDS + 1` + NFGRIDS=$(expr $NFGRIDS + 1) CURRLINE=" '$WAVECUR_FID' F T F F F F F F F" CURRFLAG="$WAVECUR_FID" else # cur fields share the same grid as ice grid @@ -952,11 +952,11 @@ # grdGRP=1 # Single group for now for grid in ${waveGRD} do - GRDN=`expr ${GRDN} + 1` + GRDN=$(expr ${GRDN} + 1) agrid=( ${agrid[*]} ${grid} ) - NMGRIDS=`expr $NMGRIDS + 1` - gridN=`echo $waveGRDN | awk -v i=$GRDN '{print $i}'` - gridG=`echo $waveGRDG | awk -v i=$GRDN '{print $i}'` + NMGRIDS=$(expr $NMGRIDS + 1) + gridN=$(echo $waveGRDN | awk -v i=$GRDN '{print $i}') + gridG=$(echo $waveGRDG | awk -v i=$GRDN '{print $i}') gline="${gline}'${grid}' 'no' 'CURRFLAG' 'WINDFLAG' 'ICEFLAG' 'no' 'no' 'no' 'no' 'no' ${gridN} ${gridG} 0.00 1.00 F\n" done gline="${gline}\$" @@ -1080,7 +1080,7 @@ set +x echo ' ' - echo "Ending at : `date`" + echo "Ending at : $(date)" echo ' ' echo ' *** End of MWW3 preprocessor ***' echo ' ' diff --git a/scripts/exglobal_atmos_tropcy_qc_reloc.sh b/scripts/exglobal_atmos_tropcy_qc_reloc.sh index 0e99ea2106..f158b10ff9 100755 --- a/scripts/exglobal_atmos_tropcy_qc_reloc.sh +++ b/scripts/exglobal_atmos_tropcy_qc_reloc.sh @@ -13,15 +13,15 @@ set -x # Make sure we are in the $DATA directory cd $DATA -msg="HAS BEGUN on `hostname`" +msg="HAS BEGUN on $(hostname)" postmsg "$jlogfile" "$msg" cat break > $pgmout export COMSP=$COMOUT/${RUN}.${cycle}. -tmhr=`echo $tmmark|cut -c3-4` -cdate10=` ${NDATE:?} -$tmhr $PDY$cyc` +tmhr=$(echo $tmmark|cut -c3-4) +cdate10=$( ${NDATE:?} -$tmhr $PDY$cyc) NET_uc=$(echo $RUN | tr [a-z] [A-Z]) tmmark_uc=$(echo $tmmark | tr [a-z] [A-Z]) diff --git a/scripts/run_gfsmos_master.sh.cray b/scripts/run_gfsmos_master.sh.cray index 66386bb9e0..e013f0b34c 100755 --- a/scripts/run_gfsmos_master.sh.cray +++ b/scripts/run_gfsmos_master.sh.cray @@ -47,9 +47,9 @@ export SENDCOM=YES #------------------ dateIn=$1 -export PDY=`echo $dateIn | cut -c 1-8` -export cyc=`echo $dateIn | cut -c 9-10` -export prevday=`$NDATE -24 ${PDY}00 | cut -c1-8` +export PDY=$(echo $dateIn | cut -c 1-8) +export cyc=$(echo $dateIn | cut -c 9-10) +export prevday=$($NDATE -24 ${PDY}00 | cut -c1-8) # # VARIABLES TO SET @@ -167,7 +167,7 @@ bsub -J $job \ ######################################################################## # JGFSMOS_FORECAST ######################################################################## -if [ $prevday -lt `date -u +%Y%m%d -d "48 hours ago"` ]; then +if [ $prevday -lt $(date -u +%Y%m%d -d "48 hours ago") ]; then export COMINhourly=$PTMPROOT/hourly.$PDY if [[ ! -d $COMINhourly ]]; then mkdir -p $COMINhourly diff --git a/scripts/run_gfsmos_master.sh.dell b/scripts/run_gfsmos_master.sh.dell index 32264146c1..eb255e11f5 100755 --- a/scripts/run_gfsmos_master.sh.dell +++ b/scripts/run_gfsmos_master.sh.dell @@ -37,7 +37,7 @@ fi ####################################################################### # Check the host to determine whether tide or gyre is prod ####################################################################### -#chkhost=`hostname | cut -c1` +#chkhost=$(hostname | cut -c1) if [[ $SITE == "GYRE" ]] || [[ $SITE == "SURGE" ]] || [[ $SITE == "VENUS" ]]; then gort="g" elif [[ $SITE == "TIDE" ]] || [[ $SITE == "LUNA" ]] || [[ $SITE == "MARS" ]]; then @@ -92,22 +92,22 @@ export CODEDIR=/gpfs/dell1/nco/ops/nwpara/mos_shared.v2.6.5 #-------------------------------- ##export PDY=20180419 -##export PDY=`date -u +%Y%m%d` -##export prevday=`date -u --date="${PDY} 0000 UTC 24 hours ago" +%Y%m%d` +##export PDY=$(date -u +%Y%m%d) +##export prevday=$(date -u --date="${PDY} 0000 UTC 24 hours ago" +%Y%m%d) dateIn=$1 #if [ $REALTIME = "YES" ]; then -# GDATE=`$NDATE -24 $dateIn` +# GDATE=$($NDATE -24 $dateIn) # dateIn=$GDATE #fi -export PDY=`echo $dateIn | cut -c 1-8` -export cyc=`echo $dateIn | cut -c 9-10` -export prevday=`$NDATE -24 ${PDY}00 | cut -c1-8` +export PDY=$(echo $dateIn | cut -c 1-8) +export cyc=$(echo $dateIn | cut -c 9-10) +export prevday=$($NDATE -24 ${PDY}00 | cut -c1-8) #-------------------------------- #-------------------------------- -##let hour=`date -u +"%-H"` +##let hour=$(date -u +"%-H") ##if [[ $hour -ge 4 && $hour -lt 10 ]]; then ## export cyc=00 ## export range=both @@ -492,7 +492,7 @@ if [ "$range" == "ext" -o "$range" == "both" ]; then ######################################################################## #if [ "$skipmodel" != "y" ]; then #let attempts=1 -#proj_list=`seq -f %03g 252 12 384` +#proj_list=$(seq -f %03g 252 12 384) #for tau in $proj_list #do # while [[ $attempts -le 120 ]] @@ -524,7 +524,7 @@ if [ "$range" == "ext" -o "$range" == "both" ]; then ######################################################################## #if [ "$skipmodel" != "y" ]; then #let attempts1deg=1 -#proj_list=`seq -f %03g 204 12 384` +#proj_list=$(seq -f %03g 204 12 384) #for tau in $proj_list #do # while [[ $attempts1deg -le 120 ]] diff --git a/scripts/run_gfsmos_master.sh.hera b/scripts/run_gfsmos_master.sh.hera index b8a69ab673..04bfda61c5 100755 --- a/scripts/run_gfsmos_master.sh.hera +++ b/scripts/run_gfsmos_master.sh.hera @@ -37,7 +37,7 @@ export PATH=./:$PATH ####################################################################### # Check the host to determine whether tide or gyre is prod ####################################################################### -#chkhost=`hostname | cut -c1` +#chkhost=$(hostname | cut -c1) #if [[ $SITE == "GYRE" ]] || [[ $SITE == "SURGE" ]] || [[ $SITE == "VENUS" ]]; then # gort="g" #elif [[ $SITE == "TIDE" ]] || [[ $SITE == "LUNA" ]] || [[ $SITE == "MARS" ]]; then @@ -115,22 +115,22 @@ export CODEDIR=$MODELROOT/mos_shared.v2.6.5 #-------------------------------- ##export PDY=20180419 -##export PDY=`date -u +%Y%m%d` -##export prevday=`date -u --date="${PDY} 0000 UTC 24 hours ago" +%Y%m%d` +##export PDY=$(date -u +%Y%m%d) +##export prevday=$(date -u --date="${PDY} 0000 UTC 24 hours ago" +%Y%m%d) dateIn=$1 #if [ $REALTIME = "YES" ]; then -# GDATE=`$NDATE -24 $dateIn` +# GDATE=$($NDATE -24 $dateIn) # dateIn=$GDATE #fi -export PDY=`echo $dateIn | cut -c 1-8` -export cyc=`echo $dateIn | cut -c 9-10` -export prevday=`$NDATE -24 ${PDY}00 | cut -c1-8` +export PDY=$(echo $dateIn | cut -c 1-8) +export cyc=$(echo $dateIn | cut -c 9-10) +export prevday=$($NDATE -24 ${PDY}00 | cut -c1-8) #-------------------------------- #-------------------------------- -##let hour=`date -u +"%-H"` +##let hour=$(date -u +"%-H") ##if [[ $hour -ge 4 && $hour -lt 10 ]]; then ## export cyc=00 ## export range=both @@ -536,7 +536,7 @@ if [ "$range" == "ext" -o "$range" == "both" ]; then ######################################################################## #if [ "$skipmodel" != "y" ]; then #let attempts=1 -#proj_list=`seq -f %03g 252 12 384` +#proj_list=$(seq -f %03g 252 12 384) #for tau in $proj_list #do # while [[ $attempts -le 120 ]] @@ -568,7 +568,7 @@ if [ "$range" == "ext" -o "$range" == "both" ]; then ######################################################################## #if [ "$skipmodel" != "y" ]; then #let attempts1deg=1 -#proj_list=`seq -f %03g 204 12 384` +#proj_list=$(seq -f %03g 204 12 384) #for tau in $proj_list #do # while [[ $attempts1deg -le 120 ]] diff --git a/scripts/run_reg2grb2.sh b/scripts/run_reg2grb2.sh index ffe0a0a57d..e1b1e927bf 100755 --- a/scripts/run_reg2grb2.sh +++ b/scripts/run_reg2grb2.sh @@ -22,16 +22,16 @@ export mfcstcpl=${mfcstcpl:-1} export IGEN_OCNP=${IGEN_OCNP:-197} # PT This is the forecast date -export year=`echo $CDATE | cut -c1-4` -export month=`echo $CDATE | cut -c5-6` -export day=`echo $CDATE | cut -c7-8` -export hour=`echo $CDATE | cut -c9-10` +export year=$(echo $CDATE | cut -c1-4) +export month=$(echo $CDATE | cut -c5-6) +export day=$(echo $CDATE | cut -c7-8) +export hour=$(echo $CDATE | cut -c9-10) # PT This is the initialization date -export syear=`echo $IDATE | cut -c1-4` -export smonth=`echo $IDATE | cut -c5-6` -export sday=`echo $IDATE | cut -c7-8` -export shour=`echo $IDATE | cut -c9-10` +export syear=$(echo $IDATE | cut -c1-4) +export smonth=$(echo $IDATE | cut -c5-6) +export sday=$(echo $IDATE | cut -c7-8) +export shour=$(echo $IDATE | cut -c9-10) # PT Need to get this from above - could be 6 or 1 hour export hh_inc_ocn=6 diff --git a/sorc/build_all.sh b/sorc/build_all.sh index 6c8bfabcd0..f063f7799b 100755 --- a/sorc/build_all.sh +++ b/sorc/build_all.sh @@ -34,7 +34,7 @@ export USE_PREINST_LIBS="true" # END USER DEFINED STUFF #------------------------------------ -build_dir=`pwd` +build_dir=$(pwd) logs_dir=$build_dir/logs if [ ! -d $logs_dir ]; then echo "Creating logs folder" diff --git a/sorc/build_gfs_util.sh b/sorc/build_gfs_util.sh index 2ea60a59aa..4844bf0068 100755 --- a/sorc/build_gfs_util.sh +++ b/sorc/build_gfs_util.sh @@ -2,7 +2,7 @@ set -eux source ./machine-setup.sh > /dev/null 2>&1 -export dir=` pwd ` +export dir=$( pwd ) cd ../util/sorc diff --git a/sorc/build_gfs_wafs.sh b/sorc/build_gfs_wafs.sh index 921d97f117..8c8aee6ac4 100755 --- a/sorc/build_gfs_wafs.sh +++ b/sorc/build_gfs_wafs.sh @@ -2,7 +2,7 @@ set -eux source ./machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"} if [ $USE_PREINST_LIBS = true ]; then diff --git a/sorc/build_gldas.sh b/sorc/build_gldas.sh index e8162d3f4f..37db45a60f 100755 --- a/sorc/build_gldas.sh +++ b/sorc/build_gldas.sh @@ -2,7 +2,7 @@ set -eux source ./machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"} if [ $USE_PREINST_LIBS = true ]; then diff --git a/sorc/build_gsi.sh b/sorc/build_gsi.sh index 1f202a805c..b912f6c8d7 100755 --- a/sorc/build_gsi.sh +++ b/sorc/build_gsi.sh @@ -2,7 +2,7 @@ set -eux source ./machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"} if [ $USE_PREINST_LIBS = true ]; then diff --git a/sorc/build_ncep_post.sh b/sorc/build_ncep_post.sh index 95aa0caedd..8cd2569aba 100755 --- a/sorc/build_ncep_post.sh +++ b/sorc/build_ncep_post.sh @@ -2,7 +2,7 @@ set -eux source ./machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"} if [ $USE_PREINST_LIBS = true ]; then diff --git a/sorc/build_ufs_utils.sh b/sorc/build_ufs_utils.sh index 0a22135a15..a45b008650 100755 --- a/sorc/build_ufs_utils.sh +++ b/sorc/build_ufs_utils.sh @@ -2,7 +2,7 @@ set -eux source ./machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) if [ $target = wcoss_dell_p3 ]; then target=dell; fi if [ $target = wcoss_cray ]; then target=cray; fi diff --git a/sorc/fv3nc2nemsio.fd/makefile.sh b/sorc/fv3nc2nemsio.fd/makefile.sh index 94b9b253cc..30c60cf7f0 100755 --- a/sorc/fv3nc2nemsio.fd/makefile.sh +++ b/sorc/fv3nc2nemsio.fd/makefile.sh @@ -7,8 +7,8 @@ source ../../modulefiles/module-setup.sh.inc module use ../../modulefiles module load modulefile.fv3nc2nemsio.$machine -LIBnetcdf=`$NETCDF/bin/nf-config --flibs` -INCnetcdf=`$NETCDF/bin/nf-config --fflags` +LIBnetcdf=$($NETCDF/bin/nf-config --flibs) +INCnetcdf=$($NETCDF/bin/nf-config --fflags) export NETCDF_LDFLAGS=$LIBnetcdf export NETCDF_INCLUDE=$INCnetcdf diff --git a/sorc/machine-setup.sh b/sorc/machine-setup.sh index 59e9ad8947..6531d5a28d 100644 --- a/sorc/machine-setup.sh +++ b/sorc/machine-setup.sh @@ -17,9 +17,9 @@ else fi target="" -USERNAME=`echo $LOGNAME | awk '{ print tolower($0)'}` +USERNAME=$(echo $LOGNAME | awk '{ print tolower($0)'}) ##--------------------------------------------------------------------------- -export hname=`hostname | cut -c 1,1` +export hname=$(hostname | cut -c 1,1) if [[ -d /work ]] ; then # We are on MSU Orion if ( ! eval module help > /dev/null 2>&1 ) ; then diff --git a/sorc/regrid_nemsio.fd/Makefile b/sorc/regrid_nemsio.fd/Makefile index c5bfb0ed1c..4a089699b4 100644 --- a/sorc/regrid_nemsio.fd/Makefile +++ b/sorc/regrid_nemsio.fd/Makefile @@ -73,7 +73,7 @@ install: mkdir -p $(INSTALL_DIR) ;\ fi cp $(EXE_FILE) $(INSTALL_DIR) - @cd $(INSTALL_DIR) ; ls -l `pwd`/$(EXE_FILE) + @cd $(INSTALL_DIR) ; ls -l $(pwd)/$(EXE_FILE) #----------- # Make clean diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index ee48286a92..3736f87e7a 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -115,7 +115,7 @@ EOF $NLN $file $DATA/INPUT/$file2 done - hour_rst=`$NHOUR $CDATE_RST $CDATE` + hour_rst=$($NHOUR $CDATE_RST $CDATE) IAU_FHROT=$((IAU_OFFSET+hour_rst)) if [ $DOIAU = "YES" ]; then IAUFHRS=-1 @@ -395,8 +395,8 @@ EOF nst_anl=${nst_anl:-".false."} # blocking factor used for threading and general physics performance - #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` - #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` + #nyblocks=$(expr \( $npy - 1 \) \/ $layout_y ) + #nxblocks=$(expr \( $npx - 1 \) \/ $layout_x \/ 32) #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi blocksize=${blocksize:-32} @@ -642,16 +642,16 @@ WW3_postdet() { #Link mod_def files for wave grids array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD) echo "Wave Grids: $WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavesbsGRD $wavepostGRD $waveinterpGRD" - grdALL=`printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' '` + grdALL=$(printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' ') for wavGRD in ${grdALL}; do $NCP $ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/rundata/${COMPONENTwave}.mod_def.$wavGRD $DATA/mod_def.$wavGRD done export WAVHCYC=${WAVHCYC:-6} - export WRDATE=`$NDATE -${WAVHCYC} $CDATE` - export WRPDY=`echo $WRDATE | cut -c1-8` - export WRcyc=`echo $WRDATE | cut -c9-10` + export WRDATE=$($NDATE -${WAVHCYC} $CDATE) + export WRPDY=$(echo $WRDATE | cut -c1-8) + export WRcyc=$(echo $WRDATE | cut -c9-10) export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/wave/restart export RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart export datwave=$COMOUTwave/rundata @@ -706,7 +706,7 @@ WW3_postdet() { # Loop for gridded output (uses FHINC) fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` + YMDH=$($NDATE $fhr $CDATE) YMD=$(echo $YMDH | cut -c1-8) HMS="$(echo $YMDH | cut -c9-10)0000" for wavGRD in ${waveGRD} ; do @@ -722,7 +722,7 @@ WW3_postdet() { # Loop for point output (uses DTPNT) fhr=$FHMIN_WAV while [ $fhr -le $FHMAX_WAV ]; do - YMDH=`$NDATE $fhr $CDATE` + YMDH=$($NDATE $fhr $CDATE) YMD=$(echo $YMDH | cut -c1-8) HMS="$(echo $YMDH | cut -c9-10)0000" eval $NLN $datwave/${wavprfx}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS} $DATA/${YMD}.${HMS}.out_pnt.${waveuoutpGRD} diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index f65d2a61ee..786b759d4b 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -52,7 +52,7 @@ FV3_GFS_predet(){ if [ $FHMAX_HF -gt 0 -a $FHOUT_HF -gt 0 ]; then FDIAG=$FHOUT_HF; fi WRITE_DOPOST=${WRITE_DOPOST:-".false."} restart_interval=${restart_interval:-0} - rst_invt1=`echo $restart_interval |cut -d " " -f 1` + rst_invt1=$(echo $restart_interval |cut -d " " -f 1) # Convert output settings into an explicit list OUTPUT_FH="" @@ -208,8 +208,8 @@ FV3_GFS_predet(){ # blocking factor used for threading and general physics performance - #nyblocks=`expr \( $npy - 1 \) \/ $layout_y ` - #nxblocks=`expr \( $npx - 1 \) \/ $layout_x \/ 32` + #nyblocks=$(expr \( $npy - 1 \) \/ $layout_y ) + #nxblocks=$(expr \( $npx - 1 \) \/ $layout_x \/ 32) #if [ $nxblocks -le 0 ]; then nxblocks=1 ; fi blocksize=${blocksize:-32} diff --git a/ush/fv3gfs_downstream_nems_cpl.sh b/ush/fv3gfs_downstream_nems_cpl.sh index 9bb6aae779..602ea31208 100755 --- a/ush/fv3gfs_downstream_nems_cpl.sh +++ b/ush/fv3gfs_downstream_nems_cpl.sh @@ -36,7 +36,7 @@ export CNVGRIB=${CNVGRIB:-${NWPROD:-/nwprod}/util/exec/cnvgrib21} export COPYGB2=${COPYGB2:-${NWPROD:-/nwprod}/util/exec/copygb2} export WGRIB2=${WGRIB2:-${NWPROD:-/nwprod}/util/exec/wgrib2} export RUN=${RUN:-"gfs"} -export cycn=`echo $CDATE |cut -c 9-10` +export cycn=$(echo $CDATE |cut -c 9-10) export TCYC=${TCYC:-".t${cycn}z."} export PREFIX=${PREFIX:-${RUN}${TCYC}} export PGB1F=${PGB1F:-"NO"} @@ -74,7 +74,7 @@ elif [ $FH -eq 0 ] ; then else export paramlist=${paramlist:-$PARMpost/global_1x1_paramlist_g2} export paramlistb=${paramlistb:-$PARMpost/global_master-catchup_parmlist_g2} - export fhr3=`expr $FH + 0 ` + export fhr3=$(expr $FH + 0 ) if [ $fhr3 -lt 100 ]; then export fhr3="0$fhr3"; fi if [ $fhr3 -lt 10 ]; then export fhr3="0$fhr3"; fi if [ $fhr3%${FHOUT_PGB} -eq 0 ]; then @@ -107,7 +107,7 @@ while [ $nset -le $totalset ]; do export tmpfile=$(eval echo tmpfile${nset}_${fhr3}) # split of Grib files to run downstream jobs using MPMD - export ncount=`$WGRIB2 $tmpfile |wc -l` + export ncount=$($WGRIB2 $tmpfile |wc -l) # export tasks_post=$(eval echo \$tasksp_$nknd) export nproc=${nproc:-${npe_dwn:-24}} if [ $nproc -gt $ncount ]; then @@ -115,14 +115,14 @@ while [ $nset -le $totalset ]; do export err=8 err_chk fi - export inv=`expr $ncount / $nproc` + export inv=$(expr $ncount / $nproc) rm -f $DATA/poescript export iproc=1 export end=0 while [ $iproc -le $nproc ] ; do - export start=`expr ${end} + 1` - export end=`expr ${start} + ${inv} - 1` + export start=$(expr ${end} + 1) + export end=$(expr ${start} + ${inv} - 1) if [[ $end -ge $ncount ]] ;then export end=$ncount fi @@ -133,7 +133,7 @@ while [ $nset -le $totalset ]; do $WGRIB2 -d $end $tmpfile |egrep -i "ugrd|ustm|uflx" export rc=$? if [[ $rc -eq 0 ]] ; then - export end=`expr ${end} + 1` + export end=$(expr ${end} + 1) fi if [ $iproc -eq $nproc ]; then export end=$ncount @@ -147,12 +147,12 @@ while [ $nset -le $totalset ]; do # poescript for remaining processors if [[ $end -eq $ncount ]] ;then while [[ $iproc -lt $nproc ]];do - export iproc=`expr $iproc + 1` + export iproc=$(expr $iproc + 1) echo "/bin/echo $iproc" >> $DATA/poescript done break fi - export iproc=`expr $iproc + 1` + export iproc=$(expr $iproc + 1) done date @@ -192,7 +192,7 @@ date cat pgb2bfile_${fhr3}_${iproc}_1p0 >> pgb2bfile_${fhr3}_1p0 fi fi - export iproc=`expr $iproc + 1` + export iproc=$(expr $iproc + 1) done date @@ -285,7 +285,7 @@ date fi #.............................................. - export nset=`expr $nset + 1 ` + export nset=$(expr $nset + 1 ) done #.............................................. diff --git a/ush/fv3gfs_nc2nemsio.sh b/ush/fv3gfs_nc2nemsio.sh index cdecf56b8c..4b239e18a3 100755 --- a/ush/fv3gfs_nc2nemsio.sh +++ b/ush/fv3gfs_nc2nemsio.sh @@ -19,7 +19,7 @@ export NWPROD=${NWPROD:-$pwd} export HOMEgfs=${HOMEgfs:-$NWPROD} export NC2NEMSIOEXE=${NC2NEMSIOEXE:-$HOMEgfs/exec/fv3nc2nemsio.x} -cycn=`echo $CDATE | cut -c 9-10` +cycn=$(echo $CDATE | cut -c 9-10) export TCYC=${TCYC:-".t${cycn}z."} export CDUMP=${CDUMP:-gfs} diff --git a/ush/fv3gfs_regrid_nemsio.sh b/ush/fv3gfs_regrid_nemsio.sh index d4c38ccc95..d43f5a5503 100755 --- a/ush/fv3gfs_regrid_nemsio.sh +++ b/ush/fv3gfs_regrid_nemsio.sh @@ -109,13 +109,13 @@ $ERRSCRIPT || exit $err rm -f regrid-nemsio.input #------------------------------------------------------------------ -PDY=`echo $CDATE | cut -c1-8` -cyc=`echo $CDATE | cut -c9-10` +PDY=$(echo $CDATE | cut -c1-8) +cyc=$(echo $CDATE | cut -c9-10) PREFIX=${PREFIX:-"${CDUMP}.t${cyc}z."} SUFFIX=${SUFFIX:-".nemsio"} for ftype in atm sfc; do - for file in `ls -1 ${ftype}.${CDATE}.fhr*`; do - fhrchar=`echo $file | cut -d. -f3 | cut -c4-` + for file in $(ls -1 ${ftype}.${CDATE}.fhr*); do + fhrchar=$(echo $file | cut -d. -f3 | cut -c4-) $NMV $file ${PREFIX}${ftype}f${fhrchar}${SUFFIX} done done diff --git a/ush/fv3gfs_remap.sh b/ush/fv3gfs_remap.sh index b2335401ca..d5258e0975 100755 --- a/ush/fv3gfs_remap.sh +++ b/ush/fv3gfs_remap.sh @@ -19,7 +19,7 @@ export FIXfv3=${FIXfv3:-$FIX_DIR/fix_fv3_gmted2010} export REMAPEXE=${REMAPEXE:-$HOMEgfs/exec/fregrid_parallel} export IPD4=${IPD4:-"YES"} -cycn=`echo $CDATE | cut -c 9-10` +cycn=$(echo $CDATE | cut -c 9-10) export TCYC=${TCYC:-".t${cycn}z."} export CDUMP=${CDUMP:-gfs} export PREFIX=${PREFIX:-${CDUMP}${TCYC}} diff --git a/ush/getdump.sh b/ush/getdump.sh index 3766914f14..a9142f1a51 100755 --- a/ush/getdump.sh +++ b/ush/getdump.sh @@ -22,14 +22,14 @@ if [ ! -s $TARGET_DIR ]; then mkdir -p $TARGET_DIR ;fi # Set file prefix -cyc=`echo $CDATE |cut -c 9-10` +cyc=$(echo $CDATE |cut -c 9-10) prefix="$CDUMP.t${cyc}z." # Link dump files from SOURCE_DIR to TARGET_DIR cd $SOURCE_DIR if [ -s ${prefix}updated.status.tm00.bufr_d ]; then - for file in `ls ${prefix}*`; do + for file in $(ls ${prefix}*); do ln -fs $SOURCE_DIR/$file $TARGET_DIR/$file done else diff --git a/ush/gfs_bfr2gpk.sh b/ush/gfs_bfr2gpk.sh index 1b77237cf6..5971817f00 100755 --- a/ush/gfs_bfr2gpk.sh +++ b/ush/gfs_bfr2gpk.sh @@ -36,7 +36,7 @@ outfilbase=gfs_${PDY}${cyc} # Get the list of individual station files. date -##filelist=`/bin/ls -1 $BPATH | grep bufr` +##filelist=$(/bin/ls -1 $BPATH | grep bufr) ##rm -f bufr.combined ##for file in $filelist; do ## cat $BPATH/$file >> bufr.combined diff --git a/ush/gfs_bufr.sh b/ush/gfs_bufr.sh index 9ec4d53243..5788bbcc43 100755 --- a/ush/gfs_bufr.sh +++ b/ush/gfs_bufr.sh @@ -31,7 +31,7 @@ fi hh=$FSTART while test $hh -le $FEND do - hh=` expr $hh + $FINT ` + hh=$( expr $hh + $FINT ) if test $hh -lt 10 then hh=0$hh @@ -65,7 +65,7 @@ EOF hh=$FSTART if test $hh -lt 100 then - hh1=`echo "${hh#"${hh%??}"}"` + hh1=$(echo "${hh#"${hh%??}"}") hh=$hh1 fi while test $hh -le $FEND @@ -85,7 +85,7 @@ do if [ ! -f $COMIN/${RUN}.${cycle}.logf${hh2}.${logfm} ] then sleep 10 - ic=`expr $ic + 1` + ic=$(expr $ic + 1) else break fi @@ -99,7 +99,7 @@ do ln -sf $COMIN/${RUN}.${cycle}.atmf${hh2}.${atmfm} sigf${hh} ln -sf $COMIN/${RUN}.${cycle}.sfcf${hh2}.${atmfm} flxf${hh} - hh=` expr $hh + $FINT ` + hh=$( expr $hh + $FINT ) if test $hh -lt 10 then hh=0$hh diff --git a/ush/gfs_bufr_netcdf.sh b/ush/gfs_bufr_netcdf.sh index 2237ce7793..9733e02c3d 100755 --- a/ush/gfs_bufr_netcdf.sh +++ b/ush/gfs_bufr_netcdf.sh @@ -31,7 +31,7 @@ fi hh=$FSTART while test $hh -le $FEND do - hh=` expr $hh + $FINT ` + hh=$( expr $hh + $FINT ) if test $hh -lt 10 then hh=0$hh @@ -65,7 +65,7 @@ EOF hh=$FSTART if test $hh -lt 100 then - hh1=`echo "${hh#"${hh%??}"}"` + hh1=$(echo "${hh#"${hh%??}"}") hh=$hh1 fi while test $hh -le $FEND @@ -85,7 +85,7 @@ do if [ ! -f $COMIN/${RUN}.${cycle}.logf${hh2}.${fformat} ] then sleep 10 - ic=`expr $ic + 1` + ic=$(expr $ic + 1) else break fi @@ -99,7 +99,7 @@ do ln -sf $COMIN/${RUN}.${cycle}.atmf${hh2}.${fformat} sigf${hh} ln -sf $COMIN/${RUN}.${cycle}.${SFCF}f${hh2}.${fformat} flxf${hh} - hh=` expr $hh + $FINT ` + hh=$( expr $hh + $FINT ) if test $hh -lt 10 then hh=0$hh diff --git a/ush/gfs_sndp.sh b/ush/gfs_sndp.sh index 74c7884dde..53bc6fd9d6 100755 --- a/ush/gfs_sndp.sh +++ b/ush/gfs_sndp.sh @@ -30,7 +30,7 @@ set +x WMOHEAD=JUSX4$m fi - for stn in `cat $file_list` + for stn in $(cat $file_list) do cp ${COMOUT}/bufr.${cycle}/bufr.$stn.$PDY$cyc $DATA/${m}/bufrin export pgm=tocsbufr diff --git a/ush/global_extrkr.sh b/ush/global_extrkr.sh index 12bb61af80..67624a9898 100755 --- a/ush/global_extrkr.sh +++ b/ush/global_extrkr.sh @@ -106,8 +106,8 @@ qid=$$ # Get input date information # #----------------------------------------------# -#export PDY=` echo $ymdh | cut -c1-8` -#export CYL=` echo $ymdh | cut -c9-10` +#export PDY=$( echo $ymdh | cut -c1-8) +#export CYL=$( echo $ymdh | cut -c9-10) # ---------------------------------------------------------------------- # Allow overriding of later decisions on track input times based on @@ -269,13 +269,13 @@ else set -x fi -scc=`echo ${PDY} | cut -c1-2` -syy=`echo ${PDY} | cut -c3-4` -smm=`echo ${PDY} | cut -c5-6` -sdd=`echo ${PDY} | cut -c7-8` +scc=$(echo ${PDY} | cut -c1-2) +syy=$(echo ${PDY} | cut -c3-4) +smm=$(echo ${PDY} | cut -c5-6) +sdd=$(echo ${PDY} | cut -c7-8) shh=${CYL} -symd=`echo ${PDY} | cut -c3-8` -syyyy=`echo ${PDY} | cut -c1-4` +symd=$(echo ${PDY} | cut -c3-8) +syyyy=$(echo ${PDY} | cut -c1-4) symdh=${PDY}${CYL} export gfsvitdir=${gfsvitdir:-${COMDIR}${COMROOThps}/gfs/prod/gfs.$PDY} @@ -290,9 +290,9 @@ export ushtrkdir=${ushtrkdir:-${homesyndir}/ush} export archsyndir=${archsyndir:-${COMINsyn:-$(compath.py gfs/prod/syndat)}} ##cp /com/date/t${CYL}z ncepdate -##export CENT=` cut -c7-8 ncepdate ` +##export CENT=$( cut -c7-8 ncepdate ) -export CENT=`echo ${PDY} | cut -c1-2` +export CENT=$(echo ${PDY} | cut -c1-2) export maxtime=65 # Max number of forecast time levels @@ -314,7 +314,7 @@ export maxtime=65 # Max number of forecast time levels # #----------------------------------------------------------------# -cmodel=`echo ${cmodel} | tr "[A-Z]" "[a-z]"` +cmodel=$(echo ${cmodel} | tr "[A-Z]" "[a-z]") set -x # "gribver" is an environmental variable that should be defined @@ -510,13 +510,13 @@ fi # deal; this script will exit just a little further down once it # realizes there are not any storms to process. -old_ymdh=` ${NDATE:?} -${vit_incr} ${PDY}${CYL}` +old_ymdh=$( ${NDATE:?} -${vit_incr} ${PDY}${CYL}) old_4ymd=${old_ymdh:0:8} old_ymd=${old_ymdh:2:6} old_hh=${old_ymdh:8:2} old_str="${old_ymd} ${old_hh}00" -future_ymdh=` ${NDATE:?} ${vit_incr} ${PDY}${CYL}` +future_ymdh=$( ${NDATE:?} ${vit_incr} ${PDY}${CYL}) future_4ymd=${future_ymdh:0:8} future_ymd=${future_ymdh:2:6} future_hh=${future_ymdh:8:2} @@ -611,14 +611,14 @@ cat ${DATA}/tmprawvit.${atcfout}.${PDY}${CYL} ${DATA}/tmpsynvit.${atcfout}.${PDY # tracking program. #--------------------------------------------------------------# -oldymdh=` ${NDATE:?} -${vit_incr} ${PDY}${CYL}` +oldymdh=$( ${NDATE:?} -${vit_incr} ${PDY}${CYL}) oldyy=${oldymdh:2:2} oldmm=${oldymdh:4:2} olddd=${oldymdh:6:2} oldhh=${oldymdh:8:2} oldymd=${oldyy}${oldmm}${olddd} -futureymdh=` ${NDATE:?} 6 ${PDY}${CYL}` +futureymdh=$( ${NDATE:?} 6 ${PDY}${CYL}) futureyy=${futureymdh:2:2} futuremm=${futureymdh:4:2} futuredd=${futureymdh:6:2} @@ -636,7 +636,7 @@ cat<${DATA}/suv_input.${atcfout}.${PDY}${CYL} EOF -numvitrecs=`cat ${DATA}/vitals.${atcfout}.${PDY}${CYL} | wc -l` +numvitrecs=$(cat ${DATA}/vitals.${atcfout}.${PDY}${CYL} | wc -l) if [ ${numvitrecs} -eq 0 ] then @@ -666,7 +666,7 @@ if [ ${trkrtype} = 'tcgen' ] fullvitfile=${DATA}/vitals.${atcfout}.${PDY}${CYL} cp $fullvitfile ${DATA}/vitals.all_basins.${atcfout}.${PDY}${CYL} - basin=` echo $regtype | cut -c1-2` + basin=$( echo $regtype | cut -c1-2) if [ ${basin} = 'al' ]; then cat $fullvitfile | awk '{if (substr($0,8,1) == "L") print $0}' \ @@ -781,7 +781,7 @@ fi # then exit. #------------------------------------------------------------------# -numvitrecs=`cat ${DATA}/vitals.upd.${atcfout}.${PDY}${CYL} | wc -l` +numvitrecs=$(cat ${DATA}/vitals.upd.${atcfout}.${PDY}${CYL} | wc -l) if [ ${numvitrecs} -eq 0 ] then if [ ${trkrtype} = 'tracker' ] @@ -814,7 +814,7 @@ do done dtg_current="${symd} ${CYL}00" -stormmax=` grep "${dtg_current}" ${DATA}/vitals.upd.${atcfout}.${PDY}${CYL} | wc -l` +stormmax=$( grep "${dtg_current}" ${DATA}/vitals.upd.${atcfout}.${PDY}${CYL} | wc -l) if [ ${stormmax} -gt 15 ] then @@ -869,27 +869,27 @@ done # On the Fly (FOF)", we simply put those three # "FOF" characters in there. -d6ago_ymdh=` ${NDATE:?} -6 ${PDY}${CYL}` -d6ago_4ymd=` echo ${d6ago_ymdh} | cut -c1-8` -d6ago_ymd=` echo ${d6ago_ymdh} | cut -c3-8` -d6ago_hh=` echo ${d6ago_ymdh} | cut -c9-10` +d6ago_ymdh=$( ${NDATE:?} -6 ${PDY}${CYL}) +d6ago_4ymd=$( echo ${d6ago_ymdh} | cut -c1-8) +d6ago_ymd=$( echo ${d6ago_ymdh} | cut -c3-8) +d6ago_hh=$( echo ${d6ago_ymdh} | cut -c9-10) d6ago_str="${d6ago_ymd} ${d6ago_hh}00" -d6ahead_ymdh=` ${NDATE:?} 6 ${PDY}${CYL}` -d6ahead_4ymd=` echo ${d6ahead_ymdh} | cut -c1-8` -d6ahead_ymd=` echo ${d6ahead_ymdh} | cut -c3-8` -d6ahead_hh=` echo ${d6ahead_ymdh} | cut -c9-10` +d6ahead_ymdh=$( ${NDATE:?} 6 ${PDY}${CYL}) +d6ahead_4ymd=$( echo ${d6ahead_ymdh} | cut -c1-8) +d6ahead_ymd=$( echo ${d6ahead_ymdh} | cut -c3-8) +d6ahead_hh=$( echo ${d6ahead_ymdh} | cut -c9-10) d6ahead_str="${d6ahead_ymd} ${d6ahead_hh}00" -syyyym6=` echo ${d6ago_ymdh} | cut -c1-4` -smmm6=` echo ${d6ago_ymdh} | cut -c5-6` -sddm6=` echo ${d6ago_ymdh} | cut -c7-8` -shhm6=` echo ${d6ago_ymdh} | cut -c9-10` +syyyym6=$( echo ${d6ago_ymdh} | cut -c1-4) +smmm6=$( echo ${d6ago_ymdh} | cut -c5-6) +sddm6=$( echo ${d6ago_ymdh} | cut -c7-8) +shhm6=$( echo ${d6ago_ymdh} | cut -c9-10) -syyyyp6=` echo ${d6ahead_ymdh} | cut -c1-4` -smmp6=` echo ${d6ahead_ymdh} | cut -c5-6` -sddp6=` echo ${d6ahead_ymdh} | cut -c7-8` -shhp6=` echo ${d6ahead_ymdh} | cut -c9-10` +syyyyp6=$( echo ${d6ahead_ymdh} | cut -c1-4) +smmp6=$( echo ${d6ahead_ymdh} | cut -c5-6) +sddp6=$( echo ${d6ahead_ymdh} | cut -c7-8) +shhp6=$( echo ${d6ahead_ymdh} | cut -c9-10) set +x echo " " @@ -930,7 +930,7 @@ set -x #cgb=$NWPROD/util/exec/copygb #cgb2=$NWPROD/util/exec/copygb2 -regflag=`grep NHC ${DATA}/vitals.upd.${atcfout}.${PDY}${CYL} | wc -l` +regflag=$(grep NHC ${DATA}/vitals.upd.${atcfout}.${PDY}${CYL} | wc -l) # ---------------------------------------------------------------------- find_gfile() { @@ -1031,7 +1031,7 @@ if [[ ${model} -eq 1 || $model == 8 ]] ; then set +x echo " " - echo "Time before gfs wgrib loop is `date`" + echo "Time before gfs wgrib loop is $(date)" echo " " set -x @@ -1151,7 +1151,7 @@ if [[ ${model} -eq 1 || $model == 8 ]] ; then set +x echo " " - echo "Date in interpolation for model= $cmodel and fhour= $fhour000 before = `date`" + echo "Date in interpolation for model= $cmodel and fhour= $fhour000 before = $(date)" echo " " set -x @@ -1234,7 +1234,7 @@ if [[ ${model} -eq 1 || $model == 8 ]] ; then set +x echo " " - echo "Date in interpolation for cmodel= $cmodel and fhour= $fhour000 after = `date`" + echo "Date in interpolation for cmodel= $cmodel and fhour= $fhour000 after = $(date)" echo " " set -x @@ -1278,10 +1278,10 @@ do done namelist=${DATA}/input.${atcfout}.${PDY}${CYL} -ATCFNAME=` echo "${atcfname}" | tr '[a-z]' '[A-Z]'` +ATCFNAME=$( echo "${atcfname}" | tr '[a-z]' '[A-Z]') if [ ${cmodel} = 'sref' ]; then - export atcfymdh=` ${NDATE:?} -3 ${scc}${syy}${smm}${sdd}${shh}` + export atcfymdh=$( ${NDATE:?} -3 ${scc}${syy}${smm}${sdd}${shh}) else export atcfymdh=${scc}${syy}${smm}${sdd}${shh} fi @@ -1444,12 +1444,12 @@ msg="$pgm start for $atcfout at ${CYL}z" $postmsg "$jlogfile" "$msg" set +x -echo "+++ TIMING: BEFORE gettrk ---> `date`" +echo "+++ TIMING: BEFORE gettrk ---> $(date)" set -x set +x echo " " -echo "TIMING: Before call to gettrk at `date`" +echo "TIMING: Before call to gettrk at $(date)" echo " " set -x @@ -1460,12 +1460,12 @@ gettrk_rcc=$? set +x echo " " -echo "TIMING: After call to gettrk at `date`" +echo "TIMING: After call to gettrk at $(date)" echo " " set -x set +x -echo "+++ TIMING: AFTER gettrk ---> `date`" +echo "+++ TIMING: AFTER gettrk ---> $(date)" set -x #--------------------------------------------------------------# @@ -1629,7 +1629,7 @@ if [ ${gettrk_rcc} -eq 0 ]; then ict=0 while read unixrec do - storm_string=` echo "${unixrec}" | cut -c1-6` + storm_string=$( echo "${unixrec}" | cut -c1-6) if [ "${storm_string}" = "${old_string}" ] then echo "${unixrec}" >>atcfunix_file.${ict} @@ -1646,8 +1646,8 @@ if [ ${gettrk_rcc} -eq 0 ]; then while [ $mct -lt $ict ] do let mct=mct+1 - at=` head -1 atcfunix_file.$mct | cut -c1-2 | tr '[A-Z]' '[a-z]'` - NO=` head -1 atcfunix_file.$mct | cut -c5-6` + at=$( head -1 atcfunix_file.$mct | cut -c1-2 | tr '[A-Z]' '[a-z]') + NO=$( head -1 atcfunix_file.$mct | cut -c5-6) if [ ! -d ${ATCFdir}/${at}${NO}${syyyy} ] then mkdir -p ${ATCFdir}/${at}${NO}${syyyy} diff --git a/ush/hpssarch_gen.sh b/ush/hpssarch_gen.sh index 66147ba11b..5b26d7f102 100755 --- a/ush/hpssarch_gen.sh +++ b/ush/hpssarch_gen.sh @@ -404,7 +404,7 @@ if [ $type = "enkfgdas" -o $type = "enkfgfs" ]; then IAUFHRS_ENKF=${IAUFHRS_ENKF:-6} lobsdiag_forenkf=${lobsdiag_forenkf:-".false."} - nfhrs=`echo $IAUFHRS_ENKF | sed 's/,/ /g'` + nfhrs=$(echo $IAUFHRS_ENKF | sed 's/,/ /g') NMEM_ENKF=${NMEM_ENKF:-80} NMEM_EARCGRP=${NMEM_EARCGRP:-10} ##number of ens memebers included in each tarball NTARS=$((NMEM_ENKF/NMEM_EARCGRP)) diff --git a/ush/inter_flux.sh b/ush/inter_flux.sh index 3fc1e5be94..98a9248caf 100755 --- a/ush/inter_flux.sh +++ b/ush/inter_flux.sh @@ -15,7 +15,7 @@ export COPYGB2=${COPYGB2:-${NWPROD:-/nwprod}/util/exec/copygb2} export WGRIB2=${WGRIB2:-${NWPROD:-/nwprod}/util/exec/wgrib2} export GRBINDEX=${GRBINDEX:-${NWPROD:-nwprod}/util/exec/grbindex} export RUN=${RUN:-"gfs"} -export cycn=`echo $CDATE |cut -c 9-10` +export cycn=$(echo $CDATE |cut -c 9-10) export TCYC=${TCYC:-".t${cycn}z."} export PREFIX=${PREFIX:-${RUN}${TCYC}} export PGB1F=${PGB1F:-"NO"} @@ -39,7 +39,7 @@ export grid2p5="latlon 0:144:2.5 90:73:-2.5" if [ $FH -eq 0 ] ; then export fhr3=000 else - export fhr3=`expr $FH + 0 ` + export fhr3=$(expr $FH + 0 ) if [ $fhr3 -lt 100 ]; then export fhr3="0$fhr3"; fi if [ $fhr3 -lt 10 ]; then export fhr3="0$fhr3"; fi fi diff --git a/ush/syndat_getjtbul.sh b/ush/syndat_getjtbul.sh index 278f967a7d..dc3c0f6482 100755 --- a/ush/syndat_getjtbul.sh +++ b/ush/syndat_getjtbul.sh @@ -54,14 +54,14 @@ fi CDATE10=$1 -ymd=`echo $CDATE10 | cut -c3-8` -pdy=`echo $CDATE10 | cut -c1-8` -hour=`echo $CDATE10 | cut -c9-10` +ymd=$(echo $CDATE10 | cut -c3-8) +pdy=$(echo $CDATE10 | cut -c1-8) +hour=$(echo $CDATE10 | cut -c9-10) echo $PDYm1 pdym1=$PDYm1 -#pdym1=`sh $utilscript/finddate.sh $pdy d-1` +#pdym1=$(sh $utilscript/finddate.sh $pdy d-1) echo " " >> $pgmout echo "Entering sub-shell syndat_getjtbul.sh to recover JTWC Bulletins" \ @@ -135,7 +135,7 @@ fi [ -s jtwcbul ] && echo "Processing JTWC bulletin halfs into tcvitals records" >> $pgmout -pgm=`basename $EXECSYND/syndat_getjtbul` +pgm=$(basename $EXECSYND/syndat_getjtbul) export pgm if [ -s prep_step ]; then set +u @@ -143,7 +143,7 @@ if [ -s prep_step ]; then set -u else [ -f errfile ] && rm errfile - unset FORT00 `env | grep "^FORT[0-9]\{1,\}=" | awk -F= '{print $1}'` + unset FORT00 $(env | grep "^FORT[0-9]\{1,\}=" | awk -F= '{print $1}') fi rm -f fnoc @@ -166,7 +166,7 @@ if [ "$errget" -gt '0' ];then available for qctropcy for $CDATE10" if [ "$RUN" = 'gfs' ]; then if [ "$SENDSDM" = 'YES' ]; then - export ecf_family=`echo $ECF_NAME |awk 'BEGIN {FS="/j"} {print $1}'` + export ecf_family=$(echo $ECF_NAME |awk 'BEGIN {FS="/j"} {print $1}') echo $msg > $COMOUT/${NET}_${RUN}.t${cyc}z.emailbody echo "export subject='No JTWC bulletins available for $CDATE10 $RUN run'" >$COMOUT/${NET}_${RUN}.t${cyc}z.emailvar # JY echo "export maillist='sdm@noaa.gov'" >> $COMOUT/${NET}_${RUN}.t${cyc}z.emailvar diff --git a/ush/syndat_qctropcy.sh b/ush/syndat_qctropcy.sh index d72e52f9cc..1f1f64b548 100755 --- a/ush/syndat_qctropcy.sh +++ b/ush/syndat_qctropcy.sh @@ -149,7 +149,7 @@ echo "Run date is $CDATE10" echo set -x -year=`echo $CDATE10 | cut -c1-4` +year=$(echo $CDATE10 | cut -c1-4) # Copy the seasonal statistics from archive directory to local @@ -162,7 +162,7 @@ cp $ARCHSYND/syndat_sthisto sthisto cp $ARCHSYND/syndat_sthista sthista touch dateck -dateck_size=`ls -l dateck | awk '{ print $5 }'` +dateck_size=$(ls -l dateck | awk '{ print $5 }') if [ $dateck_size -lt 10 ]; then msg="***WARNING: Archive run date check file not available or shorter than expected.\ Using dummy date 1900010100 to allow code to continue" @@ -192,7 +192,7 @@ elif [ "$RUN" = 'gdas' ]; then files=T, fi if [ -n "$files_override" ]; then # for testing, typically want FILES=F - files_override=`echo "$files_override" | tr [a-z] [A-Z] | tr -d [.] | cut -c 1` + files_override=$(echo "$files_override" | tr [a-z] [A-Z] | tr -d [.] | cut -c 1) if [ "$files_override" = 'T' -o "$files_override" = 'F' ]; then msg="***WARNING: Variable files setting will be overriden from $files to $files_override. Override expected if testing." files=$files_override @@ -266,7 +266,7 @@ cp $slmask slmask.126 # Execute program syndat_qctropcy -pgm=`basename $EXECSYND/syndat_qctropcy` +pgm=$(basename $EXECSYND/syndat_qctropcy) export pgm if [ -s prep_step ]; then set +u @@ -274,7 +274,7 @@ if [ -s prep_step ]; then set -u else [ -f errfile ] && rm errfile - unset FORT00 `env | grep "^FORT[0-9]\{1,\}=" | awk -F= '{print $1}'` + unset FORT00 $(env | grep "^FORT[0-9]\{1,\}=" | awk -F= '{print $1}') fi echo "$CDATE10" > cdate10.dat diff --git a/ush/tropcy_relocate.sh b/ush/tropcy_relocate.sh index 63c471d4f4..44205b1846 100755 --- a/ush/tropcy_relocate.sh +++ b/ush/tropcy_relocate.sh @@ -79,7 +79,7 @@ # to this script by the parent script -- # # MACHINE String indicating machine on which this job is running -# Default is "`hostname -s | cut -c 1-3`" +# Default is "$(hostname -s | cut -c 1-3)" # envir String indicating environment under which job runs ('prod' # or 'test') # Default is "prod" @@ -212,7 +212,7 @@ set -aux -MACHINE=${MACHINE:-`hostname -s | cut -c 1-3`} +MACHINE=${MACHINE:-$(hostname -s | cut -c 1-3)} SENDCOM=${SENDCOM:-YES} export NWROOT=${NWROOT:-/nwprod2} @@ -233,7 +233,7 @@ if [ $# -ne 1 ] ; then # cp ${COMROOT}/date/$cycle ncepdate # err0=$? ncepdate=${PDY}${cyc} - CDATE10=`cut -c7-16 ncepdate` + CDATE10=$(cut -c7-16 ncepdate) else err0=1 fi @@ -242,7 +242,7 @@ else if [ "${#CDATE10}" -ne '10' ]; then err0=1 else - cycle=t`echo $CDATE10|cut -c9-10`z + cycle=t$(echo $CDATE10|cut -c9-10)z err0=0 fi fi @@ -265,9 +265,9 @@ then exit 9 fi -pdy=`echo $CDATE10|cut -c1-8` -cyc=`echo $CDATE10|cut -c9-10` -modhr=`expr $cyc % 3` +pdy=$(echo $CDATE10|cut -c1-8) +cyc=$(echo $CDATE10|cut -c9-10) +modhr=$(expr $cyc % 3) set +x echo @@ -392,7 +392,7 @@ fi for fhr in $( seq -6 $BKGFREQ 3 ) ; do if [ $fhr -lt 0 ]; then - tpref=m`expr $fhr \* -1` + tpref=m$(expr $fhr \* -1) elif [ $fhr -eq 0 ]; then tpref=es elif [ $fhr -gt 0 ]; then @@ -512,7 +512,7 @@ fi MP_PULSE=0 MP_TIMEOUT=600 -GDATE10=` ${NDATE:?} -06 ${CDATE10}` +GDATE10=$( ${NDATE:?} -06 ${CDATE10}) # make unique combined tcvitals file for t-12, t-6 and t+0 -- # if tcvitals does not contains record from current time, skip relocation @@ -593,7 +593,7 @@ else for fhr in $( seq -3 $BKGFREQ 3 ) ; do if [ $fhr -lt 0 ]; then - tpref=m`expr $fhr \* -1` + tpref=m$(expr $fhr \* -1) elif [ $fhr -eq 0 ]; then tpref=es elif [ $fhr -gt 0 ]; then @@ -666,7 +666,7 @@ else for fhr in $( seq -3 $BKGFREQ 3 ) ; do if [ $fhr -lt 0 ]; then - tpref=m`expr $fhr \* -1` + tpref=m$(expr $fhr \* -1) elif [ $fhr -eq 0 ]; then tpref=es elif [ $fhr -gt 0 ]; then diff --git a/ush/tropcy_relocate_extrkr.sh b/ush/tropcy_relocate_extrkr.sh index 855fe472e4..a245dca98e 100755 --- a/ush/tropcy_relocate_extrkr.sh +++ b/ush/tropcy_relocate_extrkr.sh @@ -210,12 +210,12 @@ export maxtime=22 # Max number of forecast time levels if [ ! -d ${vdir} ]; then mkdir -p ${vdir}; fi if [ ! -d ${TMPDIR} ]; then mkdir -p ${TMPDIR}; fi -CENT=`echo ${symdh} | cut -c1-2` -scc=`echo ${symdh} | cut -c1-2` -syy=`echo ${symdh} | cut -c3-4` -smm=`echo ${symdh} | cut -c5-6` -sdd=`echo ${symdh} | cut -c7-8` -shh=`echo ${symdh} | cut -c9-10` +CENT=$(echo ${symdh} | cut -c1-2) +scc=$(echo ${symdh} | cut -c1-2) +syy=$(echo ${symdh} | cut -c3-4) +smm=$(echo ${symdh} | cut -c5-6) +sdd=$(echo ${symdh} | cut -c7-8) +shh=$(echo ${symdh} | cut -c9-10) dishh=${shh} symd=${syy}${smm}${sdd} @@ -234,7 +234,7 @@ esac # model ID number to it. #---------------------------------------------------# -cmodel=`echo ${cmodel} | tr "[A-Z]" "[a-z]"` +cmodel=$(echo ${cmodel} | tr "[A-Z]" "[a-z]") case ${cmodel} in @@ -242,7 +242,7 @@ case ${cmodel} in fcstlen=9 ; fcsthrs="" for fhr in $( seq 0 $BKGFREQ 9); do - fhrchar=`printf %02d $fhr` + fhrchar=$(printf %02d $fhr) fcsthrs="$fcsthrs $fhrchar" done atcfnum=72 ; @@ -359,11 +359,11 @@ if [ ${cmodel} = 'other' ]; then # pos3= character position immediately after "00" # pos4= character position of last character in name - otherdir=`dirname ${inpfile}` - fname=`basename ${inpfile}` + otherdir=$(dirname ${inpfile}) + fname=$(basename ${inpfile}) - pos2=`echo ${fname} | awk '{ match($0,/XX/); print RSTART }'` - pos4=`echo ${fname} | awk '{ match($0,/$/); print RSTART }'` + pos2=$(echo ${fname} | awk '{ match($0,/XX/); print RSTART }') + pos4=$(echo ${fname} | awk '{ match($0,/$/); print RSTART }') let pos4=pos4-1 let pos1=pos2-1 let pos3=pos2+2 @@ -380,9 +380,9 @@ if [ ${cmodel} = 'other' ]; then exit 8 fi - fnamebeg=`echo ${fname} | cut -c1-${pos1}` + fnamebeg=$(echo ${fname} | cut -c1-${pos1}) if [ ${pos4} -ge ${pos3} ]; then - fnameend=`echo ${fname} | cut -c${pos3}-${pos4}` + fnameend=$(echo ${fname} | cut -c${pos3}-${pos4}) else fnameend="" fi @@ -427,7 +427,7 @@ if [ ${cmodel} = 'other' ]; then if [ ! -s ${otherdir}/${fnamebeg}00${fnameend} ]; then set +x echo " " - echo " !!! ERROR in `basename $0`" + echo " !!! ERROR in $(basename $0)" echo " !!! Input analysis file cannot be found." echo " !!! The tracker is looking for this file in: " echo " !!! ----> ${otherdir}/${fnamebeg}00${fnameend}" @@ -490,18 +490,18 @@ mv ${vdir}/tempvit.nonameless ${vdir}/vitals.${symd}${dishh} # tracking program. #--------------------------------------------------------------# -ymdh6ago=` ${NDATE:?} -6 ${CENT}${symd}${dishh}` -syy6=`echo ${ymdh6ago} | cut -c3-4` -smm6=`echo ${ymdh6ago} | cut -c5-6` -sdd6=`echo ${ymdh6ago} | cut -c7-8` -shh6=`echo ${ymdh6ago} | cut -c9-10` +ymdh6ago=$( ${NDATE:?} -6 ${CENT}${symd}${dishh}) +syy6=$(echo ${ymdh6ago} | cut -c3-4) +smm6=$(echo ${ymdh6ago} | cut -c5-6) +sdd6=$(echo ${ymdh6ago} | cut -c7-8) +shh6=$(echo ${ymdh6ago} | cut -c9-10) symd6=${syy6}${smm6}${sdd6} -ymdh6ahead=` ${NDATE:?} 6 ${CENT}${symd}${dishh}` -syyp6=`echo ${ymdh6ahead} | cut -c3-4` -smmp6=`echo ${ymdh6ahead} | cut -c5-6` -sddp6=`echo ${ymdh6ahead} | cut -c7-8` -shhp6=`echo ${ymdh6ahead} | cut -c9-10` +ymdh6ahead=$( ${NDATE:?} 6 ${CENT}${symd}${dishh}) +syyp6=$(echo ${ymdh6ahead} | cut -c3-4) +smmp6=$(echo ${ymdh6ahead} | cut -c5-6) +sddp6=$(echo ${ymdh6ahead} | cut -c7-8) +shhp6=$(echo ${ymdh6ahead} | cut -c9-10) symdp6=${syyp6}${smmp6}${sddp6} vit_incr=6 @@ -516,7 +516,7 @@ cat<$TMPDIR/suv_input &hourinfo vit_hr_incr=${vit_incr}/ EOF -numvitrecs=`cat ${vdir}/vitals.${symd}${dishh} | wc -l` +numvitrecs=$(cat ${vdir}/vitals.${symd}${dishh} | wc -l) if [ ${numvitrecs} -eq 0 ]; then set +x echo " " @@ -569,7 +569,7 @@ mv ${TMPDIR}/vitals.${symd}${dishh}.y4 ${vdir}/vitals.${symd}${dishh} #cp $auxtcvit ${vdir}/vitals.${symd}${dishh} -pgm=`basename $SUPVX` +pgm=$(basename $SUPVX) if [ -s $DATA/prep_step ]; then set +e . $DATA/prep_step @@ -577,7 +577,7 @@ if [ -s $DATA/prep_step ]; then else [ -f errfile ] && rm errfile export XLFUNITS=0 - unset `env | grep XLFUNIT | awk -F= '{print $1}'` + unset $(env | grep XLFUNIT | awk -F= '{print $1}') set +u if [ -z "$XLFRTEOPTS" ]; then @@ -652,7 +652,7 @@ fi # then exit. #------------------------------------------------------------------# -numvitrecs=`cat ${vdir}/vitals.upd.${cmodel}.${symd}${dishh} | wc -l` +numvitrecs=$(cat ${vdir}/vitals.upd.${cmodel}.${symd}${dishh} | wc -l) if [ ${numvitrecs} -eq 0 ]; then set +x echo " " @@ -693,7 +693,7 @@ do done dtg_current="${symd} ${dishh}00" -smax=` grep "${dtg_current}" ${vdir}/vitals.upd.${cmodel}.${symd}${dishh} | wc -l` +smax=$( grep "${dtg_current}" ${vdir}/vitals.upd.${cmodel}.${symd}${dishh} | wc -l) sct=1 while [ ${sct} -le ${smax} ] @@ -1046,7 +1046,7 @@ if [ ${model} -eq 8 ]; then for fhr in $( seq -6 $BKGFREQ 3 ); do if [ $fhr -lt 0 ]; then - fpref=pgm`expr $fhr \* -1` + fpref=pgm$(expr $fhr \* -1) elif [ $fhr -eq 0 ]; then fpref=pges elif [ $fhr -gt 0 ]; then @@ -1092,8 +1092,8 @@ if [ ${model} -eq 8 ]; then for fhr in $( seq -6 $BKGFREQ 3 ); do if [ $fhr -lt 0 ]; then - fhour=0`expr $fhr \* -1` - fpref=pgm`expr $fhr \* -1` + fhour=0$(expr $fhr \* -1) + fpref=pgm$(expr $fhr \* -1) elif [ $fhr -eq 0 ]; then fhour=00 fpref=pges @@ -1317,8 +1317,8 @@ if [ ${model} -eq 9 ]; then rm ${vdir}/otherlatlon.pgrb.${symdh} fi - gridtyp=`${WGRIB:?} -GDS10 ${otherdir}/${fnamebeg}00${fnameend} | \ - awk -FGDS10= '{print $2}' | awk '{print $6}' | sed -n 1p` + gridtyp=$(${WGRIB:?} -GDS10 ${otherdir}/${fnamebeg}00${fnameend} | \ + awk -FGDS10= '{print $2}' | awk '{print $6}' | sed -n 1p) if [ ${gridtyp} -eq 0 ]; then @@ -1454,12 +1454,12 @@ done ifh=1 while [ $ifh -le ${maxtime} ] do - fh[${ifh}]=` echo ${fcsthrs} | awk '{print $n}' n=$ifh` + fh[${ifh}]=$( echo ${fcsthrs} | awk '{print $n}' n=$ifh) let ifh=ifh+1 done namelist=${vdir}/gettrk.input.${cmodel}.${symdh} -ATCFNAME=` echo "${atcfname}" | tr '[a-z]' '[A-Z]'` +ATCFNAME=$( echo "${atcfname}" | tr '[a-z]' '[A-Z]') export atcfymdh=${scc}${syy}${smm}${sdd}${shh} contour_interval=100.0 @@ -1503,13 +1503,13 @@ echo " wait_max_wait=1800," >>${namelist} echo " wait_sleeptime=5," >>${namelist} echo " per_fcst_command=''/" >>${namelist} -pgm=`basename $GETTX` +pgm=$(basename $GETTX) if [ -s $DATA/prep_step ]; then . $DATA/prep_step else [ -f errfile ] && rm errfile export XLFUNITS=0 - unset `env | grep XLFUNIT | awk -F= '{print $1}'` + unset $(env | grep XLFUNIT | awk -F= '{print $1}') set +u if [ -z "$XLFRTEOPTS" ]; then diff --git a/ush/wave_grib2_sbs.sh b/ush/wave_grib2_sbs.sh index cbd380e600..262d258012 100755 --- a/ush/wave_grib2_sbs.sh +++ b/ush/wave_grib2_sbs.sh @@ -38,7 +38,7 @@ cd $GRIBDATA # postmsg "$jlogfile" "Making GRIB2 Files." # commented to reduce unnecessary output to jlogfile - alertName=`echo $RUN|tr [a-z] [A-Z]` + alertName=$(echo $RUN|tr [a-z] [A-Z]) grdID=$1 gribDIR=${grdID}_grib @@ -109,7 +109,7 @@ # 0.c Starting time for output - tstart="`echo $ymdh | cut -c1-8` `echo $ymdh | cut -c9-10`0000" + tstart="$(echo $ymdh | cut -c1-8) $(echo $ymdh | cut -c9-10)0000" set +x echo " Starting time : $tstart" @@ -194,9 +194,9 @@ # Create grib2 subgrid is this is the source grid if [ "${grdID}" = "${WAV_SUBGRBSRC}" ]; then for subgrb in ${WAV_SUBGRB}; do - subgrbref=`echo ${!subgrb} | cut -d " " -f 1-20` - subgrbnam=`echo ${!subgrb} | cut -d " " -f 21` - subgrbres=`echo ${!subgrb} | cut -d " " -f 22` + subgrbref=$(echo ${!subgrb} | cut -d " " -f 1-20) + subgrbnam=$(echo ${!subgrb} | cut -d " " -f 21) + subgrbres=$(echo ${!subgrb} | cut -d " " -f 22) subfnam="${WAV_MOD_TAG}.${cycle}${ENSTAG}.${subgrbnam}.${subgrbres}.f${FH3}.grib2" $COPYGB2 -g "${subgrbref}" -i0 -x ${COMOUT}/gridded/${outfile} ${COMOUT}/gridded/${subfnam} $WGRIB2 -s $COMOUT/gridded/${subfnam} > $COMOUT/gridded/${subfnam}.idx diff --git a/ush/wave_grid_interp_sbs.sh b/ush/wave_grid_interp_sbs.sh index edac3d77a0..8d696c1d74 100755 --- a/ush/wave_grid_interp_sbs.sh +++ b/ush/wave_grid_interp_sbs.sh @@ -111,7 +111,7 @@ # 1. Generate GRID file with all data # 1.a Generate Input file - time="`echo $ymdh | cut -c1-8` `echo $ymdh | cut -c9-10`0000" + time="$(echo $ymdh | cut -c1-8) $(echo $ymdh | cut -c9-10)0000" sed -e "s/TIME/$time/g" \ -e "s/DT/$dt/g" \ diff --git a/ush/wave_outp_cat.sh b/ush/wave_outp_cat.sh index 9169e37bdf..358ff9055c 100755 --- a/ush/wave_outp_cat.sh +++ b/ush/wave_outp_cat.sh @@ -91,7 +91,7 @@ fhrp=$fhr while [ $fhr -le $MAXHOUR ]; do - ymdh=`$NDATE $fhr $CDATE` + ymdh=$($NDATE $fhr $CDATE) if [ "$specdir" = "bull" ] then outfilefhr=${STA_DIR}/${specdir}fhr/$WAV_MOD_TAG.${ymdh}.$buoy.bull diff --git a/ush/wave_outp_spec.sh b/ush/wave_outp_spec.sh index 437ce20460..e7691e2908 100755 --- a/ush/wave_outp_spec.sh +++ b/ush/wave_outp_spec.sh @@ -37,7 +37,7 @@ specdir=$3 workdir=$4 - YMDHE=`$NDATE $FHMAX_WAV_PNT $CDATE` + YMDHE=$($NDATE $FHMAX_WAV_PNT $CDATE) cd $workdir @@ -85,10 +85,10 @@ grep $buoy ${DATA}/buoy_log.ww3 > tmp_list.loc while read line do - buoy_name=`echo $line | awk '{print $2}'` + buoy_name=$(echo $line | awk '{print $2}') if [ $buoy = $buoy_name ] then - point=`echo $line | awk '{ print $1 }'` + point=$(echo $line | awk '{ print $1 }') set +x echo " Location ID/# : $buoy (${point})" echo " Spectral output start time : $ymdh " @@ -130,9 +130,9 @@ # 0.d Starting time for output - tstart="`echo $ymdh | cut -c1-8` `echo $ymdh | cut -c9-10`0000" - YMD="`echo $ymdh | cut -c1-8`" - HMS="`echo $ymdh | cut -c9-10`0000" + tstart="$(echo $ymdh | cut -c1-8) $(echo $ymdh | cut -c9-10)0000" + YMD="$(echo $ymdh | cut -c1-8)" + HMS="$(echo $ymdh | cut -c9-10)0000" set +x echo " Output starts at $tstart." echo ' ' @@ -159,8 +159,8 @@ if [ "$specdir" = "bull" ] then - tstart="`echo $ymdh | cut -c1-8` `echo $ymdh | cut -c9-10`0000" - truntime="`echo $CDATE | cut -c1-8` `echo $CDATE | cut -c9-10`0000" + tstart="$(echo $ymdh | cut -c1-8) $(echo $ymdh | cut -c9-10)0000" + truntime="$(echo $CDATE | cut -c1-8) $(echo $CDATE | cut -c9-10)0000" sed -e "s/TIME/$tstart/g" \ -e "s/DT/$dtspec/g" \ -e "s/POINT/$point/g" \ @@ -175,7 +175,7 @@ -e "s/ITYPE/1/g" \ -e "s/FORMAT/F/g" \ ${DATA}/ww3_outp_spec.inp.tmpl > ww3_outp.inp - outfile=ww3.`echo $tstart | cut -c3-8``echo $tstart | cut -c10-11`.spc + outfile=ww3.$(echo $tstart | cut -c3-8)$(echo $tstart | cut -c10-11).spc fi # 2.b Run the postprocessor diff --git a/ush/wave_prnc_cur.sh b/ush/wave_prnc_cur.sh index 4207278477..fe1855064e 100755 --- a/ush/wave_prnc_cur.sh +++ b/ush/wave_prnc_cur.sh @@ -28,7 +28,7 @@ ymdh_rtofs=$1 curfile=$2 fhr=$3 flagfirst=$4 -fh3=`printf "%03d" "${fhr#0}"` +fh3=$(printf "%03d" "${fhr#0}") # Timing has to be made relative to the single 00z RTOFS cycle for that PDY diff --git a/ush/wave_tar.sh b/ush/wave_tar.sh index 33637148c6..4b37ae9048 100755 --- a/ush/wave_tar.sh +++ b/ush/wave_tar.sh @@ -36,7 +36,7 @@ cd $DATA postmsg "$jlogfile" "Making TAR FILE" - alertName=`echo $RUN|tr [a-z] [A-Z]` + alertName=$(echo $RUN|tr [a-z] [A-Z]) set +x echo ' ' @@ -112,7 +112,7 @@ while [ "$count" -lt "$countMAX" ] && [ "$tardone" = 'no' ] do - nf=`ls | awk '/'$ID.*.$filext'/ {a++} END {print a}'` + nf=$(ls | awk '/'$ID.*.$filext'/ {a++} END {print a}') nbm2=$(( $nb - 2 )) if [ $nf -ge $nbm2 ] then @@ -141,7 +141,7 @@ echo ' All files not found for tar. Sleeping 10 seconds and trying again ..' [[ "$LOUD" = YES ]] && set -x sleep 10 - count=`expr $count + 1` + count=$(expr $count + 1) fi done diff --git a/util/sorc/compile_gfs_util_wcoss.sh b/util/sorc/compile_gfs_util_wcoss.sh index 26e065a221..2fe4e2c7cf 100755 --- a/util/sorc/compile_gfs_util_wcoss.sh +++ b/util/sorc/compile_gfs_util_wcoss.sh @@ -8,7 +8,7 @@ LMOD_EXACT_MATCH=no source ../../sorc/machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) if [ "$target" = "wcoss_dell_p3" ] || [ "$target" = "wcoss_cray" ] || [ "$target" = "hera" ] ; then echo " " diff --git a/util/sorc/mkgfsawps.fd/compile_mkgfsawps_wcoss.sh b/util/sorc/mkgfsawps.fd/compile_mkgfsawps_wcoss.sh index 7051909c60..7c7a5022e3 100755 --- a/util/sorc/mkgfsawps.fd/compile_mkgfsawps_wcoss.sh +++ b/util/sorc/mkgfsawps.fd/compile_mkgfsawps_wcoss.sh @@ -1,7 +1,7 @@ #!/bin/sh LMOD_EXACT_MATCH=no source ../../../sorc/machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) if [ "$target" = "wcoss_dell_p3" ] || [ "$target" = "wcoss_cray" ] || [ "$target" = "hera" ] ; then echo " " diff --git a/util/sorc/overgridid.fd/compile_overgridid_wcoss.sh b/util/sorc/overgridid.fd/compile_overgridid_wcoss.sh index ccce82b0e5..3c55640367 100755 --- a/util/sorc/overgridid.fd/compile_overgridid_wcoss.sh +++ b/util/sorc/overgridid.fd/compile_overgridid_wcoss.sh @@ -8,7 +8,7 @@ LMOD_EXACT_MATCH=no source ../../../sorc/machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) if [ "$target" = "wcoss_dell_p3" ] || [ "$target" = "wcoss_cray" ] || [ "$target" = "hera" ] ; then echo " " diff --git a/util/sorc/rdbfmsua.fd/compile_rdbfmsua_wcoss.sh b/util/sorc/rdbfmsua.fd/compile_rdbfmsua_wcoss.sh index 872434108d..63d0ccdb2a 100755 --- a/util/sorc/rdbfmsua.fd/compile_rdbfmsua_wcoss.sh +++ b/util/sorc/rdbfmsua.fd/compile_rdbfmsua_wcoss.sh @@ -8,7 +8,7 @@ LMOD_EXACT_MATCH=no source ../../../sorc/machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) if [ "$target" = "wcoss_dell_p3" ] || [ "$target" = "wcoss_cray" ] || [ "$target" = "hera" ] ; then echo " " diff --git a/util/sorc/webtitle.fd/compile_webtitle_wcoss.sh b/util/sorc/webtitle.fd/compile_webtitle_wcoss.sh index 3d83adb2e2..40cdc22f40 100755 --- a/util/sorc/webtitle.fd/compile_webtitle_wcoss.sh +++ b/util/sorc/webtitle.fd/compile_webtitle_wcoss.sh @@ -8,7 +8,7 @@ LMOD_EXACT_MATCH=no source ../../../sorc/machine-setup.sh > /dev/null 2>&1 -cwd=`pwd` +cwd=$(pwd) if [ "$target" = "wcoss_dell_p3" ] || [ "$target" = "wcoss_cray" ] || [ "$target" = "hera" ] ; then echo " " diff --git a/util/ush/finddate.sh b/util/ush/finddate.sh index cd691cec17..1805c2103c 100755 --- a/util/ush/finddate.sh +++ b/util/ush/finddate.sh @@ -11,13 +11,13 @@ # # usage: examples assume todays date is 19990929. # To generate a sequence looking 10 days forward then execute: -# list=`sh /nwprod/util/scripts/finddate.sh 19990929 s+10` +# list=$(sh /nwprod/util/scripts/finddate.sh 19990929 s+10) # To generate just the date/time 10 days from now then execute: -# list=`sh /nwprod/util/scripts/finddate.sh 19990929 d+10` +# list=$(sh /nwprod/util/scripts/finddate.sh 19990929 d+10) # To generate a sequence looking 10 days backward then execute: -# list=`sh /nwprod/util/scripts/finddate.sh 19990929 s-10` +# list=$(sh /nwprod/util/scripts/finddate.sh 19990929 s-10) # To generate just the date/time 10 days ago then execute: -# list=`sh /nwprod/util/scripts/finddate.sh 19990929 d-10` +# list=$(sh /nwprod/util/scripts/finddate.sh 19990929 d-10) # list will contain 10 time stamps starting with 19990929. Time stamps # are separated by blanks. # @@ -28,15 +28,15 @@ set +x unset pdstr today=$1 var=$2 -yy=`echo $today | cut -c1-4 ` -mm=`echo $today | cut -c5-6 ` -dd=`echo $today | cut -c7-8 ` +yy=$(echo $today | cut -c1-4 ) +mm=$(echo $today | cut -c5-6 ) +dd=$(echo $today | cut -c7-8 ) nxtyy=$yy pyy=$yy -what=`echo $var | cut -c1-1` -up=`echo $var | cut -c2-2` -num=`echo $var | cut -c3-4` -mod=`expr \( $yy / 4 \) \* 4 - $yy ` +what=$(echo $var | cut -c1-1) +up=$(echo $var | cut -c2-2) +num=$(echo $var | cut -c3-4) +mod=$(expr \( $yy / 4 \) \* 4 - $yy ) leap=0 if test "$mod" -eq 0 then @@ -46,18 +46,18 @@ case $mm in 01) mday=31 pday=31 pmon=12 - pyy=`expr $yy - 1` + pyy=$(expr $yy - 1) if test $pyy -lt '0' then pyy='1999' fi nxtmon=02;; -02) mday=`expr "$leap" + 28 ` +02) mday=$(expr "$leap" + 28 ) pday=31 pmon=01 nxtmon=03;; 03) mday=31 - pday=`expr "$leap" + 28 ` + pday=$(expr "$leap" + 28 ) pmon=02 nxtmon=04;; 04) mday=30 @@ -96,7 +96,7 @@ case $mm in pday=30 pmon=11 nxtmon=01 - nxtyy=`expr $yy + 1 ` + nxtyy=$(expr $yy + 1 ) if test $yy -eq 1999 then nxtyy=2000 @@ -117,12 +117,12 @@ while test $i -le $num do if test "$up" = '+' then - ddn=`expr $dd + $i` + ddn=$(expr $dd + $i) mmn=$mm yyn=$yy if test $ddn -gt $mday then - n=`expr $n + 1` + n=$(expr $n + 1) ddn=$n mmn=$nxtmon yyn=$nxtyy @@ -133,12 +133,12 @@ do fi elif test "$up" = '-' then - ddn=`expr $dd - $i` + ddn=$(expr $dd - $i) mmn=$mm yyn=$yy if test $ddn -le '0' then - n=`expr $pday + $ddn` + n=$(expr $pday + $ddn) ddn=$n mmn=$pmon yyn=$pyy @@ -152,7 +152,7 @@ do echo "You tried $up, this is illegal." exit 16 fi - i=`expr $i + 1 ` + i=$(expr $i + 1 ) if test "$what" = 's' then pdstr=$pdstr"$yyn$mmn$ddn " diff --git a/util/ush/make_NTC_file.pl b/util/ush/make_NTC_file.pl index 9c838bdebe..478bd6a288 100755 --- a/util/ush/make_NTC_file.pl +++ b/util/ush/make_NTC_file.pl @@ -80,7 +80,7 @@ sub make_toc { # $Header = "$WMOHeader $Origin $DDHHMM"; - $ByteCount = `wc -c $Filename | cut -c1-8`; + $ByteCount = $(wc -c $Filename | cut -c1-8); $ByteCount= $ByteCount + length($Header) + 3; if ($SubHeader =~ /NONE/) { print "No Subheader\n"; diff --git a/util/ush/make_ntcfile.pl b/util/ush/make_ntcfile.pl index 814954619c..2c98e51ad5 100755 --- a/util/ush/make_ntcfile.pl +++ b/util/ush/make_ntcfile.pl @@ -111,7 +111,7 @@ sub make_toc { # $Header = "$WMOHeader $Origin $DDHHMM"; - $ByteCount = `wc -c $Filename | cut -c1-8`; + $ByteCount = $(wc -c $Filename | cut -c1-8); $ByteCount= $ByteCount + length($Header) + 3; if ($SubHeader =~ /NONE/) { print "No Subheader\n"; diff --git a/util/ush/mkawpgrb.sh b/util/ush/mkawpgrb.sh index bdde03553b..86d8305818 100755 --- a/util/ush/mkawpgrb.sh +++ b/util/ush/mkawpgrb.sh @@ -54,7 +54,7 @@ then export SENDDBN=${SENDDBN:-NO} if [ -z "$DATA" ] then - export DATA=`pwd` + export DATA=$(pwd) cd $DATA ${NWROOT}/util/ush/setup.sh ${NWROOT}/util/ush/setpdy.sh @@ -339,7 +339,7 @@ do ;; esac - executable_name=`basename $executable` + executable_name=$(basename $executable) ############################## # Copy Input Field to $DATA diff --git a/util/ush/month_name.sh b/util/ush/month_name.sh index 48437e21d5..a31a82e8a2 100755 --- a/util/ush/month_name.sh +++ b/util/ush/month_name.sh @@ -25,9 +25,9 @@ # Note: Variables may be assigned the value of the returned name # by either of the following methods: # -# MM=`cat month_name.txt` after executing month_name.sh +# MM=$(cat month_name.txt) after executing month_name.sh # - OR - -# MM=`month_name.sh 5 MON` (for example) +# MM=$(month_name.sh 5 MON) (for example) # # # @@ -96,13 +96,13 @@ elif [ ${month_spec} = MON ]; then - MON=`echo ${Mon} | tr [a-z] [A-Z]` + MON=$(echo ${Mon} | tr [a-z] [A-Z]) echo ${MON} echo ${MON} > month_name.txt elif [ ${month_spec} = MONTH ]; then - MONTH=`echo ${Month} | tr [a-z] [A-Z]` + MONTH=$(echo ${Month} | tr [a-z] [A-Z]) echo ${MONTH} echo ${MONTH} > month_name.txt diff --git a/util/ush/snd2forgn b/util/ush/snd2forgn index 6be3a0ff14..7e411c9e84 100755 --- a/util/ush/snd2forgn +++ b/util/ush/snd2forgn @@ -191,8 +191,8 @@ outfil="$2" flg="$3" INFILE="$4" set -x -export filename=`basename ${INFILE}` -export FLG=`echo $flg | tr '[a-z]' '[A-Z]' ` +export filename=$(basename ${INFILE}) +export FLG=$(echo $flg | tr '[a-z]' '[A-Z]' ) export CONCARD=card$flg{$$} # get the number of characters in TYPE ! @@ -201,7 +201,7 @@ NUM=${#TYPE} # get the number of sub types in TYPE! -numprt=`echo $TYPE | awk -F_ '{print NF}'` +numprt=$(echo $TYPE | awk -F_ '{print NF}') if [ $numprt -gt 1 ] then @@ -211,9 +211,9 @@ then # remove the under score separators from $TYPE. newstr="" - group=`echo $TYPE \ | awk -F_ '{for(i=1;i<=NF;i++) \ + group=$(echo $TYPE \ | awk -F_ '{for(i=1;i<=NF;i++) \ {if(i> sendline if [ -s sendline ] then - ftype=`awk '{print $2}' sendline` - foreign=`awk '{print $3}' sendline` + ftype=$(awk '{print $2}' sendline) + foreign=$(awk '{print $3}' sendline) sndfrc=0 echo $sndfrc >$DATA/sndfrc diff --git a/util/ush/sndncdc b/util/ush/sndncdc index 26eb3304e3..5dbb2b6901 100755 --- a/util/ush/sndncdc +++ b/util/ush/sndncdc @@ -52,12 +52,12 @@ fi outfil="$1" INFILE="$2" set -x -export subdir=`basename ${COMOUTwmo}` +export subdir=$(basename ${COMOUTwmo}) if test "$subdir" = 'faxx' then export dir=${COMROOT}/foreign/ncdc else - export dirn=`dirname ${HOMEutil}` + export dirn=$(dirname ${HOMEutil}) if test "$dirn" = '${NWROOT}' then export dir=${COMROOT}/foreign/ncdc @@ -72,12 +72,12 @@ fi # get the year month day and z time to append to end of the file that is to # go to NCDC $outfil - YMDZ=`date -u +"%Y%m%d%H"` + YMDZ=$(date -u +"%Y%m%d%H") # this makes sure that the new file is copied into ${COMROOT}/foreign/faxx ! - ncdcfil=`echo ${outfil} | awk 'BEGIN{FS="."} {print $1}'` + ncdcfil=$(echo ${outfil} | awk 'BEGIN{FS="."} {print $1}') if [ -z "${dir}" ] ; then cp ${INFILE} ${dir}/${ncdcfil}.${YMDZ} diff --git a/util/ush/verfdate.sh b/util/ush/verfdate.sh index 414e4e0b96..7a17260d4f 100755 --- a/util/ush/verfdate.sh +++ b/util/ush/verfdate.sh @@ -42,9 +42,9 @@ # Parse PDY - yyyy=`echo $PDY | cut -c1-4` - mm=`echo $PDY | cut -c5-6` - dd=`echo $PDY | cut -c7-8` + yyyy=$(echo $PDY | cut -c1-4) + mm=$(echo $PDY | cut -c5-6) + dd=$(echo $PDY | cut -c7-8) # Check for invalid day @@ -80,11 +80,11 @@ verfdate=$PDY hour=$term elif [ $days -gt 0 ]; then - verfdate=`finddate.sh $PDY d+$days` + verfdate=$(finddate.sh $PDY d+$days) let "hour=term-(days*24)" else let negdays=-1*days - verfdate=`finddate.sh $PDY d-$negdays` + verfdate=$(finddate.sh $PDY d-$negdays) let "hour=(negdays*24)+term" fi @@ -92,12 +92,12 @@ - fy=`echo $verfdate | cut -c1-4` - fm=`echo $verfdate | cut -c5-6` - fd=`echo $verfdate | cut -c7-8` + fy=$(echo $verfdate | cut -c1-4) + fm=$(echo $verfdate | cut -c5-6) + fd=$(echo $verfdate | cut -c7-8) fday=$fd if [ $fday -lt 10 ]; then - fday=`echo $fday | cut -c2` + fday=$(echo $fday | cut -c2) fi diff --git a/util/ush/xlf_links.sh b/util/ush/xlf_links.sh index 6e37a2cf81..cc69b1a770 100755 --- a/util/ush/xlf_links.sh +++ b/util/ush/xlf_links.sh @@ -5,9 +5,9 @@ num=1;>xlflnk while [ $num -le 99 ] do echo "[ -n \"\$XLFUNIT_$num\" ] && ln -sf \$XLFUNIT_$num fort.$num" >>xlflnk -num=`expr $num + 1` +num=$(expr $num + 1) done chmod +x xlflnk; ./xlflnk; rm xlflnk -echo; echo `date` links.sh produced the following soft links: +echo; echo $(date) links.sh produced the following soft links: echo; ls -ln fort.*; echo From 033b1d8ef29b7c829e8131758135b372ae61de26 Mon Sep 17 00:00:00 2001 From: Walter Kolczynski - NOAA Date: Sun, 19 Dec 2021 22:18:48 -0500 Subject: [PATCH 2/2] Update GSI version to 2021 Dec 14 (#530) --- sorc/checkout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 57503a03f5..cea5ecd82d 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -43,7 +43,7 @@ if [[ ! -d gsi.fd ]] ; then rm -f ${topdir}/checkout-gsi.log git clone --recursive https://github.com/NOAA-EMC/GSI.git gsi.fd >> ${logdir}/checkout-gsi.log 2>&1 cd gsi.fd - git checkout 9c1fc15d42573b398037319bbf8d5143ad126fb6 + git checkout a62dec6 git submodule update cd ${topdir} else