diff --git a/env/HERA.env b/env/HERA.env index c02bc07acb..7103a3cc91 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -1,6 +1,6 @@ #! /usr/bin/env bash -if [ $# -ne 1 ]; then +if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" @@ -49,11 +49,11 @@ if [ "${step}" = "prep" -o "${step}" = "prepbufr" ]; then elif [ "${step}" = "waveinit" -o "${step}" = "waveprep" -o "${step}" = "wavepostsbs" -o "${step}" = "wavepostbndpnt" -o "${step}" = "wavepostbndpntbll" -o "${step}" = "wavepostpnt" ]; then export CFP_MP="YES" - if [ "${step}" = "waveprep" ]; then export MP_PULSE=0 ; fi + if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi export wavempexec=${launcher} export wave_mpmd=${mpmd_opt} -elif [ "${step}" = "atmanalrun" ]; then +elif [[ "${step}" = "atmanalrun" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -65,7 +65,7 @@ elif [ "${step}" = "atmanalrun" ]; then [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} export APRUN_ATMANAL="${launcher} -n ${npe_atmanalrun}" -elif [ "${step}" = "atmensanalrun" ]; then +elif [[ "${step}" = "atmensanalrun" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -77,7 +77,7 @@ elif [ "${step}" = "atmensanalrun" ]; then [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} export APRUN_ATMENSANAL="${launcher} -n ${npe_atmensanalrun}" -elif [ "${step}" = "aeroanlrun" ]; then +elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" @@ -116,7 +116,7 @@ elif [ "${step}" = "anal" -o "${step}" = "analcalc" ]; then npe_gausfcanl=${npe_gausfcanl:-1} export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" -elif [ "${step}" = "sfcanl" ]; then +elif [[ "${step}" = "sfcanl" ]]; then nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} @@ -124,7 +124,7 @@ elif [ "${step}" = "sfcanl" ]; then npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" -elif [ "${step}" = "gldas" ]; then +elif [[ "${step}" = "gldas" ]]; then export USE_CFP="NO" export CFP_MP="YES" @@ -145,7 +145,7 @@ elif [ "${step}" = "gldas" ]; then npe_gldas_data_proc=$((${gldas_spinup_hours} + 12)) export APRUN_GLDAS_DATA_PROC="${launcher} -n ${npe_gldas_data_proc} ${mpmd_opt}" -elif [ "${step}" = "eobs" ]; then +elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO @@ -160,7 +160,7 @@ elif [ "${step}" = "eobs" ]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" -elif [ "${step}" = "eupd" ]; then +elif [[ "${step}" = "eupd" ]]; then nth_max=$((${npe_node_max} / ${npe_node_eupd})) @@ -172,7 +172,7 @@ elif [ "${step}" = "eupd" ]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" -elif [ "${step}" = "fcst" ]; then +elif [[ "${step}" = "fcst" ]]; then #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs if [[ ${CDUMP} == "gfs" ]]; then @@ -197,7 +197,7 @@ elif [ "${step}" = "fcst" ]; then export APRUN_REMAP="${launcher} -n ${npe_remap:-${npe_fcst}}" export I_MPI_DAPL_UD="enable" -elif [ "${step}" = "efcs" ]; then +elif [[ "${step}" = "efcs" ]]; then nth_max=$((${npe_node_max} / ${npe_node_efcs})) @@ -210,7 +210,7 @@ elif [ "${step}" = "efcs" ]; then [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} export APRUN_REGRID_NEMSIO="${launcher} -n ${LEVS}" -elif [ "${step}" = "post" ]; then +elif [[ "${step}" = "post" ]]; then nth_max=$((${npe_node_max} / ${npe_node_post})) @@ -222,7 +222,7 @@ elif [ "${step}" = "post" ]; then [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} export APRUN_DWN="${launcher} -n ${npe_dwn}" -elif [ "${step}" = "ecen" ]; then +elif [[ "${step}" = "ecen" ]]; then nth_max=$((${npe_node_max} / ${npe_node_ecen})) @@ -238,7 +238,7 @@ elif [ "${step}" = "ecen" ]; then [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} export APRUN_CALCINC="${launcher} -n ${npe_ecen}" -elif [ "${step}" = "esfc" ]; then +elif [[ "${step}" = "esfc" ]]; then nth_max=$((${npe_node_max} / ${npe_node_esfc})) @@ -250,7 +250,7 @@ elif [ "${step}" = "esfc" ]; then [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} export APRUN_CYCLE="${launcher} -n ${npe_esfc}" -elif [ "${step}" = "epos" ]; then +elif [[ "${step}" = "epos" ]]; then nth_max=$((${npe_node_max} / ${npe_node_epos})) @@ -258,11 +258,11 @@ elif [ "${step}" = "epos" ]; then [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} export APRUN_EPOS="${launcher} -n ${npe_epos}" -elif [ "${step}" = "init" ]; then +elif [[ "${step}" = "init" ]]; then export APRUN="${launcher} -n ${npe_init}" -elif [ "${step}" = "postsnd" ]; then +elif [[ "${step}" = "postsnd" ]]; then nth_max=$((${npe_node_max} / ${npe_node_postsnd})) @@ -274,7 +274,7 @@ elif [ "${step}" = "postsnd" ]; then [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsnd} ${mpmd_opt}" -elif [ "${step}" = "awips" ]; then +elif [[ "${step}" = "awips" ]]; then nth_max=$((${npe_node_max} / ${npe_node_awips})) @@ -282,7 +282,7 @@ elif [ "${step}" = "awips" ]; then [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} ${mpmd_opt}" -elif [ "${step}" = "gempak" ]; then +elif [[ "${step}" = "gempak" ]]; then nth_max=$((${npe_node_max} / ${npe_node_gempak})) diff --git a/env/JET.env b/env/JET.env index 9774e3e8c0..7742263488 100755 --- a/env/JET.env +++ b/env/JET.env @@ -1,6 +1,6 @@ #!/bin/ksh -x -if [ $# -ne 1 ]; then +if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" @@ -42,11 +42,11 @@ if [ "${step}" = "prep" -o "${step}" = "prepbufr" ]; then elif [ "${step}" = "waveinit" -o "${step}" = "waveprep" -o "${step}" = "wavepostsbs" -o "${step}" = "wavepostbndpnt" -o "${step}" = "wavepostbndpntbll" -o "${step}" = "wavepostpnt" ]; then - if [ "${step}" = "waveprep" ]; then export MP_PULSE=0 ; fi + if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi export wavempexec=${launcher} export wave_mpmd=${mpmd_opt} -elif [ "${step}" = "atmanalrun" ]; then +elif [[ "${step}" = "atmanalrun" ]]; then nth_max=$((${npe_node_max} / ${npe_node_atmanalrun})) @@ -54,7 +54,7 @@ elif [ "${step}" = "atmanalrun" ]; then [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} export APRUN_ATMANAL="${launcher} ${npe_atmanalrun}" -elif [ "${step}" = "atmensanalrun" ]; then +elif [[ "${step}" = "atmensanalrun" ]]; then nth_max=$((${npe_node_max} / ${npe_node_atmensanalrun})) @@ -62,7 +62,7 @@ elif [ "${step}" = "atmensanalrun" ]; then [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} export APRUN_ATMENSANAL="${launcher} ${npe_atmensanalrun}" -elif [ "${step}" = "anal" ]; then +elif [[ "${step}" = "anal" ]]; then nth_max=$((${npe_node_max} / ${npe_node_anal})) @@ -83,7 +83,7 @@ elif [ "${step}" = "anal" ]; then npe_gausfcanl=${npe_gausfcanl:-1} export APRUN_GAUSFCANL="${launcher} ${npe_gausfcanl}" -elif [ "${step}" = "sfcanl" ]; then +elif [[ "${step}" = "sfcanl" ]]; then nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} @@ -91,7 +91,7 @@ elif [ "${step}" = "sfcanl" ]; then npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} ${npe_sfcanl}" -elif [ "${step}" = "gldas" ]; then +elif [[ "${step}" = "gldas" ]]; then nth_max=$((${npe_node_max} / ${npe_node_gldas})) @@ -103,7 +103,7 @@ elif [ "${step}" = "gldas" ]; then [[ ${NTHREADS_GAUSSIAN} -gt ${nth_max} ]] && export NTHREADS_GAUSSIAN=${nth_max} export APRUN_GAUSSIAN="${launcher} ${npe_gaussian}" -elif [ "${step}" = "eobs" ]; then +elif [[ "${step}" = "eobs" ]]; then nth_max=$((${npe_node_max} / ${npe_node_eobs})) @@ -111,7 +111,7 @@ elif [ "${step}" = "eobs" ]; then [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} export APRUN_GSI="${launcher} ${npe_gsi:-${npe_eobs:-${PBS_NP}}}" -elif [ "${step}" = "eupd" ]; then +elif [[ "${step}" = "eupd" ]]; then nth_max=$((${npe_node_max} / ${npe_node_eupd})) @@ -119,7 +119,7 @@ elif [ "${step}" = "eupd" ]; then [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} export APRUN_ENKF="${launcher} ${npe_enkf:-${npe_eupd:-${PBS_NP}}}" -elif [ "${step}" = "fcst" ]; then +elif [[ "${step}" = "fcst" ]]; then #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs if [[ ${CDUMP} == "gfs" ]]; then @@ -144,7 +144,7 @@ elif [ "${step}" = "fcst" ]; then export APRUN_REMAP="${launcher} ${npe_remap:-${npe_fcst:-${PBS_NP}}}" export I_MPI_DAPL_UD="enable" -elif [ "${step}" = "efcs" ]; then +elif [[ "${step}" = "efcs" ]]; then nth_max=$((${npe_node_max} / ${npe_node_efcs})) @@ -157,7 +157,7 @@ elif [ "${step}" = "efcs" ]; then [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} export APRUN_REGRID_NEMSIO="${launcher} ${LEVS}" -elif [ "${step}" = "post" ]; then +elif [[ "${step}" = "post" ]]; then nth_max=$((${npe_node_max} / ${npe_node_post})) @@ -169,7 +169,7 @@ elif [ "${step}" = "post" ]; then [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} export APRUN_NP="${launcher}" -elif [ "${step}" = "ecen" ]; then +elif [[ "${step}" = "ecen" ]]; then nth_max=$((${npe_node_max} / ${npe_node_ecen})) @@ -185,7 +185,7 @@ elif [ "${step}" = "ecen" ]; then [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} export APRUN_CALCINC="${launcher} ${npe_ecen:-${PBS_NP}}" -elif [ "${step}" = "esfc" ]; then +elif [[ "${step}" = "esfc" ]]; then nth_max=$((${npe_node_max} / ${npe_node_esfc})) @@ -198,7 +198,7 @@ elif [ "${step}" = "esfc" ]; then export APRUN_CYCLE="${launcher} ${npe_esfc}" -elif [ "${step}" = "epos" ]; then +elif [[ "${step}" = "epos" ]]; then nth_max=$((${npe_node_max} / ${npe_node_epos})) @@ -206,11 +206,11 @@ elif [ "${step}" = "epos" ]; then [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} export APRUN_EPOS="${launcher} ${npe_epos:-${PBS_NP}}" -elif [ "${step}" = "init" ]; then +elif [[ "${step}" = "init" ]]; then export APRUN="${launcher}" -elif [ "${step}" = "postsnd" ]; then +elif [[ "${step}" = "postsnd" ]]; then nth_max=$((${npe_node_max} / ${npe_node_postsnd})) @@ -222,11 +222,11 @@ elif [ "${step}" = "postsnd" ]; then [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} export APRUN_POSTSNDCFP="${launcher} ${npe_postsndcfp}" -elif [ "${step}" = "awips" ]; then +elif [[ "${step}" = "awips" ]]; then echo "WARNING: ${step} is not enabled on ${machine}!" -elif [ "${step}" = "gempak" ]; then +elif [[ "${step}" = "gempak" ]]; then echo "WARNING: ${step} is not enabled on ${machine}!" diff --git a/env/ORION.env b/env/ORION.env index 5275922072..0689b936a7 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -1,6 +1,6 @@ #! /usr/bin/env bash -if [ $# -ne 1 ]; then +if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" @@ -48,11 +48,11 @@ if [ "${step}" = "prep" -o "${step}" = "prepbufr" ]; then elif [ "${step}" = "waveinit" -o "${step}" = "waveprep" -o "${step}" = "wavepostsbs" -o "${step}" = "wavepostbndpnt" -o "${step}" = "wavepostpnt" ]; then export CFP_MP="YES" - if [ "${step}" = "waveprep" ]; then export MP_PULSE=0 ; fi + if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi export wavempexec=${launcher} export wave_mpmd=${mpmd_opt} -elif [ "${step}" = "atmanalrun" ]; then +elif [[ "${step}" = "atmanalrun" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -64,7 +64,7 @@ elif [ "${step}" = "atmanalrun" ]; then [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} export APRUN_ATMANAL="${launcher} -n ${npe_atmanalrun}" -elif [ "${step}" = "atmensanalrun" ]; then +elif [[ "${step}" = "atmensanalrun" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -76,7 +76,7 @@ elif [ "${step}" = "atmensanalrun" ]; then [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} export APRUN_ATMENSANAL="${launcher} -n ${npe_atmensanalrun}" -elif [ "${step}" = "aeroanlrun" ]; then +elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" @@ -114,7 +114,7 @@ elif [ "${step}" = "anal" -o "${step}" = "analcalc" ]; then npe_gausfcanl=${npe_gausfcanl:-1} export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" -elif [ "${step}" = "sfcanl" ]; then +elif [[ "${step}" = "sfcanl" ]]; then nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} @@ -122,7 +122,7 @@ elif [ "${step}" = "sfcanl" ]; then npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" -elif [ "${step}" = "gldas" ]; then +elif [[ "${step}" = "gldas" ]]; then export USE_CFP="NO" @@ -142,7 +142,7 @@ elif [ "${step}" = "gldas" ]; then npe_gldas_data_proc=$((${gldas_spinup_hours} + 12)) export APRUN_GLDAS_DATA_PROC="${launcher} -n ${npe_gldas_data_proc} ${mpmd_opt}" -elif [ "${step}" = "eobs" ]; then +elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO @@ -157,7 +157,7 @@ elif [ "${step}" = "eobs" ]; then [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}}" -elif [ "${step}" = "eupd" ]; then +elif [[ "${step}" = "eupd" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -169,7 +169,7 @@ elif [ "${step}" = "eupd" ]; then [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}}" -elif [ "${step}" = "fcst" ]; then +elif [[ "${step}" = "fcst" ]]; then #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs if [[ ${CDUMP} == "gfs" ]]; then @@ -194,7 +194,7 @@ elif [ "${step}" = "fcst" ]; then export APRUN_REMAP="${launcher} -n ${npe_remap:-${npe_fcst}}" export I_MPI_DAPL_UD="enable" -elif [ "${step}" = "efcs" ]; then +elif [[ "${step}" = "efcs" ]]; then nth_max=$((${npe_node_max} / ${npe_node_efcs})) @@ -207,7 +207,7 @@ elif [ "${step}" = "efcs" ]; then [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} export APRUN_REGRID_NEMSIO="${launcher} -n ${LEVS}" -elif [ "${step}" = "post" ]; then +elif [[ "${step}" = "post" ]]; then nth_max=$((${npe_node_max} / ${npe_node_post})) @@ -219,7 +219,7 @@ elif [ "${step}" = "post" ]; then [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} export APRUN_DWN="${launcher} -n ${npe_dwn}" -elif [ "${step}" = "ecen" ]; then +elif [[ "${step}" = "ecen" ]]; then nth_max=$((${npe_node_max} / ${npe_node_ecen})) @@ -235,7 +235,7 @@ elif [ "${step}" = "ecen" ]; then [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} export APRUN_CALCINC="${launcher} -n ${npe_ecen}" -elif [ "${step}" = "esfc" ]; then +elif [[ "${step}" = "esfc" ]]; then nth_max=$((${npe_node_max} / ${npe_node_esfc})) @@ -247,7 +247,7 @@ elif [ "${step}" = "esfc" ]; then [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} export APRUN_CYCLE="${launcher} -n ${npe_esfc}" -elif [ "${step}" = "epos" ]; then +elif [[ "${step}" = "epos" ]]; then nth_max=$((${npe_node_max} / ${npe_node_epos})) @@ -255,11 +255,11 @@ elif [ "${step}" = "epos" ]; then [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} export APRUN_EPOS="${launcher} -n ${npe_epos}" -elif [ "${step}" = "init" ]; then +elif [[ "${step}" = "init" ]]; then export APRUN="${launcher} -n ${npe_init}" -elif [ "${step}" = "postsnd" ]; then +elif [[ "${step}" = "postsnd" ]]; then nth_max=$((${npe_node_max} / ${npe_node_postsnd})) @@ -271,7 +271,7 @@ elif [ "${step}" = "postsnd" ]; then [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsnd} ${mpmd_opt}" -elif [ "${step}" = "awips" ]; then +elif [[ "${step}" = "awips" ]]; then nth_max=$((${npe_node_max} / ${npe_node_awips})) @@ -279,7 +279,7 @@ elif [ "${step}" = "awips" ]; then [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} ${mpmd_opt}" -elif [ "${step}" = "gempak" ]; then +elif [[ "${step}" = "gempak" ]]; then nth_max=$((${npe_node_max} / ${npe_node_gempak})) diff --git a/env/S4.env b/env/S4.env index 16b7df0825..125e98b0da 100755 --- a/env/S4.env +++ b/env/S4.env @@ -1,6 +1,6 @@ #!/bin/bash -x -if [ $# -ne 1 ]; then +if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 948c7f2a4f..79bd9a271b 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -1,6 +1,6 @@ #! /usr/bin/env bash -if [ $# -ne 1 ]; then +if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" @@ -39,7 +39,7 @@ elif [ "${step}" = "waveinit" -o "${step}" = "waveprep" -o "${step}" = "wavepost export wavempexec="${launcher} -np" export wave_mpmd=${mpmd_opt} -elif [ "${step}" = "atmanalrun" ]; then +elif [[ "${step}" = "atmanalrun" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -51,7 +51,7 @@ elif [ "${step}" = "atmanalrun" ]; then [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} export APRUN_ATMANAL="${launcher} -n ${npe_atmanalrun}" -elif [ "${step}" = "atmensanalrun" ]; then +elif [[ "${step}" = "atmensanalrun" ]]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -63,7 +63,7 @@ elif [ "${step}" = "atmensanalrun" ]; then [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} export APRUN_ATMENSANAL="${launcher} -n ${npe_atmensanalrun}" -elif [ "${step}" = "aeroanlrun" ]; then +elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" @@ -79,7 +79,7 @@ elif [ "${step}" = "anal" -o "${step}" = "analcalc" ]; then export OMP_STACKSIZE=1G export FI_OFI_RXM_SAR_LIMIT=3145728 - if [ "${step}" = "analcalc" ]; then + if [[ "${step}" = "analcalc" ]]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" fi @@ -110,7 +110,7 @@ elif [ "${step}" = "anal" -o "${step}" = "analcalc" ]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" -elif [ "${step}" = "sfcanl" ]; then +elif [[ "${step}" = "sfcanl" ]]; then nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) @@ -119,7 +119,7 @@ elif [ "${step}" = "sfcanl" ]; then npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" -elif [ "${step}" = "gldas" ]; then +elif [[ "${step}" = "gldas" ]]; then export USE_CFP="YES" export CFP_MP="NO" @@ -140,7 +140,7 @@ elif [ "${step}" = "gldas" ]; then npe_gldas_data_proc=$((${gldas_spinup_hours} + 12)) export APRUN_GLDAS_DATA_PROC="${launcher} -np ${npe_gldas_data_proc} ${mpmd_opt}" -elif [ "${step}" = "eobs" ]; then +elif [[ "${step}" = "eobs" ]]; then export OMP_PLACES=cores export OMP_STACKSIZE=1G @@ -156,7 +156,7 @@ elif [ "${step}" = "eobs" ]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" -elif [ "${step}" = "eupd" ]; then +elif [[ "${step}" = "eupd" ]]; then export OMP_PLACES=cores export OMP_STACKSIZE=2G @@ -173,7 +173,7 @@ elif [ "${step}" = "eupd" ]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" -elif [ "${step}" = "fcst" ]; then +elif [[ "${step}" = "fcst" ]]; then export OMP_PLACES=cores export OMP_STACKSIZE=2048M @@ -203,7 +203,7 @@ elif [ "${step}" = "fcst" ]; then export APRUN_REMAP="${launcher} -n ${npe_remap:-${npe_fcst}}" export I_MPI_DAPL_UD="enable" -elif [ "${step}" = "efcs" ]; then +elif [[ "${step}" = "efcs" ]]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" export FI_OFI_RXM_SAR_LIMIT=3145728 @@ -221,7 +221,7 @@ elif [ "${step}" = "efcs" ]; then [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} export APRUN_REGRID_NEMSIO="${launcher} -n ${LEVS}" -elif [ "${step}" = "post" ]; then +elif [[ "${step}" = "post" ]]; then nth_max=$((${npe_node_max} / ${npe_node_post})) @@ -233,7 +233,7 @@ elif [ "${step}" = "post" ]; then [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} export APRUN_DWN="${launcher} -np ${npe_dwn} ${mpmd_opt}" -elif [ "${step}" = "ecen" ]; then +elif [[ "${step}" = "ecen" ]]; then nth_max=$((${npe_node_max} / ${npe_node_ecen})) @@ -253,7 +253,7 @@ elif [ "${step}" = "ecen" ]; then [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} export APRUN_CYCLE="${launcher} -n ${npe_ecen} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" -elif [ "${step}" = "esfc" ]; then +elif [[ "${step}" = "esfc" ]]; then nth_max=$((${npe_node_max} / ${npe_node_esfc})) @@ -265,7 +265,7 @@ elif [ "${step}" = "esfc" ]; then [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} export APRUN_CYCLE="${launcher} -n ${npe_esfc} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" -elif [ "${step}" = "epos" ]; then +elif [[ "${step}" = "epos" ]]; then nth_max=$((${npe_node_max} / ${npe_node_epos})) @@ -273,11 +273,11 @@ elif [ "${step}" = "epos" ]; then [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} export APRUN_EPOS="${launcher} -n ${npe_epos} -ppn ${npe_node_epos} --cpu-bind depth --depth ${NTHREADS_EPOS}" -elif [ "${step}" = "init" ]; then +elif [[ "${step}" = "init" ]]; then export APRUN="${launcher}" -elif [ "${step}" = "postsnd" ]; then +elif [[ "${step}" = "postsnd" ]]; then export MPICH_MPIIO_HINTS_DISPLAY=1 export OMP_NUM_THREADS=1 @@ -292,7 +292,7 @@ elif [ "${step}" = "postsnd" ]; then [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} export APRUN_POSTSNDCFP="${launcher} -np ${npe_postsndcfp} ${mpmd_opt}" -elif [ "${step}" = "awips" ]; then +elif [[ "${step}" = "awips" ]]; then nth_max=$((${npe_node_max} / ${npe_node_awips})) @@ -300,7 +300,7 @@ elif [ "${step}" = "awips" ]; then [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} export APRUN_AWIPSCFP="${launcher} -np ${npe_awips} ${mpmd_opt}" -elif [ "${step}" = "gempak" ]; then +elif [[ "${step}" = "gempak" ]]; then nth_max=$((${npe_node_max} / ${npe_node_gempak})) @@ -308,7 +308,7 @@ elif [ "${step}" = "gempak" ]; then [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} export APRUN_GEMPAKCFP="${launcher} -np ${npe_gempak} ${mpmd_opt}" -elif [ "${step}" = "waveawipsbulls" ]; then +elif [[ "${step}" = "waveawipsbulls" ]]; then unset PERL5LIB