Skip to content

Commit

Permalink
finalize running EP5d
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilBarton-NOAA committed Feb 13, 2024
1 parent e5e91f1 commit cd28564
Show file tree
Hide file tree
Showing 8 changed files with 372 additions and 54 deletions.
30 changes: 15 additions & 15 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ source "${EXPDIR}/config.ufs" ${string}
# Get task specific resources
source "${EXPDIR}/config.resources" efcs

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

# Use serial I/O for ensemble (lustre?)
export OUTPUT_FILETYPE_ATM="netcdf"
export OUTPUT_FILETYPE_SFC="netcdf"
Expand All @@ -36,23 +39,20 @@ export RERUN_EFCSGRP="NO"
export WRITE_DOPOST=".true."

# 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
4 changes: 2 additions & 2 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ if [[ "${progsigma}" == ".true." ]]; then tbp="_progsigma" ; fi

# Radiation options
if [[ "${DO_AERO}" == "YES" ]]; then
export IAER=1011 ; #spectral band mapping method for aerosol optical properties
else
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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgdas_enkf_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fi
# gfs_physics_nml
export FHSWR=${FHSWR_ENKF:-${FHSWR:-3600.}}
export FHLWR=${FHLWR_ENKF:-${FHLWR:-3600.}}
export IEMS=${IEMS_ENKF:-${IEMS:-1}}
export IEMS=${IEMS_ENKF:-${IEMS:-2}}
export ISOL=${ISOL_ENKF:-${ISOL:-2}}
export IAER=${IAER_ENKF:-${IAER:-111}}
export ICO2=${ICO2_ENKF:-${ICO2:-2}}
Expand Down
9 changes: 9 additions & 0 deletions scripts/exglobal_stage_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
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
71 changes: 61 additions & 10 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ EOF
MM=$(printf %02d "${month}")
${NLN} "${FIXaer}/merra2.aerclim.2003-2014.m${MM}.nc" "aeroclim.m${MM}.nc"
done
${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"
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} "${FIXam}/global_co2historicaldata_glob.txt" "${DATA}/co2historicaldata_glob.txt"
${NLN} "${FIXam}/co2monthlycyc.txt" "${DATA}/co2monthlycyc.txt"
Expand Down Expand Up @@ -433,23 +433,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=0

This comment has been minimized.

Copy link
@bingfu-NOAA

bingfu-NOAA Feb 14, 2024

use this:
ISEED_SKEB = $((current_cycle1000 + MEMBER10 + 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 @@ -700,6 +722,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} "${FIXmom}/${OCNRES}/"* "${DATA}/INPUT/"

Expand Down Expand Up @@ -737,8 +763,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 @@ -1000,6 +1026,11 @@ GOCART_rc() {
if (( status != 0 )); then exit "${status}"; fi
fi
fi

if [[ ${BLENDED_WILDFIRE_EMISSIONS} == T ]]; then
fire_org='ExtData/nexus/QFED/%y4/%m2/qfed2.emis_so2.006.%y4%m2%d2.nc4'
sed -i "s:${fire_org}:${fire_out}:g" ${DATA}/AERO_ExtData.rc
fi
}

GOCART_postdet() {
Expand All @@ -1015,6 +1046,26 @@ 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=/scratch1/RDARCH/rda-arl-gpu/Barry.Baker/emissions/nexus/GBBEPx/v4/climMean
local fhmax_day=$(( ${FHMAX_GFS} / 24 ))
local fire_in="/scratch1/RDARCH/rda-arl-gpu/Barry.Baker/emissions/nexus/QFED/${vdate:0:4}/${vdate:4:2}/qfed2.emis_*.${PDY}.nc4"
fire_out="${COM_TOP}/mem000/model_data/chem/input/QFED_Blended_${PDY}_${fhmax_day}.nc"
if [[ ! -f ${fire_out} ]]; then
set +x
module purge
source ~Neil.Barton/.profile
set -x
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
source ${HOMEgfs}/ush/load_fv3gfs_modules.sh


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 cd28564

Please sign in to comment.