Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/EP5dtest' into SFS
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilBarton-NOAA committed Feb 29, 2024
2 parents d3a4927 + 4252ff1 commit 37718c0
Show file tree
Hide file tree
Showing 14 changed files with 462 additions and 84 deletions.
27 changes: 12 additions & 15 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,20 @@ export OUTPUT_FILETYPE_ATM="netcdf"
export OUTPUT_FILETYPE_SFC="netcdf"

# Stochastic physics parameters (only for ensemble forecasts)
# ATM
export DO_SKEB="YES"
export SKEB=0.3
export SKEB_TAU=21600.
export SKEB_LSCALE=250000.
export SKEBNORM=0
export SKEB_NPASS=30
export SKEB_VDOF=5
export DO_SHUM="YES"
export SHUM=0.005
export SHUM_TAU=21600.
export SHUM_LSCALE=500000.
export DO_SPPT="YES"
export SPPT=0.5
export SPPT_TAU=21600.
export SPPT_LSCALE=500000.
export SPPT_LOGIT=".true."
export SPPT_SFCLIMIT=".true."
export DO_SHUM="NO"
# OCN
export DO_OCN_SPPT="YES"
export DO_OCN_PERT_EPBL="YES"
export ODA_INCUPD="True"
export ODA_TEMPINC_VAR='t_pert'
export ODA_SALTINC_VAR='s_pert'
export ODA_THK_VAR='h_anl'
export ODA_UINC_VAR='u_pert'
export ODA_VINC_VAR='v_pert'
export ODA_INCUPD_NHOURS=0.0

export restart_interval="${restart_interval_gfs}"

Expand Down
9 changes: 8 additions & 1 deletion parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export FHMAX_HF=${FHMAX_HF_GFS}
export FHOUT_HF=${FHOUT_HF_GFS}
export FHOUT_OCNICE=${FHOUT_OCNICE_GFS}

# Turn on the use of wildfire emissions bleneded to climatology
export BLENDED_WILDFIRE_EMISSIONS=T

# Get task specific resources
source "${EXPDIR}/config.resources" fcst
export domains_stack_size="16000000"
Expand Down Expand Up @@ -136,7 +139,11 @@ tbp=""
if [[ "${progsigma}" == ".true." ]]; then tbp="_progsigma" ; fi

# Radiation options
export IAER=1011 ; #spectral band mapping method for aerosol optical properties
if [[ "${DO_AERO}" == "YES" ]]; then
export IAER=2011 ; #spectral band mapping method for aerosol optical properties
else
export IAER=1011 ; #spectral band mapping method for aerosol optical properties
fi
export iovr_lw=3 ; #de-correlation length cloud overlap method (Barker, 2008)
export iovr_sw=3 ; #de-correlation length cloud overlap method (Barker, 2008)
export iovr=3 ; #de-correlation length cloud overlap method (Barker, 2008)
Expand Down
6 changes: 6 additions & 0 deletions parm/config/gefs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ echo "BEGIN: config.stage_ic"
source "${EXPDIR}/config.resources" stage_ic

case "${CASE}" in
"C384")
export CPL_ATMIC=""
export CPL_ICEIC=""
export CPL_OCNIC=""
export CPL_WAVIC=""
;;
"C48")
export CPL_ATMIC="gefs_test"
export CPL_ICEIC="gefs_test"
Expand Down
6 changes: 3 additions & 3 deletions parm/config/gefs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ case "${fv3_res}" in
export layout_y=8
export layout_x_gfs=8
export layout_y_gfs=8
export nthreads_fv3=1
export nthreads_fv3=2
export nthreads_fv3_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
Expand Down Expand Up @@ -315,7 +315,7 @@ if [[ "${skip_mom6}" == "false" ]]; then
FRUNOFF="runoff.daitren.clim.${NX_GLB}x${NY_GLB}.v20180328.nc"
CHLCLIM="seawifs-clim-1997-2010.${NX_GLB}x${NY_GLB}.v20180328.nc"
MOM6_RIVER_RUNOFF='True'
MOM6_RESTART_SETTING="r"
MOM6_RESTART_SETTING="n"
eps_imesh="1.0e-1"
if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" ]]; then
MOM6_DIAG_COORD_DEF_Z_FILE="oceanda_zgrid_75L.nc"
Expand Down Expand Up @@ -374,7 +374,7 @@ if [[ "${skip_cice6}" == "false" ]]; then
cice6_processor_shape="slenderX2"
;;
"025")
ntasks_cice6=120
ntasks_cice6=72
cice6_processor_shape="slenderX2"
;;
*)
Expand Down
2 changes: 2 additions & 0 deletions parm/config/gefs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ base:
DO_JEDISNOWDA: "NO"
DO_MERGENSST: "NO"
FHMAX_GFS: 120
BASE_CPLIC: "/scratch2/NCEPDEV/stmp3/Neil.Barton/ICs"

