Skip to content

Commit

Permalink
Merge branch 'feature/land_iau' into feature/lnd_regrid_iau
Browse files Browse the repository at this point in the history
* feature/land_iau:
  modify for Clara's gauss-fv3 regridding
  Change orog gravity wave drag scheme for grid sizes less than 10km (NOAA-EMC#3175)
  Switch snow DA to use 2DVar for deterministic and ensemble mean (NOAA-EMC#3163)
  Update compression options for GEFS history files (NOAA-EMC#3184)
  • Loading branch information
tsga committed Dec 22, 2024
2 parents 8120fb6 + e3a9987 commit 850264f
Show file tree
Hide file tree
Showing 47 changed files with 1,064 additions and 842 deletions.
10 changes: 6 additions & 4 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,16 @@ elif [[ "${step}" = "snowanl" ]]; then
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_SNOWANL=${NTHREADSmax}
export APRUN_SNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_SNOWANL}"
export APRUN_SNOWANL="${APRUN_default} --mem=0 --cpus-per-task=${NTHREADS_SNOWANL}"

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "esnowrecen" ]]; then
elif [[ "${step}" = "esnowanl" ]]; then

export NTHREADS_ESNOWRECEN=${NTHREADSmax}
export APRUN_ESNOWRECEN="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWRECEN}"
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_ESNOWANL=${NTHREADSmax}
export APRUN_ESNOWANL="${APRUN_default} --mem=0 --cpus-per-task=${NTHREADS_ESNOWANL}"

export APRUN_APPLY_INCR="${launcher} -n 6"

Expand Down
8 changes: 5 additions & 3 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ case ${step} in

export APRUN_APPLY_INCR="${launcher} -n 6"
;;
"esnowrecen")
"esnowanl")

export NTHREADS_ESNOWRECEN=${NTHREADSmax}
export APRUN_ESNOWRECEN="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWRECEN}"
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_ESNOWANL=${NTHREADSmax}
export APRUN_ESNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWANL}"

export APRUN_APPLY_INCR="${launcher} -n 6"
;;
Expand Down
8 changes: 5 additions & 3 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ elif [[ "${step}" = "snowanl" ]]; then

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "esnowrecen" ]]; then
elif [[ "${step}" = "esnowanl" ]]; then

export NTHREADS_ESNOWRECEN=${NTHREADSmax}
export APRUN_ESNOWRECEN="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWRECEN}"
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_ESNOWANL=${NTHREADSmax}
export APRUN_ESNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWANL}"

export APRUN_APPLY_INCR="${launcher} -n 6"

Expand Down
8 changes: 5 additions & 3 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ elif [[ "${step}" = "snowanl" ]]; then

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "esnowrecen" ]]; then
elif [[ "${step}" = "esnowanl" ]]; then

export NTHREADS_ESNOWRECEN=${NTHREADSmax}
export APRUN_ESNOWRECEN="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWRECEN}"
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_ESNOWANL=${NTHREADSmax}
export APRUN_ESNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWANL}"

export APRUN_APPLY_INCR="${launcher} -n 6"

Expand Down
8 changes: 5 additions & 3 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ elif [[ "${step}" = "snowanl" ]]; then

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "esnowrecen" ]]; then
elif [[ "${step}" = "esnowanl" ]]; then

export NTHREADS_ESNOWRECEN=${NTHREADSmax}
export APRUN_ESNOWRECEN="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWRECEN}"
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_ESNOWANL=${NTHREADSmax}
export APRUN_ESNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_ESNOWANL}"

export APRUN_APPLY_INCR="${launcher} -n 6"

Expand Down
8 changes: 5 additions & 3 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ elif [[ "${step}" = "snowanl" ]]; then

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "esnowrecen" ]]; then
elif [[ "${step}" = "esnowanl" ]]; then

export NTHREADS_ESNOWRECEN=${NTHREADSmax}
export APRUN_ESNOWRECEN="${APRUN_default}"
export APRUN_CALCFIMS="${launcher} -n 1"

