Skip to content

Commit

Permalink
Apply lint fixes. NOAA-EMC#138
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Sep 19, 2022
1 parent 84abbed commit 6da1f7d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export job=${PBS_JOBNAME:-${step}}
export jobid=${job}.${PBS_JOBID:-$$}


if [ ${step} = "prep" ] || [ ${step} = "prepbufr" ]; then
if [[ ${step} = "prep" || ${step} = "prepbufr" ]]; then

nth_max=$((npe_node_max / npe_node_prep))

Expand All @@ -52,11 +52,11 @@ elif [[ ${step} = "waveinit" || ${step} = "waveprep" || ${step} = "wavepostsbs"

export mpmd="--multi-prog"
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}

elif [ ${step} = "atmanalrun" ]; then
elif [[ ${step} = "atmanalrun" ]]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
Expand All @@ -68,7 +68,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"}
Expand All @@ -80,7 +80,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 --multi-prog"

Expand All @@ -90,7 +90,7 @@ elif [ ${step} = "aeroanlrun" ]; then
[[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max}
export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}"

elif [ ${step} = "anal" ]; then
elif [[ ${step} = "anal" ]]; then

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand Down Expand Up @@ -119,15 +119,15 @@ elif [ ${step} = "anal" ]; 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}
[[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max}
npe_sfcanl=${ntiles:-6}
export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}"

elif [ ${step} = "gldas" ]; then
elif [[ ${step} = "gldas" ]]; then

nth_max=$((npe_node_max / npe_node_gldas))

Expand All @@ -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} --multi-prog"

elif [ ${step} = "eobs" ]; then
elif [[ ${step} = "eobs" ]]; then

export MKL_NUM_THREADS=4
export MKL_CBWR=AUTO
Expand All @@ -160,7 +160,7 @@ elif [ ${step} = "eobs" ]; then
[[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max}
export APRUN_GSI=${launcher}

elif [ ${step} = "eupd" ]; then
elif [[ ${step} = "eupd" ]]; then

export CFP_MP=${CFP_MP:-"YES"}
export USE_CFP=${USE_CFP:-"YES"}
Expand All @@ -172,7 +172,7 @@ elif [ ${step} = "eupd" ]; then
[[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max}
export APRUN_ENKF=${launcher}

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
Expand All @@ -197,7 +197,7 @@ elif [ ${step} = "fcst" ]; then
export APRUN_REMAP=${launcher}
export I_MPI_DAPL_UD="enable"

elif [ ${step} = "efcs" ]; then
elif [[ ${step} = "efcs" ]]; then

nth_max=$((npe_node_max / npe_node_efcs))

Expand All @@ -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} ${LEVS}"

elif [ ${step} = "post" ]; then
elif [[ ${step} = "post" ]]; then

nth_max=$((npe_node_max / npe_node_post))

Expand All @@ -222,7 +222,7 @@ elif [ ${step} = "post" ]; then
[[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max}
export APRUN_DWN=${launcher}

elif [ ${step} = "ecen" ]; then
elif [[ ${step} = "ecen" ]]; then

nth_max=$((npe_node_max / npe_node_ecen))

Expand All @@ -238,7 +238,7 @@ elif [ ${step} = "ecen" ]; then
[[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max}
export APRUN_CALCINC=${launcher}

elif [ ${step} = "esfc" ]; then
elif [[ ${step} = "esfc" ]]; then

nth_max=$((npe_node_max / npe_node_esfc))

Expand All @@ -250,19 +250,19 @@ 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))

export NTHREADS_EPOS=${nth_epos:-${nth_max}}
[[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max}
export APRUN_EPOS=${launcher}

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))

Expand All @@ -274,11 +274,11 @@ elif [ ${step} = "postsnd" ]; then
[[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max}
export APRUN_POSTSNDCFP=${launcher}

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}!"
fi

0 comments on commit 6da1f7d

Please sign in to comment.