2 changes: 1 addition & 1 deletion parm/config/gfs/config.aero
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export AERO_INPUTS_DIR

export AERO_DIAG_TABLE="${HOMEgfs}/parm/ufs/fv3/diag_table.aero"
export AERO_FIELD_TABLE="${HOMEgfs}/parm/ufs/fv3/field_table.aero"
# Biomass burning emission dataset. Choose from: gbbepx, qfed, none
# Biomass burning emission dataset. Choose from: gbbepx, qfed, qfed_blended, none
export AERO_EMIS_FIRE="qfed"
# Directory containing GOCART configuration files
export AERO_CONFIG_DIR="${HOMEgfs}/parm/ufs/gocart"
Expand Down
8 changes: 8 additions & 0 deletions parm/ufs/gocart/ExtData.qfed_blended
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#====== BIOMASS BURNING EMISSIONS =======================================

# QFED
#--------------------------------------------------------------------------------------------------------------------------------
SU_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.7778 SO2 qfed_blended_so2.nc
OC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.7778 OC qfed_blended_oc.nc
BC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.7778 BC qfed_blended_bc.nc
# EMI_NH3_BB NA N Y %y4-%m2-%d2t12:00:00 none 0.7778 NH3 qfed_bledned_nh3.nc
32 changes: 22 additions & 10 deletions scripts/exglobal_stage_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
if [[ "${DO_OCN:-}" = "YES" ]]; then
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL
[[ ! -d "${COM_OCEAN_RESTART_PREV}" ]] && mkdir -p "${COM_OCEAN_RESTART_PREV}"
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.MOM.res.nc"
tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.MOM.res.nc"
#src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.MOM.res.nc"
#tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.MOM.res.nc"
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/ORAS5.mx${OCNRES}.ic.nc"
tgt="${COM_OCEAN_RESTART_PREV}/ORAS5.mx${OCNRES}.ic.nc"
${NCP} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
Expand All @@ -88,21 +90,31 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
# Nothing more to do for these resolutions
;;
"025" )
for nn in $(seq 1 3); do
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.MOM.res_${nn}.nc"
tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.MOM.res_${nn}.nc"
${NCP} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
done
# Nothing to do for ORAS5 initialization
#for nn in $(seq 1 3); do
# src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.MOM.res_${nn}.nc"
# tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.MOM.res_${nn}.nc"
# ${NCP} "${src}" "${tgt}"
# rc=$?
# ((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
# err=$((err + rc))
#done
;;
*)
echo "FATAL ERROR: Unsupported ocean resolution ${OCNRES}"
rc=1
err=$((err + rc))
;;
esac

# Ocean Perturbation Files
if [[ "${MEMDIR}" != "mem000" ]]; then
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.mom6_increment.nc"
tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.mom6_increment.nc"
${NCP} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
fi

# TODO: Do mediator restarts exists in a ATMW configuration?
# TODO: No mediator is presumably involved in an ATMA configuration
Expand Down
90 changes: 69 additions & 21 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ EOF
MM=$(printf %02d "${month}")
${NLN} "${FIXgfs}/aer/merra2.aerclim.2003-2014.m${MM}.nc" "aeroclim.m${MM}.nc"
done
${NLN} "${FIXgfs}/lut/optics_BC.v1_3.dat" "${DATA}/optics_BC.dat"
${NLN} "${FIXgfs}/lut/optics_OC.v1_3.dat" "${DATA}/optics_OC.dat"
${NLN} "${FIXgfs}/lut/optics_DU.v15_3.dat" "${DATA}/optics_DU.dat"
${NLN} "${FIXgfs}/lut/optics_SS.v3_3.dat" "${DATA}/optics_SS.dat"
${NLN} "${FIXgfs}/lut/optics_SU.v1_3.dat" "${DATA}/optics_SU.dat"
fi
${NLN} "${FIXlut}/optics_BC.v1_3.dat" "${DATA}/optics_BC.dat"
${NLN} "${FIXlut}/optics_OC.v1_3.dat" "${DATA}/optics_OC.dat"
${NLN} "${FIXlut}/optics_DU.v15_3.dat" "${DATA}/optics_DU.dat"
${NLN} "${FIXlut}/optics_SS.v3_3.dat" "${DATA}/optics_SS.dat"
${NLN} "${FIXlut}/optics_SU.v1_3.dat" "${DATA}/optics_SU.dat"

