diff --git a/jobs/rocoto/ocnpost.sh b/jobs/rocoto/ocnpost.sh index e674e1c4df..0ad27afb04 100755 --- a/jobs/rocoto/ocnpost.sh +++ b/jobs/rocoto/ocnpost.sh @@ -44,7 +44,7 @@ done fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') export OMP_NUM_THREADS=1 -export ENSMEM=${ENSMEM:-01} +export ENSMEM=${ENSMEM:-000} export IDATE=${PDY}${cyc} diff --git a/parm/config/gefs/config.aero b/parm/config/gefs/config.aero new file mode 120000 index 0000000000..9cf5cce080 --- /dev/null +++ b/parm/config/gefs/config.aero @@ -0,0 +1 @@ +../gfs/config.aero \ No newline at end of file diff --git a/parm/config/gefs/config.base.emc.dyn b/parm/config/gefs/config.base.emc.dyn index 49c8ef3686..da9e28e4a3 100644 --- a/parm/config/gefs/config.base.emc.dyn +++ b/parm/config/gefs/config.base.emc.dyn @@ -276,6 +276,11 @@ export DO_MERGENSST="NO" # Hybrid related export NMEM_ENS=@NMEM_ENS@ +# set default member number memdir for control +# this will be overwritten for the perturbed members +export ENSMEM="000" +export MEMDIR="mem${ENSMEM}" + # Check if cycle is cold starting if [[ "${EXP_WARM_START}" = ".false." ]]; then export IAU_FHROT=0 diff --git a/parm/config/gefs/config.defaults.s2sw b/parm/config/gefs/config.defaults.s2sw new file mode 120000 index 0000000000..797a1e9ebd --- /dev/null +++ b/parm/config/gefs/config.defaults.s2sw @@ -0,0 +1 @@ +../gfs/config.defaults.s2sw \ No newline at end of file diff --git a/parm/config/gefs/config.efcs b/parm/config/gefs/config.efcs index 76a2595a16..e2aefaf47a 100644 --- a/parm/config/gefs/config.efcs +++ b/parm/config/gefs/config.efcs @@ -5,12 +5,6 @@ echo "BEGIN: config.efcs" -# TODO: the _ENKF counterparts need to be defined in config.base -export DO_AERO=${DO_AERO_ENKF:-"NO"} -export DO_OCN=${DO_OCN_ENKF:-"NO"} -export DO_ICE=${DO_ICE_ENKF:-"NO"} -export DO_WAVE=${DO_WAVE_ENKF:-"NO"} - # TODO: Possibly need OCNRES_ENKF, ICERES_ENKF, WAVRES_ENKF too if [[ ${DO_OCN} == "YES" ]]; then case "${CASE_ENS}" in @@ -66,7 +60,6 @@ export SPPT_LSCALE=500000. export SPPT_LOGIT=".true." export SPPT_SFCLIMIT=".true." -# FV3 model namelist parameters to over-ride export restart_interval=${restart_interval:-6} echo "END: config.efcs" diff --git a/parm/config/gefs/config.ice b/parm/config/gefs/config.ice new file mode 120000 index 0000000000..39385a1cb4 --- /dev/null +++ b/parm/config/gefs/config.ice @@ -0,0 +1 @@ +../gfs/config.ice \ No newline at end of file diff --git a/parm/config/gefs/config.ocn b/parm/config/gefs/config.ocn new file mode 120000 index 0000000000..d9ab25be5e --- /dev/null +++ b/parm/config/gefs/config.ocn @@ -0,0 +1 @@ +../gfs/config.ocn \ No newline at end of file diff --git a/parm/config/gefs/config.wave b/parm/config/gefs/config.wave new file mode 120000 index 0000000000..0b9d14a962 --- /dev/null +++ b/parm/config/gefs/config.wave @@ -0,0 +1 @@ +../gfs/config.wave \ No newline at end of file diff --git a/parm/config/gfs/config.aero b/parm/config/gfs/config.aero index 1cb3bf5679..2eb674af3f 100644 --- a/parm/config/gfs/config.aero +++ b/parm/config/gfs/config.aero @@ -2,11 +2,14 @@ # UFS-Aerosols settings +# Turn off warnings about unused variables +# shellcheck disable=SC2034 + # Directory containing GOCART configuration files. Defaults to parm/chem if unset. -AERO_CONFIG_DIR=$HOMEgfs/parm/chem +AERO_CONFIG_DIR=${HOMEgfs}/parm/chem # Path to the input data tree -case $machine in +case ${machine} in "HERA") AERO_INPUTS_DIR="/scratch1/NCEPDEV/global/glopara/data/gocart_emissions" ;; @@ -23,7 +26,7 @@ case $machine in AERO_INPUTS_DIR="/lfs4/HFIP/hfv3gfs/glopara/data/gocart_emissions" ;; *) - echo "FATAL ERROR: Machine $machine unsupported for aerosols" + echo "FATAL ERROR: Machine ${machine} unsupported for aerosols" exit 2 ;; esac diff --git a/parm/config/gfs/config.defaults.s2sw b/parm/config/gfs/config.defaults.s2sw index 1b0becefec..bfbeb01e2d 100644 --- a/parm/config/gfs/config.defaults.s2sw +++ b/parm/config/gfs/config.defaults.s2sw @@ -2,6 +2,9 @@ # Empty variables must include a space otherwise they will be overwritten +# Turn off warnings about unused variables +# shellcheck disable=SC2034 + # config.base FHMAX_GFS_00=48 FHMAX_GFS_06=48 diff --git a/scripts/exgdas_enkf_earc.sh b/scripts/exgdas_enkf_earc.sh index 8f1928042f..1bb941f888 100755 --- a/scripts/exgdas_enkf_earc.sh +++ b/scripts/exgdas_enkf_earc.sh @@ -234,7 +234,7 @@ if [[ "${ENSGRP}" -eq 0 ]]; then # shellcheck disable=SC2312 templates=$(compgen -A variable | grep 'COM_OCEAN_.*_TMPL') for template in ${templates}; do - YMEMDIR="${mem}" MD="${gPDY}" HH="${gcyc}" generate_com "directory:${template}" + MEMDIR="${mem}" YMD="${gPDY}" HH="${gcyc}" generate_com "directory:${template}" remove_files "${directory}" "${exclude_list[@]}" done diff --git a/scripts/exgdas_enkf_fcst.sh b/scripts/exgdas_enkf_fcst.sh index d2e3b9f73c..a9ee7be9bc 100755 --- a/scripts/exgdas_enkf_fcst.sh +++ b/scripts/exgdas_enkf_fcst.sh @@ -112,16 +112,17 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do cd "${DATATOP}" - cmem=$(printf %03i "${imem}") - memchar="mem${cmem}" + ENSMEM=$(printf %03i "${imem}") + export ENSMEM + memchar="mem${ENSMEM}" - echo "Processing MEMBER: ${cmem}" + echo "Processing MEMBER: ${ENSMEM}" ra=0 skip_mem="NO" if [[ -f ${EFCSGRP}.fail ]]; then - memstat=$(grep "MEMBER ${cmem}" "${EFCSGRP}.fail" | grep -c "PASS") + memstat=$(grep "MEMBER ${ENSMEM}" "${EFCSGRP}.fail" | grep -c "PASS") [[ ${memstat} -eq 1 ]] && skip_mem="YES" fi @@ -166,7 +167,7 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do # Notify a member forecast failed and abort if [[ ${ra} -ne 0 ]]; then - err_exit "FATAL ERROR: forecast of member ${cmem} FAILED. Aborting job" + err_exit "FATAL ERROR: forecast of member ${ENSMEM} FAILED. Aborting job" fi rc=$((rc+ra)) @@ -192,9 +193,9 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do [[ -f log ]] && rm log [[ -f log_new ]] && rm log_new if [[ ${ra} -ne 0 ]]; then - echo "MEMBER ${cmem} : FAIL" > log + echo "MEMBER ${ENSMEM} : FAIL" > log else - echo "MEMBER ${cmem} : PASS" > log + echo "MEMBER ${ENSMEM} : PASS" > log fi if [[ -s log_old ]] ; then cat log_old log > log_new diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index a251a44e83..92113d8bfc 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -502,8 +502,8 @@ FV3_out() { done local idate=$(date -d "${idate:0:8} ${idate:8:2} + ${restart_interval} hours" +%Y%m%d%H) done - elif [[ ${RUN} =~ "gfs" ]]; then - # No need to copy FV3 restart files when RUN=gfs + else + # No need to copy FV3 restart files when RUN=gfs or gefs ${NCP} "${DATA}/input.nml" "${COM_ATMOS_HISTORY}/input.nml" fi echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied" @@ -736,11 +736,10 @@ MOM6_postdet() { [[ ! -d ${COM_OCEAN_HISTORY} ]] && mkdir -p "${COM_OCEAN_HISTORY}" # Link output files - if [[ "${RUN}" =~ "gfs" ]]; then + if [[ "${RUN}" =~ "gfs" || "${RUN}" =~ "gefs" ]]; then # Link output files for RUN = gfs # TODO: get requirements on what files need to be written out and what these dates here are and what they mean - export ENSMEM=${ENSMEM:-01} if [[ ! -d ${COM_OCEAN_HISTORY} ]]; then mkdir -p "${COM_OCEAN_HISTORY}"; fi @@ -875,7 +874,7 @@ CICE_postdet() { if [[ "${RUN}" =~ "gdas" ]]; then cice_hist_avg=".false." # DA needs instantaneous - elif [[ "${RUN}" =~ "gfs" ]]; then + else cice_hist_avg=".true." # P8 wants averaged over histfreq_n fi @@ -914,14 +913,12 @@ CICE_postdet() { if [[ ! -d "${COM_ICE_HISTORY}" ]]; then mkdir -p "${COM_ICE_HISTORY}"; fi mkdir -p "${COM_ICE_RESTART}" - if [[ "${RUN}" =~ "gfs" ]]; then + if [[ "${RUN}" =~ "gfs" || "${RUN}" =~ "gefs" ]]; then # Link output files for RUN = gfs # TODO: make these forecast output files consistent w/ GFS output # TODO: Work w/ NB to determine appropriate naming convention for these files - export ENSMEM=${ENSMEM:-01} - # TODO: consult w/ NB on how to improve on this. Gather requirements and more information on what these files are and how they are used to properly catalog them local vdate seconds vdatestr fhr last_fhr for fhr in ${FV3_OUTPUT_FH}; do diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index c9455e2cc2..eb881b70bf 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -52,6 +52,7 @@ common_predet(){ CDUMP=${CDUMP:-gdas} CASE=${CASE:-C768} CDATE=${CDATE:-2017032500} + ENSMEM=${ENSMEM:-000} FCSTEXECDIR=${FCSTEXECDIR:-${HOMEgfs}/exec} FCSTEXEC=${FCSTEXEC:-ufs_model.x}