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

Support coupled GEFS forecast, use mem000 for GEFS control #1755

Merged
2 changes: 1 addition & 1 deletion jobs/rocoto/ocnpost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
43 changes: 43 additions & 0 deletions parm/config/gefs/config.aero
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#! /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: '<tracer_name>:<factor>'. Use <tracer_name> = * 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
5 changes: 5 additions & 0 deletions parm/config/gefs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
aerorahul marked this conversation as resolved.
Show resolved Hide resolved

# Check if cycle is cold starting
if [[ "${EXP_WARM_START}" = ".false." ]]; then
export IAU_FHROT=0
Expand Down
29 changes: 29 additions & 0 deletions parm/config/gefs/config.defaults.s2sw
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#! /usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can also be linked from parm/config/gfs


# 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}
7 changes: 0 additions & 7 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
5 changes: 5 additions & 0 deletions parm/config/gefs/config.ice
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /usr/bin/env bash

echo "BEGIN: config.ice"

echo "END: config.ice"
23 changes: 23 additions & 0 deletions parm/config/gefs/config.ocn
Original file line number Diff line number Diff line change
@@ -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"
202 changes: 202 additions & 0 deletions parm/config/gefs/config.wave
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
#! /usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just link to config.wave from parm/config/gfs? Is there any distinction for wave between gfs and gefs for waves?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we will need to use different settings for GEFS. Can certain do that (and for aero/ice/ocn) until such time as we find we need to have different settings. Will leave it up to you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to link in gefs to force them to be the same as gfs and really understand the requirements when they are presented why they need to be different. Otherwise there will be a tendency to just cram gefs specifics into this application.
I am not against the flexibility, but I would like to understand the reason and justification when that is provided.
This does not prevent us from maintaining a separate configuration for GEFS in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


########## 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"
9 changes: 6 additions & 3 deletions parm/config/gfs/config.aero
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions parm/config/gfs/config.defaults.s2sw
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgdas_enkf_earc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
remove_files "${directory}" "${exclude_list[@]}"
done

Expand Down
Loading