export NTHREADS_ESNOWANL=${NTHREADSmax}
export APRUN_ESNOWANL="${APRUN_default}"

export APRUN_APPLY_INCR="${launcher} -n 6"

Expand Down
3 changes: 2 additions & 1 deletion jobs/JGDAS_ENKF_ARCHIVE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "earc" -c "base earc"
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_TOP
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_ATMOS_ANALYSIS_ENSSTAT:COM_ATMOS_ANALYSIS_TMPL \
COMIN_ATMOS_HISTORY_ENSSTAT:COM_ATMOS_HISTORY_TMPL
COMIN_ATMOS_HISTORY_ENSSTAT:COM_ATMOS_HISTORY_TMPL \
COMIN_SNOW_ANALYSIS_ENSSTAT:COM_SNOW_ANALYSIS_TMPL

###############################################################
# Run archive script
Expand Down
18 changes: 11 additions & 7 deletions jobs/JGDAS_ENKF_SNOW_RECENTER → jobs/JGLOBAL_SNOWENS_ANALYSIS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "esnowrecen" -c "base esnowrecen"
source "${HOMEgfs}/ush/jjob_header.sh" -e "esnowanl" -c "base esnowanl"

##############################################
# Set variables used in the script
Expand All @@ -10,19 +10,18 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "esnowrecen" -c "base esnowrecen"
# shellcheck disable=SC2153
GDUMP="gdas"
export GDUMP
CDUMP=${RUN/enkf}
export CDUMP

##############################################
# Begin JOB SPECIFIC work
##############################################
# Generate COM variables from templates
RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OBS:COM_OBS_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OBS:COM_OBS_TMPL \
COMOUT_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \
COMOUT_CONF:COM_CONF_TMPL
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl \
COMOUT_SNOW_ANALYSIS:COM_SNOW_ANALYSIS_TMPL

mkdir -p "${COMOUT_SNOW_ANALYSIS}" "${COMOUT_CONF}"

for imem in $(seq 1 "${NMEM_ENS}"); do
memchar="mem$(printf %03i "${imem}")"
Expand All @@ -31,10 +30,15 @@ for imem in $(seq 1 "${NMEM_ENS}"); do
mkdir -p "${COMOUT_SNOW_ANALYSIS}"
done

MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -x\
COMOUT_SNOW_ANALYSIS:COM_SNOW_ANALYSIS_TMPL

mkdir -p "${COMOUT_SNOW_ANALYSIS}" "${COMOUT_CONF}"

###############################################################
# Run relevant script

EXSCRIPT=${SNOWANLPY:-${SCRgfs}/exgdas_enkf_snow_recenter.py}
EXSCRIPT=${SNOWANLPY:-${SCRgfs}/exglobal_snowens_analysis.py}
${EXSCRIPT}
status=$?
(( status != 0 )) && exit "${status}"
Expand Down
10 changes: 6 additions & 4 deletions jobs/JGLOBAL_SNOW_ANALYSIS
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
export DATA=${DATA:-${DATAROOT}/${RUN}snowanl_${cyc}}
source "${HOMEgfs}/ush/jjob_header.sh" -e "snowanl" -c "base snowanl"

##############################################
Expand All @@ -18,12 +17,15 @@ GDUMP="gdas"
# Begin JOB SPECIFIC work
##############################################
# Generate COM variables from templates
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS COM_SNOW_ANALYSIS COM_CONF
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OBS:COM_OBS_TMPL \
COMOUT_SNOW_ANALYSIS:COM_SNOW_ANALYSIS_TMPL \
COMOUT_CONF:COM_CONF_TMPL

RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL
COMIN_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL

mkdir -m 775 -p "${COM_SNOW_ANALYSIS}" "${COM_CONF}"
mkdir -m 775 -p "${COMOUT_SNOW_ANALYSIS}" "${COMOUT_CONF}"

