Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update develop branch for generic linux, MacOS capability #539

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f8e9f62
First change for macos compatability: replace calls to utilities with…
mkavulich Aug 17, 2021
7bb9cb1
Remove old, commented out lines that are no longer needed
mkavulich Jun 18, 2021
530e3f8
Replace modern bash functionality for making strings capitalized or l…
mkavulich Aug 17, 2021
1ea358b
Add check for ncdump before calling it
mkavulich Jun 20, 2021
7edd67b
- Add new platforms for stand-alone MACOS and LINUX machines
mkavulich Aug 17, 2021
75c5f32
MACOS does not support the "--relative" flag passed to the `ln` utility
mkavulich Aug 17, 2021
562d9f8
Missed one instance of ln to replace with variable
mkavulich Jun 22, 2021
9bfa084
A fix to broken syntax introduced in earlier commit, and remove one c…
mkavulich Aug 17, 2021
991a5e6
One more fix for previously broken syntax
mkavulich Aug 17, 2021
bf345da
Need another check for failure here; failures in the subfunction do n…
mkavulich Aug 17, 2021
4252639
If USE_USER_STAGED_EXTRN_FILES is set, don't care if there's data on …
mkavulich Jun 23, 2021
7977074
Remove references to APRUN before it is defined
mkavulich Jul 16, 2021
2870181
Fix bad commit dc1768a9: removed one more quote than I should have
mkavulich Jul 19, 2021
90ff362
Fix missed from latest merge
mkavulich Jul 20, 2021
fcc44da
More syntax fixes in exregional_make_orog
mkavulich Aug 18, 2021
f8f018a
Need one more $READLINK substitution for macos
mkavulich Aug 18, 2021
487419c
NCORES_PER_NODE can no longer be blank, since it is used in math late…
mkavulich Aug 18, 2021
64c60d9
Removing MACOS from valid_param_vals per offline discussion; since th…
mkavulich Aug 18, 2021
6b49ad1
Accidentally included unnecessary line here
mkavulich Aug 18, 2021
d36ecaa
launch script does not work for non-rocoto platforms anyway, so remov…
mkavulich Aug 18, 2021
fcb5b58
Merge remote-tracking branch 'upstream/develop' into update_develop_f…
mkavulich Sep 16, 2021
076ed13
Bug fix in setup.sh for macOS
climbfuji Sep 17, 2021
67601d0
Add MACOS as valid value for machine choice
climbfuji Sep 17, 2021
b9762a9
Fix bash syntax in ush/generate_FV3LAM_wflow.sh and bug for setting W…
climbfuji Sep 17, 2021
4ccdcb5
Merge pull request #1 from climbfuji/update_develop_for_macos_linux_b…
mkavulich Sep 17, 2021
c4f19eb
Update verification tasks with MacOS-friendly utility calls
mkavulich Sep 17, 2021
6dfd7f9
A single rogue "=" resulted in a completely misformatted xml....funny…
mkavulich Sep 17, 2021
ebc46d8
Fix uninitialized variable for HRRR suites in make_orog; this flag sh…
mkavulich Sep 17, 2021
8115254
Update get_extrn_mdl_file_dir_info.sh
mkavulich Sep 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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