From 74d9c00d969307cc193cbc5630fc91f5a40af0b7 Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Tue, 18 Jul 2023 02:16:27 -0500 Subject: [PATCH 1/8] Support coupled GEFS forecast, use mem000 for GEFS control Makes the necessary updates to allow the workflow to run (non-wave) coupled forecasts. Some of the coupled functions in postdet had to be updated because they only checked for gfs and gdas runs, so necessary code was never executed. Also updates so that the GEFS control uses `mem000` as the memdir so it appears at the same level as the perturbed members. Relatedly, the default member number in coupled files is changed to 000 instead of 01. Finally, an unrelated error in the earc job is corrected where a character from the middle of the line was moved to the beginning. Resolves #1754 --- parm/config/gefs/config.aero | 40 +++++ parm/config/gefs/config.base.emc.dyn | 5 + parm/config/gefs/config.defaults.s2sw | 26 ++++ parm/config/gefs/config.efcs | 9 +- parm/config/gefs/config.ice | 5 + parm/config/gefs/config.ocn | 23 +++ parm/config/gefs/config.wave | 202 ++++++++++++++++++++++++++ scripts/exgdas_enkf_earc.sh | 2 +- scripts/exgdas_enkf_fcst.sh | 14 +- ush/forecast_postdet.sh | 20 +-- 10 files changed, 323 insertions(+), 23 deletions(-) create mode 100644 parm/config/gefs/config.aero create mode 100644 parm/config/gefs/config.defaults.s2sw create mode 100644 parm/config/gefs/config.ice create mode 100644 parm/config/gefs/config.ocn create mode 100644 parm/config/gefs/config.wave diff --git a/parm/config/gefs/config.aero b/parm/config/gefs/config.aero new file mode 100644 index 0000000000..1cb3bf5679 --- /dev/null +++ b/parm/config/gefs/config.aero @@ -0,0 +1,40 @@ +#! /usr/bin/env bash + +# UFS-Aerosols settings + +# Directory containing GOCART configuration files. Defaults to parm/chem if unset. +AERO_CONFIG_DIR=$HOMEgfs/parm/chem + +# Path to the input data tree +case $machine in + "HERA") + AERO_INPUTS_DIR="/scratch1/NCEPDEV/global/glopara/data/gocart_emissions" + ;; + "ORION") + AERO_INPUTS_DIR="/work2/noaa/global/wkolczyn/noscrub/global-workflow/gocart_emissions" + ;; + "S4") + AERO_INPUTS_DIR="/data/prod/glopara/gocart_emissions" + ;; + "WCOSS2") + AERO_INPUTS_DIR="/lfs/h2/emc/global/noscrub/emc.global/data/gocart_emissions" + ;; + "JET") + AERO_INPUTS_DIR="/lfs4/HFIP/hfv3gfs/glopara/data/gocart_emissions" + ;; + *) + echo "FATAL ERROR: Machine $machine unsupported for aerosols" + exit 2 + ;; +esac + +# Biomass burning emission dataset. Choose from: GBBEPx, QFED, NONE (default) +AERO_EMIS_FIRE=QFED + +# Aerosol convective scavenging factors (list of string array elements) +# Element syntax: ':'. Use = * to set default factor for all aerosol tracers +# Scavenging factors are set to 0 (no scavenging) if unset +aero_conv_scav_factors="'*:0.3','so2:0.0','msa:0.0','dms:0.0','nh3:0.4','nh4:0.6','bc1:0.6','bc2:0.6','oc1:0.4','oc2:0.4','dust1:0.6','dust2:0.6', 'dust3:0.6','dust4:0.6','dust5:0.6','seas1:0.5','seas2:0.5','seas3:0.5','seas4:0.5','seas5:0.5'" +# +# Number of diagnostic aerosol tracers (default: 0) +aero_diag_tracers=2 diff --git a/parm/config/gefs/config.base.emc.dyn b/parm/config/gefs/config.base.emc.dyn index 49c8ef3686..37fcb9ac6a 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 MEMNUM="000" +export MEMDIR="mem${MEMNUM}" + # 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 100644 index 0000000000..1b0becefec --- /dev/null +++ b/parm/config/gefs/config.defaults.s2sw @@ -0,0 +1,26 @@ +#! /usr/bin/env bash + +# Empty variables must include a space otherwise they will be overwritten + +# config.base +FHMAX_GFS_00=48 +FHMAX_GFS_06=48 +FHMAX_GFS_12=48 +FHMAX_GFS_18=48 +FHOUT_GFS=6 +FHOUT_HF_GFS=-1 + +# config.fcst +min_seaice="1.0e-6" +use_cice_alb=".true." + +# config.wave +FHOUT_HF_WAV=3 +DTPNT_WAV=10800 +OUTPARS_WAV="WND CUR ICE HS T01 T02 DIR FP DP PHS PTP PDIR CHA" +DOBNDPNT_WAVE='NO' + +# config.arch +export ARCH_GAUSSIAN="YES" +export ARCH_GAUSSIAN_FHMAX=${FHMAX_GFS_00} +export ARCH_GAUSSIAN_FHINC=${FHOUT_GFS} diff --git a/parm/config/gefs/config.efcs b/parm/config/gefs/config.efcs index 76a2595a16..660a06ce3b 100644 --- a/parm/config/gefs/config.efcs +++ b/parm/config/gefs/config.efcs @@ -6,10 +6,10 @@ 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"} +# 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 @@ -66,7 +66,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 100644 index 0000000000..7bc1f80966 --- /dev/null +++ b/parm/config/gefs/config.ice @@ -0,0 +1,5 @@ +#! /usr/bin/env bash + +echo "BEGIN: config.ice" + +echo "END: config.ice" diff --git a/parm/config/gefs/config.ocn b/parm/config/gefs/config.ocn new file mode 100644 index 0000000000..7d14e3dd52 --- /dev/null +++ b/parm/config/gefs/config.ocn @@ -0,0 +1,23 @@ +#! /usr/bin/env bash + +echo "BEGIN: config.ocn" + +# MOM_input template to use +export MOM_INPUT="MOM_input_template_${OCNRES}" + +export DO_OCN_SPPT="NO" # In MOM_input, this variable is determines OCN_SPPT (OCN_SPPT = True|False) +export DO_OCN_PERT_EPBL="NO" # In MOM_input, this variable determines PERT_EPBL (PERT_EPBL = True|False) + +# Templated variables in MOM_input_template +export MOM6_USE_LI2016="True" # set to False for restart reproducibility +export MOM6_THERMO_SPAN="False" +export MOM6_ALLOW_LANDMASK_CHANGES="False" + +if [[ "${DO_JEDIOCNVAR}" == "YES" ]]; then + export ODA_INCUPD="True" +else + export ODA_INCUPD="False" +fi +export ODA_INCUPD_NHOURS="3.0" # In MOM_input, this is time interval for applying increment + +echo "END: config.ocn" diff --git a/parm/config/gefs/config.wave b/parm/config/gefs/config.wave new file mode 100644 index 0000000000..a0c0156166 --- /dev/null +++ b/parm/config/gefs/config.wave @@ -0,0 +1,202 @@ +#! /usr/bin/env bash + +########## config.wave ########## +# Wave steps specific + +echo "BEGIN: config.wave" + +# Parameters that are common to all wave model steps + +# System and version +export wave_sys_ver=v1.0.0 + +export EXECwave="${HOMEgfs}/exec" +export FIXwave="${HOMEgfs}/fix/wave" +export PARMwave="${HOMEgfs}/parm/wave" +export USHwave="${HOMEgfs}/ush" + +# This config contains variables/parameters used in the fcst step +# Some others are also used across the workflow in wave component scripts + +# General runtime labels +export CDUMPwave="${RUN}wave" + +# In GFS/GDAS, restart files are generated/read from gdas runs +export CDUMPRSTwave="gdas" + +# Grids for wave model +export waveGRD=${waveGRD:-'mx025'} + +#grid dependent variable defaults +export waveGRDN='1' # grid number for ww3_multi +export waveGRDG='10' # grid group for ww3_multi +export USE_WAV_RMP='NO' # YES/NO rmp grid remapping pre-processed coefficients +export waveMULTIGRID='.false.' # .true./.false. for multi or shel +export MESH_WAV="mesh.${waveGRD}.nc" # Mesh grid for wave model for CMEPS +export waveesmfGRD=' ' # input grid for multigrid + +#Grid dependent variables for various grids +case "${waveGRD}" in + "gnh_10m;aoc_9km;gsh_15m") + #GFSv16 settings: + export waveGRDN='1 2 3' + export waveGRDG='10 20 30' + export USE_WAV_RMP='YES' + export waveMULTIGRID='.true.' + export IOSRV='3' + export MESH_WAV=' ' + export waveesmfGRD='glox_10m' + export waveuoutpGRD='points' + export waveinterpGRD='glo_15mxt at_10m ep_10m wc_10m glo_30m' + export wavepostGRD='gnh_10m aoc_9km gsh_15m' + ;; + "gwes_30m") + #Grid used for P8 + export waveinterpGRD='' + export wavepostGRD='gwes_30m' + export waveuoutpGRD=${waveGRD} + ;; + "mx025") + #Grid used for HR1 (tripolar 1/4 deg) + export waveinterpGRD='reg025' + export wavepostGRD='' + export waveuoutpGRD=${waveGRD} + ;; + "glo_025") + #GEFSv13 regular lat/lon 1/4 deg grid + export waveinterpGRD='' + export wavepostGRD='glo_025' + export waveuoutpGRD=${waveGRD} + ;; + "glo_200") + #Global regular lat/lon 2deg deg grid + export waveinterpGRD='' + export wavepostGRD='glo_200' + export waveuoutpGRD=${waveGRD} + ;; + "glo_500") + #Global regular lat/lon 5deg deg grid + export waveinterpGRD='' + export wavepostGRD='glo_500' + export waveuoutpGRD=${waveGRD} + ;; + *) + echo "FATAL ERROR: No grid specific wave config values exist for ${waveGRD}. Aborting." + exit 1 + ;; +esac + +# Grids for input wind fields +export WAVEWND_DID= +export WAVEWND_FID= + +# The start time reflects the number of hindcast hours prior to the cycle initial time +if [[ "${CDUMP}" = "gdas" ]]; then + export FHMAX_WAV=${FHMAX:-9} +else + export FHMAX_WAV=${FHMAX_GFS} +fi +export WAVHINDH=${WAVHINDH:-0} +export FHMIN_WAV=${FHMIN_WAV:-0} +export FHOUT_WAV=${FHOUT_WAV:-3} +export FHMAX_HF_WAV=${FHMAX_HF_WAV:-120} +export FHOUT_HF_WAV=${FHOUT_HF_WAV:-1} +export FHMAX_WAV_IBP=180 +if (( FHMAX_WAV < FHMAX_WAV_IBP )); then export FHMAX_WAV_IBP=${FHMAX_GFS} ; fi + +# gridded and point output rate +export DTFLD_WAV=$(( FHOUT_HF_WAV * 3600 )) +export DTPNT_WAV=${DTPNT_WAV:-3600} +export FHINCP_WAV=$(( DTPNT_WAV / 3600 )) + +# Selected output parameters (gridded) +export OUTPARS_WAV=${OUTPARS_WAV:-"WND HS FP DP PHS PTP PDIR"} + +# Restart file config +if [[ "${CDUMP}" = "gdas" ]]; then + export WAVNCYC=4 + export WAVHCYC=${assim_freq:-6} + export FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-48} # RTOFS forecasts only out to 8 days +elif [[ ${gfs_cyc} -ne 0 ]]; then + export WAVHCYC=${assim_freq:-6} + export FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-192} # RTOFS forecasts only out to 8 days +else + export WAVHCYC=0 + export FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-192} # RTOFS forecasts only out to 8 days +fi + +# Restart timing business + +export RSTTYPE_WAV='T' # generate second tier of restart files +if [[ "${CDUMP}" != gfs ]]; then # Setting is valid for GDAS and GEFS + export DT_1_RST_WAV=10800 # time between restart files, set to DTRST=1 for a single restart file + export DT_2_RST_WAV=43200 # restart stride for checkpointing restart + export RSTIOFF_WAV=0 # first restart file offset relative to model start +else # This is a GFS run + rst_dt_gfs=$(( restart_interval_gfs * 3600 )) # TODO: This calculation needs to move to parsing_namelists_WW3.sh + if [[ ${rst_dt_gfs} -gt 0 ]]; then + export DT_1_RST_WAV=${rst_dt_gfs:-0} # time between restart files, set to DTRST=1 for a single restart file + export DT_2_RST_WAV=${rst_dt_gfs:-0} # restart stride for checkpointing restart + else + rst_dt_fhmax=$(( FHMAX_WAV * 3600 )) + export DT_1_RST_WAV=0 # time between restart files, set to DTRST=1 for a single restart file + export DT_2_RST_WAV=${rst_dt_fhmax:-0} # use checkpoint restart file name for creating restart at end of run + fi + export RSTIOFF_WAV=0 # first restart file offset relative to model start +fi +# +# Set runmember to default value if not GEFS cpl run +# (for a GFS coupled run, RUNMEN would be unset, this should default to -1) +export RUNMEM=${RUNMEM:--1} +# Set wave model member tags if ensemble run +# -1: no suffix, deterministic; xxxNN: extract two last digits to make ofilename prefix=gwesNN +if [[ ${RUNMEM} = -1 ]]; then +# No suffix added to model ID in case of deterministic run + export waveMEMB= +else +# Extract member number only + export waveMEMB="${RUNMEM: -2}" +fi + +# Determine if wave component needs input and/or is coupled +export WW3ATMINP='CPL' +if [[ ${DO_ICE} == "YES" ]]; then + export WW3ICEINP='CPL' + export WAVEICE_FID= +else + export WW3ICEINP='YES' + export WAVEICE_FID=glix_10m +fi + +export WAVECUR_DID=rtofs +if [[ ${DO_OCN} == "YES" ]]; then + export WW3CURINP='CPL' + export WAVECUR_FID= +else + export WW3CURINP='YES' + export WAVECUR_FID=glix_10m +fi + +# Determine if input is from perturbed ensemble (T) or single input file (F) for all members +export WW3ATMIENS='F' +export WW3ICEIENS='F' +export WW3CURIENS='F' + +export GOFILETYPE=1 # GOFILETYPE=1 one gridded file per output step +export POFILETYPE=1 # POFILETYPE=1 one point file per output step + +# Parameters for ww3_multi/shel.inp +# Unified output T or F +export FUNIPNT='T' +# Output server type (see ww3_shel/multi.inp in WW3 repo) +export IOSRV=${IOSRV:-'1'} +# Flag for dedicated output process for unified points +export FPNTPROC='T' +# Flag for grids sharing dedicated output processes +export FGRDPROC='F' +# Flag for masking computation in two-way nesting +export FLAGMASKCOMP="F" +# Flag for masking at printout time. +export FLAGMASKOUT="F" + +echo "END: config.wave" 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..194c89a9e5 100755 --- a/scripts/exgdas_enkf_fcst.sh +++ b/scripts/exgdas_enkf_fcst.sh @@ -112,16 +112,16 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do cd "${DATATOP}" - cmem=$(printf %03i "${imem}") - memchar="mem${cmem}" + export MEMNUM=$(printf %03i "${imem}") + memchar="mem${MEMNUM}" - echo "Processing MEMBER: ${cmem}" + echo "Processing MEMBER: ${MEMNUM}" ra=0 skip_mem="NO" if [[ -f ${EFCSGRP}.fail ]]; then - memstat=$(grep "MEMBER ${cmem}" "${EFCSGRP}.fail" | grep -c "PASS") + memstat=$(grep "MEMBER ${MEMNUM}" "${EFCSGRP}.fail" | grep -c "PASS") [[ ${memstat} -eq 1 ]] && skip_mem="YES" fi @@ -166,7 +166,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 ${MEMNUM} FAILED. Aborting job" fi rc=$((rc+ra)) @@ -192,9 +192,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 ${MEMNUM} : FAIL" > log else - echo "MEMBER ${cmem} : PASS" > log + echo "MEMBER ${MEMNUM} : 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..36ad8ced9e 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,11 @@ 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} + export MEMNUM=${MEMNUM:-00} if [[ ! -d ${COM_OCEAN_HISTORY} ]]; then mkdir -p "${COM_OCEAN_HISTORY}"; fi @@ -760,7 +760,7 @@ MOM6_postdet() { # Native model output uses window midpoint in the filename, but we are mapping that to the end of the period for COM local source_file="ocn_${vdate_mid:0:4}_${vdate_mid:4:2}_${vdate_mid:6:2}_${vdate_mid:8:2}.nc" - local dest_file="ocn${vdate}.${ENSMEM}.${current_cycle}.nc" + local dest_file="ocn${vdate}.${MEMNUM}.${current_cycle}.nc" ${NLN} "${COM_OCEAN_HISTORY}/${dest_file}" "${DATA}/${source_file}" local source_file="ocn_daily_${vdate:0:4}_${vdate:4:2}_${vdate:6:2}.nc" @@ -875,7 +875,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,13 +914,13 @@ 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} + export MEMNUM=${MEMNUM:-000} # 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 @@ -930,10 +930,10 @@ CICE_postdet() { vdatestr="${vdate:0:4}-${vdate:4:2}-${vdate:6:2}-${seconds}" if [[ 10#${fhr} -eq 0 ]]; then - ${NLN} "${COM_ICE_HISTORY}/iceic${vdate}.${ENSMEM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_ic.${vdatestr}.nc" + ${NLN} "${COM_ICE_HISTORY}/iceic${vdate}.${MEMNUM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_ic.${vdatestr}.nc" else (( interval = fhr - last_fhr )) # Umm.. isn't this histfreq_n? - ${NLN} "${COM_ICE_HISTORY}/ice${vdate}.${ENSMEM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_$(printf "%0.2d" "${interval}")h.${vdatestr}.nc" + ${NLN} "${COM_ICE_HISTORY}/ice${vdate}.${MEMNUM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_$(printf "%0.2d" "${interval}")h.${vdatestr}.nc" fi last_fhr=${fhr} done From 765fa99ce27555725cb15f5af2ab9d886227e180 Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Tue, 18 Jul 2023 03:51:45 -0500 Subject: [PATCH 2/8] Fix shellcheck errors in config.aero and config.defaults.s2sw --- parm/config/gefs/config.aero | 9 ++++++--- parm/config/gefs/config.defaults.s2sw | 3 +++ parm/config/gfs/config.aero | 9 ++++++--- parm/config/gfs/config.defaults.s2sw | 3 +++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/parm/config/gefs/config.aero b/parm/config/gefs/config.aero index 1cb3bf5679..2eb674af3f 100644 --- a/parm/config/gefs/config.aero +++ b/parm/config/gefs/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/gefs/config.defaults.s2sw b/parm/config/gefs/config.defaults.s2sw index 1b0becefec..bfbeb01e2d 100644 --- a/parm/config/gefs/config.defaults.s2sw +++ b/parm/config/gefs/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/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 From f94b8ed35bb2efd202873d951ac7e36377ff9305 Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Tue, 18 Jul 2023 04:27:02 -0500 Subject: [PATCH 3/8] Fix shellcheck error in enkf fcst script --- scripts/exgdas_enkf_fcst.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/exgdas_enkf_fcst.sh b/scripts/exgdas_enkf_fcst.sh index 194c89a9e5..597b1278d5 100755 --- a/scripts/exgdas_enkf_fcst.sh +++ b/scripts/exgdas_enkf_fcst.sh @@ -112,7 +112,8 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do cd "${DATATOP}" - export MEMNUM=$(printf %03i "${imem}") + MEMNUM=$(printf %03i "${imem}") + export MEMNUM memchar="mem${MEMNUM}" echo "Processing MEMBER: ${MEMNUM}" From 9b2408623dde75d49853b0f7ad72b77730c6ffca Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Tue, 18 Jul 2023 09:23:37 -0500 Subject: [PATCH 4/8] Change back to ENSMEM to match other existing code --- jobs/rocoto/ocnpost.sh | 2 +- parm/config/gefs/config.base.emc.dyn | 4 ++-- scripts/exgdas_enkf_fcst.sh | 16 ++++++++-------- ush/forecast_postdet.sh | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) 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.base.emc.dyn b/parm/config/gefs/config.base.emc.dyn index 37fcb9ac6a..da9e28e4a3 100644 --- a/parm/config/gefs/config.base.emc.dyn +++ b/parm/config/gefs/config.base.emc.dyn @@ -278,8 +278,8 @@ export NMEM_ENS=@NMEM_ENS@ # set default member number memdir for control # this will be overwritten for the perturbed members -export MEMNUM="000" -export MEMDIR="mem${MEMNUM}" +export ENSMEM="000" +export MEMDIR="mem${ENSMEM}" # Check if cycle is cold starting if [[ "${EXP_WARM_START}" = ".false." ]]; then diff --git a/scripts/exgdas_enkf_fcst.sh b/scripts/exgdas_enkf_fcst.sh index 597b1278d5..a9ee7be9bc 100755 --- a/scripts/exgdas_enkf_fcst.sh +++ b/scripts/exgdas_enkf_fcst.sh @@ -112,17 +112,17 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do cd "${DATATOP}" - MEMNUM=$(printf %03i "${imem}") - export MEMNUM - memchar="mem${MEMNUM}" + ENSMEM=$(printf %03i "${imem}") + export ENSMEM + memchar="mem${ENSMEM}" - echo "Processing MEMBER: ${MEMNUM}" + echo "Processing MEMBER: ${ENSMEM}" ra=0 skip_mem="NO" if [[ -f ${EFCSGRP}.fail ]]; then - memstat=$(grep "MEMBER ${MEMNUM}" "${EFCSGRP}.fail" | grep -c "PASS") + memstat=$(grep "MEMBER ${ENSMEM}" "${EFCSGRP}.fail" | grep -c "PASS") [[ ${memstat} -eq 1 ]] && skip_mem="YES" fi @@ -167,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 ${MEMNUM} FAILED. Aborting job" + err_exit "FATAL ERROR: forecast of member ${ENSMEM} FAILED. Aborting job" fi rc=$((rc+ra)) @@ -193,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 ${MEMNUM} : FAIL" > log + echo "MEMBER ${ENSMEM} : FAIL" > log else - echo "MEMBER ${MEMNUM} : 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 36ad8ced9e..dccb26c7b8 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -740,7 +740,7 @@ MOM6_postdet() { # 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 MEMNUM=${MEMNUM:-00} + export ENSMEM=${ENSMEM:-00} if [[ ! -d ${COM_OCEAN_HISTORY} ]]; then mkdir -p "${COM_OCEAN_HISTORY}"; fi @@ -760,7 +760,7 @@ MOM6_postdet() { # Native model output uses window midpoint in the filename, but we are mapping that to the end of the period for COM local source_file="ocn_${vdate_mid:0:4}_${vdate_mid:4:2}_${vdate_mid:6:2}_${vdate_mid:8:2}.nc" - local dest_file="ocn${vdate}.${MEMNUM}.${current_cycle}.nc" + local dest_file="ocn${vdate}.${ENSMEM}.${current_cycle}.nc" ${NLN} "${COM_OCEAN_HISTORY}/${dest_file}" "${DATA}/${source_file}" local source_file="ocn_daily_${vdate:0:4}_${vdate:4:2}_${vdate:6:2}.nc" @@ -920,7 +920,7 @@ CICE_postdet() { # TODO: make these forecast output files consistent w/ GFS output # TODO: Work w/ NB to determine appropriate naming convention for these files - export MEMNUM=${MEMNUM:-000} + export ENSMEM=${ENSMEM:-000} # 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 @@ -930,10 +930,10 @@ CICE_postdet() { vdatestr="${vdate:0:4}-${vdate:4:2}-${vdate:6:2}-${seconds}" if [[ 10#${fhr} -eq 0 ]]; then - ${NLN} "${COM_ICE_HISTORY}/iceic${vdate}.${MEMNUM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_ic.${vdatestr}.nc" + ${NLN} "${COM_ICE_HISTORY}/iceic${vdate}.${ENSMEM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_ic.${vdatestr}.nc" else (( interval = fhr - last_fhr )) # Umm.. isn't this histfreq_n? - ${NLN} "${COM_ICE_HISTORY}/ice${vdate}.${MEMNUM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_$(printf "%0.2d" "${interval}")h.${vdatestr}.nc" + ${NLN} "${COM_ICE_HISTORY}/ice${vdate}.${ENSMEM}.${current_cycle}.nc" "${DATA}/CICE_OUTPUT/iceh_$(printf "%0.2d" "${interval}")h.${vdatestr}.nc" fi last_fhr=${fhr} done From 9cc4a02bf9c9ef7458efaa6c7baa4cf9820b2f0f Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Tue, 18 Jul 2023 09:26:08 -0500 Subject: [PATCH 5/8] Remove separate EnKF coupled settings for GEFS --- parm/config/gefs/config.efcs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/parm/config/gefs/config.efcs b/parm/config/gefs/config.efcs index 660a06ce3b..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 From 7cec7670a159c4f41c3aa19b8ea642e2141b16c9 Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Tue, 18 Jul 2023 09:30:26 -0500 Subject: [PATCH 6/8] Consolidate setting of default ENSMEM in fcst --- ush/forecast_postdet.sh | 3 --- ush/forecast_predet.sh | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index dccb26c7b8..92113d8bfc 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -740,7 +740,6 @@ MOM6_postdet() { # 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:-00} if [[ ! -d ${COM_OCEAN_HISTORY} ]]; then mkdir -p "${COM_OCEAN_HISTORY}"; fi @@ -920,8 +919,6 @@ CICE_postdet() { # 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:-000} - # 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} From a2e84fd5e1a3a7ba0bd7e9f274333e2126df1103 Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Wed, 19 Jul 2023 20:29:01 -0500 Subject: [PATCH 7/8] Replace GEFS version of coupled configs with symlinks Since the files are identical replace the component config files for GEFS with links to the GFS versions. Refs #1754 --- parm/config/gefs/config.aero | 44 +------- parm/config/gefs/config.ice | 6 +- parm/config/gefs/config.ocn | 24 +---- parm/config/gefs/config.wave | 203 +---------------------------------- 4 files changed, 4 insertions(+), 273 deletions(-) mode change 100644 => 120000 parm/config/gefs/config.aero mode change 100644 => 120000 parm/config/gefs/config.ice mode change 100644 => 120000 parm/config/gefs/config.ocn mode change 100644 => 120000 parm/config/gefs/config.wave diff --git a/parm/config/gefs/config.aero b/parm/config/gefs/config.aero deleted file mode 100644 index 2eb674af3f..0000000000 --- a/parm/config/gefs/config.aero +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env bash - -# 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 - -# Path to the input data tree -case ${machine} in - "HERA") - AERO_INPUTS_DIR="/scratch1/NCEPDEV/global/glopara/data/gocart_emissions" - ;; - "ORION") - AERO_INPUTS_DIR="/work2/noaa/global/wkolczyn/noscrub/global-workflow/gocart_emissions" - ;; - "S4") - AERO_INPUTS_DIR="/data/prod/glopara/gocart_emissions" - ;; - "WCOSS2") - AERO_INPUTS_DIR="/lfs/h2/emc/global/noscrub/emc.global/data/gocart_emissions" - ;; - "JET") - AERO_INPUTS_DIR="/lfs4/HFIP/hfv3gfs/glopara/data/gocart_emissions" - ;; - *) - echo "FATAL ERROR: Machine ${machine} unsupported for aerosols" - exit 2 - ;; -esac - -# Biomass burning emission dataset. Choose from: GBBEPx, QFED, NONE (default) -AERO_EMIS_FIRE=QFED - -# Aerosol convective scavenging factors (list of string array elements) -# Element syntax: ':'. Use = * to set default factor for all aerosol tracers -# Scavenging factors are set to 0 (no scavenging) if unset -aero_conv_scav_factors="'*:0.3','so2:0.0','msa:0.0','dms:0.0','nh3:0.4','nh4:0.6','bc1:0.6','bc2:0.6','oc1:0.4','oc2:0.4','dust1:0.6','dust2:0.6', 'dust3:0.6','dust4:0.6','dust5:0.6','seas1:0.5','seas2:0.5','seas3:0.5','seas4:0.5','seas5:0.5'" -# -# Number of diagnostic aerosol tracers (default: 0) -aero_diag_tracers=2 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.ice b/parm/config/gefs/config.ice deleted file mode 100644 index 7bc1f80966..0000000000 --- a/parm/config/gefs/config.ice +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env bash - -echo "BEGIN: config.ice" - -echo "END: config.ice" 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 deleted file mode 100644 index 7d14e3dd52..0000000000 --- a/parm/config/gefs/config.ocn +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env bash - -echo "BEGIN: config.ocn" - -# MOM_input template to use -export MOM_INPUT="MOM_input_template_${OCNRES}" - -export DO_OCN_SPPT="NO" # In MOM_input, this variable is determines OCN_SPPT (OCN_SPPT = True|False) -export DO_OCN_PERT_EPBL="NO" # In MOM_input, this variable determines PERT_EPBL (PERT_EPBL = True|False) - -# Templated variables in MOM_input_template -export MOM6_USE_LI2016="True" # set to False for restart reproducibility -export MOM6_THERMO_SPAN="False" -export MOM6_ALLOW_LANDMASK_CHANGES="False" - -if [[ "${DO_JEDIOCNVAR}" == "YES" ]]; then - export ODA_INCUPD="True" -else - export ODA_INCUPD="False" -fi -export ODA_INCUPD_NHOURS="3.0" # In MOM_input, this is time interval for applying increment - -echo "END: config.ocn" 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 deleted file mode 100644 index a0c0156166..0000000000 --- a/parm/config/gefs/config.wave +++ /dev/null @@ -1,202 +0,0 @@ -#! /usr/bin/env bash - -########## config.wave ########## -# Wave steps specific - -echo "BEGIN: config.wave" - -# Parameters that are common to all wave model steps - -# System and version -export wave_sys_ver=v1.0.0 - -export EXECwave="${HOMEgfs}/exec" -export FIXwave="${HOMEgfs}/fix/wave" -export PARMwave="${HOMEgfs}/parm/wave" -export USHwave="${HOMEgfs}/ush" - -# This config contains variables/parameters used in the fcst step -# Some others are also used across the workflow in wave component scripts - -# General runtime labels -export CDUMPwave="${RUN}wave" - -# In GFS/GDAS, restart files are generated/read from gdas runs -export CDUMPRSTwave="gdas" - -# Grids for wave model -export waveGRD=${waveGRD:-'mx025'} - -#grid dependent variable defaults -export waveGRDN='1' # grid number for ww3_multi -export waveGRDG='10' # grid group for ww3_multi -export USE_WAV_RMP='NO' # YES/NO rmp grid remapping pre-processed coefficients -export waveMULTIGRID='.false.' # .true./.false. for multi or shel -export MESH_WAV="mesh.${waveGRD}.nc" # Mesh grid for wave model for CMEPS -export waveesmfGRD=' ' # input grid for multigrid - -#Grid dependent variables for various grids -case "${waveGRD}" in - "gnh_10m;aoc_9km;gsh_15m") - #GFSv16 settings: - export waveGRDN='1 2 3' - export waveGRDG='10 20 30' - export USE_WAV_RMP='YES' - export waveMULTIGRID='.true.' - export IOSRV='3' - export MESH_WAV=' ' - export waveesmfGRD='glox_10m' - export waveuoutpGRD='points' - export waveinterpGRD='glo_15mxt at_10m ep_10m wc_10m glo_30m' - export wavepostGRD='gnh_10m aoc_9km gsh_15m' - ;; - "gwes_30m") - #Grid used for P8 - export waveinterpGRD='' - export wavepostGRD='gwes_30m' - export waveuoutpGRD=${waveGRD} - ;; - "mx025") - #Grid used for HR1 (tripolar 1/4 deg) - export waveinterpGRD='reg025' - export wavepostGRD='' - export waveuoutpGRD=${waveGRD} - ;; - "glo_025") - #GEFSv13 regular lat/lon 1/4 deg grid - export waveinterpGRD='' - export wavepostGRD='glo_025' - export waveuoutpGRD=${waveGRD} - ;; - "glo_200") - #Global regular lat/lon 2deg deg grid - export waveinterpGRD='' - export wavepostGRD='glo_200' - export waveuoutpGRD=${waveGRD} - ;; - "glo_500") - #Global regular lat/lon 5deg deg grid - export waveinterpGRD='' - export wavepostGRD='glo_500' - export waveuoutpGRD=${waveGRD} - ;; - *) - echo "FATAL ERROR: No grid specific wave config values exist for ${waveGRD}. Aborting." - exit 1 - ;; -esac - -# Grids for input wind fields -export WAVEWND_DID= -export WAVEWND_FID= - -# The start time reflects the number of hindcast hours prior to the cycle initial time -if [[ "${CDUMP}" = "gdas" ]]; then - export FHMAX_WAV=${FHMAX:-9} -else - export FHMAX_WAV=${FHMAX_GFS} -fi -export WAVHINDH=${WAVHINDH:-0} -export FHMIN_WAV=${FHMIN_WAV:-0} -export FHOUT_WAV=${FHOUT_WAV:-3} -export FHMAX_HF_WAV=${FHMAX_HF_WAV:-120} -export FHOUT_HF_WAV=${FHOUT_HF_WAV:-1} -export FHMAX_WAV_IBP=180 -if (( FHMAX_WAV < FHMAX_WAV_IBP )); then export FHMAX_WAV_IBP=${FHMAX_GFS} ; fi - -# gridded and point output rate -export DTFLD_WAV=$(( FHOUT_HF_WAV * 3600 )) -export DTPNT_WAV=${DTPNT_WAV:-3600} -export FHINCP_WAV=$(( DTPNT_WAV / 3600 )) - -# Selected output parameters (gridded) -export OUTPARS_WAV=${OUTPARS_WAV:-"WND HS FP DP PHS PTP PDIR"} - -# Restart file config -if [[ "${CDUMP}" = "gdas" ]]; then - export WAVNCYC=4 - export WAVHCYC=${assim_freq:-6} - export FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-48} # RTOFS forecasts only out to 8 days -elif [[ ${gfs_cyc} -ne 0 ]]; then - export WAVHCYC=${assim_freq:-6} - export FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-192} # RTOFS forecasts only out to 8 days -else - export WAVHCYC=0 - export FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-192} # RTOFS forecasts only out to 8 days -fi - -# Restart timing business - -export RSTTYPE_WAV='T' # generate second tier of restart files -if [[ "${CDUMP}" != gfs ]]; then # Setting is valid for GDAS and GEFS - export DT_1_RST_WAV=10800 # time between restart files, set to DTRST=1 for a single restart file - export DT_2_RST_WAV=43200 # restart stride for checkpointing restart - export RSTIOFF_WAV=0 # first restart file offset relative to model start -else # This is a GFS run - rst_dt_gfs=$(( restart_interval_gfs * 3600 )) # TODO: This calculation needs to move to parsing_namelists_WW3.sh - if [[ ${rst_dt_gfs} -gt 0 ]]; then - export DT_1_RST_WAV=${rst_dt_gfs:-0} # time between restart files, set to DTRST=1 for a single restart file - export DT_2_RST_WAV=${rst_dt_gfs:-0} # restart stride for checkpointing restart - else - rst_dt_fhmax=$(( FHMAX_WAV * 3600 )) - export DT_1_RST_WAV=0 # time between restart files, set to DTRST=1 for a single restart file - export DT_2_RST_WAV=${rst_dt_fhmax:-0} # use checkpoint restart file name for creating restart at end of run - fi - export RSTIOFF_WAV=0 # first restart file offset relative to model start -fi -# -# Set runmember to default value if not GEFS cpl run -# (for a GFS coupled run, RUNMEN would be unset, this should default to -1) -export RUNMEM=${RUNMEM:--1} -# Set wave model member tags if ensemble run -# -1: no suffix, deterministic; xxxNN: extract two last digits to make ofilename prefix=gwesNN -if [[ ${RUNMEM} = -1 ]]; then -# No suffix added to model ID in case of deterministic run - export waveMEMB= -else -# Extract member number only - export waveMEMB="${RUNMEM: -2}" -fi - -# Determine if wave component needs input and/or is coupled -export WW3ATMINP='CPL' -if [[ ${DO_ICE} == "YES" ]]; then - export WW3ICEINP='CPL' - export WAVEICE_FID= -else - export WW3ICEINP='YES' - export WAVEICE_FID=glix_10m -fi - -export WAVECUR_DID=rtofs -if [[ ${DO_OCN} == "YES" ]]; then - export WW3CURINP='CPL' - export WAVECUR_FID= -else - export WW3CURINP='YES' - export WAVECUR_FID=glix_10m -fi - -# Determine if input is from perturbed ensemble (T) or single input file (F) for all members -export WW3ATMIENS='F' -export WW3ICEIENS='F' -export WW3CURIENS='F' - -export GOFILETYPE=1 # GOFILETYPE=1 one gridded file per output step -export POFILETYPE=1 # POFILETYPE=1 one point file per output step - -# Parameters for ww3_multi/shel.inp -# Unified output T or F -export FUNIPNT='T' -# Output server type (see ww3_shel/multi.inp in WW3 repo) -export IOSRV=${IOSRV:-'1'} -# Flag for dedicated output process for unified points -export FPNTPROC='T' -# Flag for grids sharing dedicated output processes -export FGRDPROC='F' -# Flag for masking computation in two-way nesting -export FLAGMASKCOMP="F" -# Flag for masking at printout time. -export FLAGMASKOUT="F" - -echo "END: config.wave" 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 From 9ba950146d7b84fad7ea88c81c99443e615c9d3a Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Fri, 21 Jul 2023 02:29:37 -0500 Subject: [PATCH 8/8] Replace GEFS coupled config with link to GFS --- parm/config/gefs/config.defaults.s2sw | 30 +-------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) mode change 100644 => 120000 parm/config/gefs/config.defaults.s2sw diff --git a/parm/config/gefs/config.defaults.s2sw b/parm/config/gefs/config.defaults.s2sw deleted file mode 100644 index bfbeb01e2d..0000000000 --- a/parm/config/gefs/config.defaults.s2sw +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env bash - -# 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 -FHMAX_GFS_12=48 -FHMAX_GFS_18=48 -FHOUT_GFS=6 -FHOUT_HF_GFS=-1 - -# config.fcst -min_seaice="1.0e-6" -use_cice_alb=".true." - -# config.wave -FHOUT_HF_WAV=3 -DTPNT_WAV=10800 -OUTPARS_WAV="WND CUR ICE HS T01 T02 DIR FP DP PHS PTP PDIR CHA" -DOBNDPNT_WAVE='NO' - -# config.arch -export ARCH_GAUSSIAN="YES" -export ARCH_GAUSSIAN_FHMAX=${FHMAX_GFS_00} -export ARCH_GAUSSIAN_FHINC=${FHOUT_GFS} 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