###############################################################
# Run relevant script
Expand Down
26 changes: 26 additions & 0 deletions jobs/rocoto/esnowanl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source UFSDA workflow modules
. "${HOMEgfs}/ush/load_ufsda_modules.sh"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

export job="esnowanl"
export jobid="${job}.$$"

###############################################################
# setup python path for ioda utilities
# shellcheck disable=SC2311
pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python$(detect_py_ver)/"
gdasappPATH="${HOMEgfs}/sorc/gdas.cd/sorc/iodaconv/src:${pyiodaPATH}"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:${gdasappPATH}"
export PYTHONPATH

###############################################################
# Execute the JJOB
"${HOMEgfs}/jobs/JGLOBAL_SNOWENS_ANALYSIS"
status=$?
exit "${status}"
18 changes: 0 additions & 18 deletions jobs/rocoto/esnowrecen.sh

This file was deleted.

8 changes: 8 additions & 0 deletions parm/archive/enkf.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ enkf:
- "{{ COMIN_ATMOS_ANALYSIS_ENSSTAT | relpath(ROTDIR) }}/{{ head }}{{ file }}"
{% endfor %}

{% if DO_JEDISNOWDA %}
- "{{ COMIN_SNOW_ANALYSIS_ENSSTAT | relpath(ROTDIR) }}/{{ head }}snowstat.tgz"
{% for itile in range(1,7) %}
# Snow analysis is 3dvar
- "{{ COMIN_SNOW_ANALYSIS_ENSSTAT | relpath(ROTDIR) }}/snowinc.{{ cycle_YMD }}.{{ cycle_HH }}0000.sfc_data.tile{{ itile }}.nc"
{% endfor %}
{% endif %}

# Ensemble mean analyses/increments
# 6-hr analysis/increment
{% if do_calc_increment %}
Expand Down
2 changes: 1 addition & 1 deletion parm/archive/gdas_restarta.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gdas_restarta:

# Snow configuration yaml
{% if DO_JEDISNOWDA %}
- "{{ COMIN_CONF | relpath(ROTDIR) }}/{{ head }}letkfoi.yaml"
- "{{ COMIN_CONF | relpath(ROTDIR) }}/{{ head }}snowanlvar.yaml"
{% endif %}

# Input BUFR files
Expand Down
9 changes: 8 additions & 1 deletion parm/config/gefs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ case "${fv3_res}" in
export xr_cnvcld=".true." # Pass conv. clouds to Xu-Randall cloud fraction
export cdmbgwd="0.071,2.1,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="40.0,1.77,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=6.0
export k_split=1
export n_split=4
export tau=10.0
Expand All @@ -107,6 +108,7 @@ case "${fv3_res}" in
export xr_cnvcld=".true." # Pass conv. clouds to Xu-Randall cloud fraction
export cdmbgwd="0.14,1.8,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="20.0,2.5,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=6.0
export knob_ugwp_tauamp=3.0e-3 # setting for UGWPv1 non-stationary GWD
export k_split=1
export n_split=4
Expand All @@ -130,6 +132,7 @@ case "${fv3_res}" in
export nthreads_ufs_gfs=2
export cdmbgwd="0.23,1.5,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="10.0,3.5,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=6.0
export knob_ugwp_tauamp=1.5e-3 # setting for UGWPv1 non-stationary GWD
export xr_cnvcld=".true." # Pass conv. clouds to Xu-Randall cloud fraction
export k_split=2
Expand All @@ -154,6 +157,7 @@ case "${fv3_res}" in
export nthreads_ufs_gfs=2
export cdmbgwd="1.1,0.72,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="5.0,5.0,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=6.0
export knob_ugwp_tauamp=0.8e-3 # setting for UGWPv1 non-stationary GWD
export k_split=2
export n_split=4
Expand All @@ -177,6 +181,7 @@ case "${fv3_res}" in
export nthreads_ufs_gfs=4
export cdmbgwd="4.0,0.15,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="2.5,7.5,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=6.0
export knob_ugwp_tauamp=0.5e-3 # setting for UGWPv1 non-stationary GWD
export k_split=2
export n_split=4
Expand All @@ -200,6 +205,7 @@ case "${fv3_res}" in
export nthreads_ufs_gfs=4
export cdmbgwd="4.0,0.10,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="1.67,8.8,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=2.0
export knob_ugwp_tauamp=0.35e-3 # setting for UGWPv1 non-stationary GWD
export k_split=2
export n_split=6
Expand All @@ -223,6 +229,7 @@ case "${fv3_res}" in
export nthreads_ufs_gfs=4
export cdmbgwd="4.0,0.05,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="0.625,14.1,1.0,1.0" # settings for GSL drag suite
export psl_gwd_dx_factor=2.0
export knob_ugwp_tauamp=0.13e-3 # setting for UGWPv1 non-stationary GWD
export k_split=4
export n_split=5
Expand Down Expand Up @@ -268,7 +275,7 @@ case ${fv3_res} in
"C384" | "C768" | "C1152" | "C3072")
zstandard_level=0
ideflate=1
quantize_nsd=5
quantize_nsd=14
OUTPUT_FILETYPE_ATM="netcdf_parallel"
if [[ "${fv3_res}" == "C384" ]]; then
OUTPUT_FILETYPE_SFC="netcdf" # For C384, the write grid component is better off with serial netcdf
Expand Down
19 changes: 19 additions & 0 deletions parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,25 @@ fi