${NLN} "${FIXgfs}/am/global_co2historicaldata_glob.txt" "${DATA}/co2historicaldata_glob.txt"
${NLN} "${FIXgfs}/am/co2monthlycyc.txt" "${DATA}/co2monthlycyc.txt"
Expand Down Expand Up @@ -431,23 +431,45 @@ EOF

# Stochastic Physics Options
if [[ ${SET_STP_SEED:-"YES"} = "YES" ]]; then
ISEED_SKEB=$((current_cycle*1000 + MEMBER*10 + 1))
ISEED_SPPT=$((CDATE*10000 + ${MEMBER#0}*100 + 3)),$((CDATE*10000 + ${MEMBER#0}*100 + 4)),$((CDATE*10000 + ${MEMBER#0}*100 + 5)),$((CDATE*10000 + ${MEMBER#0}*100 + 6)),$((CDATE*10000 + ${MEMBER#0}*100 + 7))
ISEED_CA=$(( (CDATE*10000 + ${MEMBER#0}*100 + 18) % 2147483647 ))
ISEED_SKEB=$((current_cycle*1000 + MEMBER*10 +1))
ISEED_SHUM=$((current_cycle*1000 + MEMBER*10 + 2))
ISEED_SPPT=$((current_cycle*1000 + MEMBER*10 + 3))
ISEED_CA=$(( (current_cycle*1000 + MEMBER*10 + 4) % 2147483647 ))
ISEED_LNDP=$(( (current_cycle*1000 + MEMBER*10 + 5) % 2147483647 ))
else
ISEED=${ISEED:-0}
fi
if [[ ${DO_SKEB} = "YES" ]]; then
do_skeb=".true."
SKEB=${SKEB:-0.8,-999,-999,-999,-999}
iseed_skeb=${ISEED_SKEB}
SKEB_TAU=${SKEB_TAU:-2.16E4,1.728E5,2.592E6,7.776E6,3.1536E7}
SKEB_LSCALE=${SKEB_LSCALE:-500.E3,1000.E3,2000.E3,2000.E3,2000.E3}
SKEBNORM=${SKEBNORM:-1}
fi
if [[ ${DO_SPPT} = "YES" ]]; then
do_sppt=".true."
SPPT=${SPPT:-0.56,0.28,0.14,0.056,0.028}
iseed_sppt=${ISEED_SPPT}
SPPT_TAU=${SPPT_TAU:-2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7}
SPPT_LSCALE=${SPPT_LSCALE:-500.E3,1000.E3,2000.E3,2000.E3,2000.E3}
sppt_logit=.TRUE.
sppt_sfclimit=.true.
use_zmtnlck=.true.
fi
if [[ ${DO_SHUM} = "YES" ]]; then
do_shum=".true."
fi
if [[ ${DO_OCN_SPPT} = "YES" ]]; then
OCNSPPT=${OCNSPPT:-0.8,0.4,0.2,0.08,0.04}
OCNSPPT_TAU=${OCNSPPT_TAU:-2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7}
OCNSPPT_LSCALE=${OCNSPPT_LSCALE:-500.E3,1000.E3,2000.E3,2000.E3,2000.E3}
fi
if [[ ${DO_OCN_PERT_EPBL} = "YES" ]]; then
EPBL=${EPBL:-0.8,0.4,0.2,0.08,0.04}
EPBL_TAU=${EPBL_TAU:-2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7}
EPBL_LSCALE=${EPBL_LSCALE:-500.E3,1000.E3,2000.E3,2000.E3,2000.E3}
fi
if [[ ${DO_LAND_PERT} = "YES" ]]; then
lndp_type=${lndp_type:-2}
LNDP_TAU=${LNDP_TAU:-21600}
Expand Down Expand Up @@ -672,17 +694,17 @@ MOM6_postdet() {
echo "SUB ${FUNCNAME[0]}: MOM6 after run type determination"

# Copy MOM6 ICs
${NLN} "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.MOM.res.nc" "${DATA}/INPUT/MOM.res.nc"
case ${OCNRES} in
"025")
local nn
for nn in $(seq 1 4); do
if [[ -f "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.MOM.res_${nn}.nc" ]]; then
${NLN} "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.MOM.res_${nn}.nc" "${DATA}/INPUT/MOM.res_${nn}.nc"
fi
done
;;
esac
${NLN} "${COM_OCEAN_RESTART_PREV}/ORAS5.mx${OCNRES}.ic.nc" "${DATA}/INPUT/ORAS5.mx${OCNRES}.ic.nc"
#${NLN} "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.MOM.res.nc" "${DATA}/INPUT/MOM.res.nc"
#case ${OCNRES} in
# "025")
# for nn in $(seq 1 4); do
# if [[ -f "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.MOM.res_${nn}.nc" ]]; then
# ${NLN} "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.MOM.res_${nn}.nc" "${DATA}/INPUT/MOM.res_${nn}.nc"
# fi
# done
# ;;
#esac

# Link increment
if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" ]]; then
Expand All @@ -693,6 +715,10 @@ MOM6_postdet() {
${NLN} "${COM_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc"
fi

if [[ "${DO_OCN_SPPT}" == "YES" ]]; then
${NLN} "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.mom6_increment.nc" "${DATA}/INPUT/mom6_increment.nc"
fi

# Copy MOM6 fixed files
${NCP} "${FIXgfs}/mom6/${OCNRES}/"* "${DATA}/INPUT/" # TODO: These need to be explicit

Expand All @@ -709,8 +735,8 @@ MOM6_postdet() {
# largest signed integer
if [[ "${DO_OCN_SPPT}" = "YES" ]] || [[ "${DO_OCN_PERT_EPBL}" = "YES" ]]; then
if [[ ${SET_STP_SEED:-"YES"} = "YES" ]]; then
ISEED_OCNSPPT=$(( (current_cycle*1000 + MEMBER*10 + 6) % 2147483647 ))
ISEED_EPBL=$(( (current_cycle*1000 + MEMBER*10 + 7) % 2147483647 ))
ISEED_OCNSPPT=$((CDATE*10000 + ${MEMBER#0}*100 + 8)),$((CDATE*10000 + ${MEMBER#0}*100 + 9)),$((CDATE*10000 + ${MEMBER#0}*100 + 10)),$((CDATE*10000 + ${MEMBER#0}*100 + 11)),$((CDATE*10000 + ${MEMBER#0}*100 + 12))
ISEED_EPBL=$((CDATE*10000 + ${MEMBER#0}*100 + 13)),$((CDATE*10000 + ${MEMBER#0}*100 + 14)),$((CDATE*10000 + ${MEMBER#0}*100 + 15)),$((CDATE*10000 + ${MEMBER#0}*100 + 16)),$((CDATE*10000 + ${MEMBER#0}*100 + 17))
else
ISEED=${ISEED:-0}
fi
Expand Down Expand Up @@ -924,6 +950,15 @@ GOCART_rc() {
if (( status != 0 )); then exit "${status}"; fi
fi
fi

if [[ ${BLENDED_WILDFIRE_EMISSIONS} == T ]]; then
fire_org='qfed_blended_so2.nc'
sed -i "s:${fire_org}:${fire_out}:g" ${DATA}/AERO_ExtData.rc
fire_org='qfed_blended_oc.nc'
sed -i "s:${fire_org}:${fire_out}:g" ${DATA}/AERO_ExtData.rc
fire_org='qfed_blended_bc.nc'
sed -i "s:${fire_org}:${fire_out}:g" ${DATA}/AERO_ExtData.rc
fi
}

GOCART_postdet() {
Expand All @@ -937,6 +972,19 @@ GOCART_postdet() {
rm -f "${COM_CHEM_HISTORY}/gocart.inst_aod.${vdate:0:8}_${vdate:8:2}00z.nc4"
fi

# Blended Wildire Emissions
BLENDED_WILDFIRE_EMISSIONS=${BLENDED_WILDFIRE_EMISSIONS:-F}
if [[ ${BLENDED_WILDFIRE_EMISSIONS} == T ]]; then
local EMISSION_DIR=${AERO_INPUTS_DIR}/nexus/GBBEPx/v4/climMean
local fhmax_day=$(( ${FHMAX_GFS} / 24 ))
local fire_in="${AERO_INPUTS_DIR}/nexus/QFED/${vdate:0:4}/${vdate:4:2}/qfed2.emis_*.${PDY}.nc4"
fire_out="${COM_TOP}/${MEMDIR}/model_data/chem/input/QFED_Blended_${PDY}_${fhmax_day}.nc"
if [[ ! -f ${fire_out} ]]; then
mkdir -p $(dirname ${fire_out})
${HOMEgfs}/ush/gefs_fireclimo_blend.py -s ${PDY} -n ${fhmax_day} -c ${EMISSION_DIR} -f ${fire_in} -o ${fire_out} -r 0.95
fi
fi

#To Do: Temporarily removing this as this will crash gocart, adding copy statement at the end
#${NLN} "${COM_CHEM_HISTORY}/gocart.inst_aod.${vdate:0:8}_${vdate:8:2}00z.nc4" \
# "${DATA}/gocart.inst_aod.${vdate:0:8}_${vdate:8:2}00z.nc4"
Expand Down
Loading

0 comments on commit 37718c0

Please sign in to comment.