Skip to content

Commit

Permalink
Update develop branch for generic linux, MacOS capability (#539)
Browse files Browse the repository at this point in the history
## DESCRIPTION OF CHANGES: 
This change will add the capability to run regional_workflow (as part of the SRW app) on MacOS and generic LINUX platforms. Most of these changes are identical to those in #402 (hash e6b8c74) but some additional modifications needed to be made due to intervening changes in the develop branch.

## TESTS CONDUCTED: 
Ran Graduate Student Test on new platforms:
 - my personal Mac machine (MacOS Catalina 10.15.7) MacOS with gnu 9.4.0 compilers. 
 - Cheyenne compute node as a faux "stand-alone" machine, intel 19.1.1 compilers

Ran suite of end-to-end tests on Cheyenne (intel/19.1.1) and Hera (intel/18.0.5.274). All passed as expected.

Tests also passed on WCOSS, MacOS Mojave, RedHat Linux.

## ISSUE: 
Will resolve #369
  • Loading branch information
mkavulich authored Sep 22, 2021
1 parent c3cf323 commit 756f328
Show file tree
Hide file tree
Showing 81 changed files with 730 additions and 364 deletions.
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_EXTRN_MDL_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_OBS_CCPA
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_OBS_MRMS
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_OBS_NDAS
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_GRID
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_ICS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_LBCS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_OROG
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_SFC_CLIMO
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_FCST
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
4 changes: 2 additions & 2 deletions jobs/JREGIONAL_RUN_POST
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -113,7 +113,7 @@ cd_vrfy "${tmp_dir}"
#
#-----------------------------------------------------------------------
#
fhr=$( printf "%s" "${fhr}" | sed -n -r -e "s/^([0-9]+)$/\1/p" )
fhr=$( printf "%s" "${fhr}" | $SED -n -r -e "s/^([0-9]+)$/\1/p" )
if [ -z "$fhr" ]; then
print_err_msg_exit "\
The forecast hour (fhr) must be a non-empty string consisting of only
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_ENSGRID
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_ENSGRID_MEAN
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_ENSGRID_PROB
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_ENSPOINT
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_ENSPOINT_MEAN
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_ENSPOINT_PROB
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_GRIDSTAT
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_VX_POINTSTAT
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
8 changes: 4 additions & 4 deletions scripts/exregional_get_ccpa_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ while [[ ${current_fcst} -le ${fcst_length} ]]; do
mm=`echo ${init} | cut -c5-6` # month (MM) of initialization time
dd=`echo ${init} | cut -c7-8` # day (DD) of initialization time
hh=`echo ${init} | cut -c9-10` # hour (HH) of initialization time
init_ut=`date -ud ''${yyyy}-${mm}-${dd}' UTC '${hh}':00:00' +%s` # convert initialization time to universal time
init_ut=`$DATE_UTIL -ud ''${yyyy}-${mm}-${dd}' UTC '${hh}':00:00' +%s` # convert initialization time to universal time
vdate_ut=`expr ${init_ut} + ${fcst_sec}` # calculate current forecast time in universal time
vdate=`date -ud '1970-01-01 UTC '${vdate_ut}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd=`echo ${vdate} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy=`echo ${vdate} | cut -c1-4` # year (YYYY) of valid time
vmm=`echo ${vdate} | cut -c5-6` # month (MM) of valid time
Expand All @@ -60,7 +60,7 @@ while [[ ${current_fcst} -le ${fcst_length} ]]; do

# Calculate valid date - 1 day
vdate_ut_m1=`expr ${vdate_ut} - 86400`
vdate_m1=`date -ud '1970-01-01 UTC '${vdate_ut_m1}' seconds' +%Y%m%d%H`
vdate_m1=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_m1}' seconds' +%Y%m%d%H`
vyyyymmdd_m1=`echo ${vdate_m1} | cut -c1-8`
vyyyy_m1=`echo ${vdate_m1} | cut -c1-4`
vmm_m1=`echo ${vdate_m1} | cut -c5-6`
Expand All @@ -69,7 +69,7 @@ while [[ ${current_fcst} -le ${fcst_length} ]]; do

# Calculate valid date + 1 day
vdate_ut_p1=`expr ${vdate_ut} + 86400`
vdate_p1=`date -ud '1970-01-01 UTC '${vdate_ut_p1}' seconds' +%Y%m%d%H`
vdate_p1=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_p1}' seconds' +%Y%m%d%H`
vyyyymmdd_p1=`echo ${vdate_p1} | cut -c1-8`
vyyyy_p1=`echo ${vdate_p1} | cut -c1-4`
vmm_p1=`echo ${vdate_p1} | cut -c5-6`
Expand Down
6 changes: 3 additions & 3 deletions scripts/exregional_get_extrn_mdl_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -524,7 +524,7 @@ not happen."
# to the current directory. Then move the files.
#
rel_dir=$( printf "%s" "${extrn_mdl_arcvrel_dir}" | \
sed -r 's%^(\/|\.\/)([^/]*)(.*)%\2\3%' )
$SED -r 's%^(\/|\.\/)([^/]*)(.*)%\2\3%' )
mv_vrfy ${rel_dir}/* .
#
# Get the first subdirectory in rel_dir, i.e. the subdirectory before the
Expand All @@ -533,7 +533,7 @@ not happen."
# it.
#
subdir_to_remove=$( printf "%s" "${rel_dir}" | \
sed -r 's%^([^/]*)(.*)%\1%' )
$SED -r 's%^([^/]*)(.*)%\1%' )
rm_vrfy -rf ./${subdir_to_remove}
#
# If extrn_mdl_arcvrel_dir does not start with a "/" (and it is not
Expand Down
6 changes: 3 additions & 3 deletions scripts/exregional_get_mrms_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ s_yyyy=`echo ${start_valid} | cut -c1-4` # year (YYYY) of start time
s_mm=`echo ${start_valid} | cut -c5-6` # month (MM) of start time
s_dd=`echo ${start_valid} | cut -c7-8` # day (DD) of start time
s_hh=`echo ${start_valid} | cut -c9-10` # hour (HH) of start time
start_valid_ut=`date -ud ''${s_yyyy}-${s_mm}-${s_dd}' UTC '${s_hh}':00:00' +%s` # convert start time to universal time
start_valid_ut=`$DATE_UTIL -ud ''${s_yyyy}-${s_mm}-${s_dd}' UTC '${s_hh}':00:00' +%s` # convert start time to universal time

end_fcst_sec=`expr ${fcst_length} \* 3600` # convert last forecast lead hour to seconds
end_valid_ut=`expr ${start_valid_ut} + ${end_fcst_sec}` # calculate current forecast time in universal time
Expand All @@ -48,7 +48,7 @@ current_fcst=0
fcst_sec=`expr ${current_fcst} \* 3600` # convert forecast lead hour to seconds

while [[ ${cur_ut} -le ${end_valid_ut} ]]; do
cur_time=`date -ud '1970-01-01 UTC '${cur_ut}' seconds' +%Y%m%d%H` # convert universal time to standard time
cur_time=`$DATE_UTIL -ud '1970-01-01 UTC '${cur_ut}' seconds' +%Y%m%d%H` # convert universal time to standard time
echo "cur_time=${cur_time}"

# Calculate valid date info
Expand All @@ -57,7 +57,7 @@ while [[ ${cur_ut} -le ${end_valid_ut} ]]; do
vdd=`echo ${cur_time} | cut -c7-8` # day (DD) of time
vhh=`echo ${cur_time} | cut -c9-10` # hour (HH) of time
vyyyymmdd=`echo ${cur_time} | cut -c1-8` # YYYYMMDD of time
vinit_ut=`date -ud ''${vyyyy}-${vmm}-${vdd}' UTC '${vhh}':00:00' +%s` # convert time to universal time
vinit_ut=`$DATE_UTIL -ud ''${vyyyy}-${vmm}-${vdd}' UTC '${vhh}':00:00' +%s` # convert time to universal time

# Create necessary raw and proc directories
if [[ ! -d "$mrms_raw/${vyyyymmdd}" ]]; then
Expand Down
14 changes: 7 additions & 7 deletions scripts/exregional_get_ndas_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ while [[ ${current_fcst} -le ${fcst_length} ]]; do
mm=`echo ${init} | cut -c5-6` # month (MM) of initialization time
dd=`echo ${init} | cut -c7-8` # day (DD) of initialization time
hh=`echo ${init} | cut -c9-10` # hour (HH) of initialization time
init_ut=`date -ud ''${yyyy}-${mm}-${dd}' UTC '${hh}':00:00' +%s` # convert initialization time to universal time
init_ut=`$DATE_UTIL -ud ''${yyyy}-${mm}-${dd}' UTC '${hh}':00:00' +%s` # convert initialization time to universal time
vdate_ut=`expr ${init_ut} + ${fcst_sec}` # calculate current forecast time in universal time
vdate=`date -ud '1970-01-01 UTC '${vdate_ut}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd=`echo ${vdate} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy=`echo ${vdate} | cut -c1-4` # year (YYYY) of valid time
vmm=`echo ${vdate} | cut -c5-6` # month (MM) of valid time
Expand All @@ -53,39 +53,39 @@ echo "yyyy mm dd hh= $yyyy $mm $dd $hh"
echo "vyyyy vmm vdd vhh= $vyyyy $vmm $vdd $vhh"

vdate_ut_m1h=`expr ${vdate_ut} - 3600` # calculate current forecast time in universal time
vdate_m1h=`date -ud '1970-01-01 UTC '${vdate_ut_m1h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate_m1h=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_m1h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd_m1h=`echo ${vdate_m1h} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy_m1h=`echo ${vdate_m1h} | cut -c1-4` # year (YYYY) of valid time
vmm_m1h=`echo ${vdate_m1h} | cut -c5-6` # month (MM) of valid time
vdd_m1h=`echo ${vdate_m1h} | cut -c7-8` # day (DD) of valid time
vhh_m1h=`echo ${vdate_m1h} | cut -c9-10` # forecast hour (HH)

vdate_ut_m2h=`expr ${vdate_ut} - 7200` # calculate current forecast time in universal time
vdate_m2h=`date -ud '1970-01-01 UTC '${vdate_ut_m2h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate_m2h=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_m2h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd_m2h=`echo ${vdate_m2h} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy_m2h=`echo ${vdate_m2h} | cut -c1-4` # year (YYYY) of valid time
vmm_m2h=`echo ${vdate_m2h} | cut -c5-6` # month (MM) of valid time
vdd_m2h=`echo ${vdate_m2h} | cut -c7-8` # day (DD) of valid time
vhh_m2h=`echo ${vdate_m2h} | cut -c9-10` # forecast hour (HH)

vdate_ut_m3h=`expr ${vdate_ut} - 10800` # calculate current forecast time in universal time
vdate_m3h=`date -ud '1970-01-01 UTC '${vdate_ut_m3h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate_m3h=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_m3h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd_m3h=`echo ${vdate_m3h} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy_m3h=`echo ${vdate_m3h} | cut -c1-4` # year (YYYY) of valid time
vmm_m3h=`echo ${vdate_m3h} | cut -c5-6` # month (MM) of valid time
vdd_m3h=`echo ${vdate_m3h} | cut -c7-8` # day (DD) of valid time
vhh_m3h=`echo ${vdate_m3h} | cut -c9-10` # forecast hour (HH)

vdate_ut_m4h=`expr ${vdate_ut} - 14400` # calculate current forecast time in universal time
vdate_m4h=`date -ud '1970-01-01 UTC '${vdate_ut_m4h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate_m4h=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_m4h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd_m4h=`echo ${vdate_m4h} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy_m4h=`echo ${vdate_m4h} | cut -c1-4` # year (YYYY) of valid time
vmm_m4h=`echo ${vdate_m4h} | cut -c5-6` # month (MM) of valid time
vdd_m4h=`echo ${vdate_m4h} | cut -c7-8` # day (DD) of valid time
vhh_m4h=`echo ${vdate_m4h} | cut -c9-10` # forecast hour (HH)

vdate_ut_m5h=`expr ${vdate_ut} - 18000` # calculate current forecast time in universal time
vdate_m5h=`date -ud '1970-01-01 UTC '${vdate_ut_m5h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vdate_m5h=`$DATE_UTIL -ud '1970-01-01 UTC '${vdate_ut_m5h}' seconds' +%Y%m%d%H` # convert universal time to standard time
vyyyymmdd_m5h=`echo ${vdate_m5h} | cut -c1-8` # forecast time (YYYYMMDD)
vyyyy_m5h=`echo ${vdate_m5h} | cut -c1-4` # year (YYYY) of valid time
vmm_m5h=`echo ${vdate_m5h} | cut -c5-6` # month (MM) of valid time
Expand Down
21 changes: 18 additions & 3 deletions scripts/exregional_make_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -135,11 +135,18 @@ case "$MACHINE" in
ulimit -a
;;

"MACOS")
APRUN=time
;;

"LINUX")
APRUN=time
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
MACHINE = \"$MACHINE\"
APRUN = \"$APRUN\""
MACHINE = \"$MACHINE\""
;;

esac
Expand Down Expand Up @@ -422,6 +429,14 @@ uniform cubed-sphere grid equivalent resolution returned with nonzero exit
code:
exec_fp = \"${exec_fp}\""

# Make sure 'ncdump' is available before we try to use it
if ! command -v ncdump &> /dev/null
then
print_err_msg_exit "\
The utility 'ncdump' was not found in the environment. Be sure to add the
netCDF 'bin/' directory to your PATH."
fi

# Make the following (reading of res_equiv) a function in another file
# so that it can be used both here and in the exregional_make_orog.sh
# script.
Expand Down
16 changes: 15 additions & 1 deletion scripts/exregional_make_ics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -126,6 +126,20 @@ case "$MACHINE" in
APRUN="ibrun"
;;

"MACOS")
APRUN=$RUN_CMD_UTILS
;;

"LINUX")
APRUN=$RUN_CMD_UTILS
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
MACHINE = \"$MACHINE\""
;;

esac
#
#-----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 756f328

Please sign in to comment.