export GSI_SOILANAL=@GSI_SOILANAL@

# Land IAU for soil temp
export DO_LAND_IAU="@DO_LAND_IAU@" #default false--turn on for enkf fcst with
export LAND_IAU_FHRS="3,6,9"
export LAND_IAU_DELTHRS=6
export LAND_IAU_INC_FILES='sfc_inc',''
export LSOIL_INCR=3
export LAND_IAU_FILTER_INCREMENTS=.false.
export LAND_IAU_UPD_STC=.true.
export LAND_IAU_UPD_SLC=.true.
export LAND_IAU_DO_STCSMC_ADJUSTMENT=.true.
export LAND_IAU_MIN_T_INCREMENT=0.0001
#export LAND_IAU_MIN_SLC_INCREMENT=0.000001

# no land iau if cycle is cold start or in free-forecast mode
if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then
export DO_LAND_IAU="NO" #TODO: Note turning off Land IAU, instead of limiting to LAND_IAU_FHRS=6.
#Test in future using LAND_IAU_FHRS=6
fi

# turned on nsst in anal and/or fcst steps, and turn off rtgsst
export DONST="YES"
if [[ ${DONST} = "YES" ]]; then export FNTSFA=" "; fi
Expand Down
7 changes: 7 additions & 0 deletions parm/config/gfs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,11 @@ if [[ ${RUN} == "enkfgfs" ]]; then
export restart_interval=${restart_interval_enkfgfs:-12}
fi

# do sfc temp increments as IAU for enkf fcst
export DO_LAND_IAU="YES"
# no land iau if cycle is cold start or in free-forecast mode
if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then
export DO_LAND_IAU="NO" #TODO: Note we don't do Land IAU at all instead of limiting to LAND_IAU_FHRS=6. Test in future using LAND_IAU_FHRS=6 (to make all land DA in one place)
fi

echo "END: config.efcs"
10 changes: 8 additions & 2 deletions parm/config/gfs/config.esfc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ fi

# set up soil analysis
if [[ ${GSI_SOILANAL} = "YES" ]]; then
export DO_LNDINC=".true."
export LND_SOI_FILE="lnd_incr"
#Land IAU no dolndinc
if [[ ${DO_LAND_IAU} = "YES" ]]; then
export DO_LNDINC=".false."
export LND_SOI_FILE="NULL"
else
export DO_LNDINC=".true."
export LND_SOI_FILE="lnd_incr"
fi
fi

echo "END: config.esfc"
Loading

0 comments on commit 850264f

Please sign in to comment.