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

Add GEFS Ocean Perturbation Options #2385

Merged
merged 24 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5cf91e9
GEFS stage ICs for C384 and with ocean perturbations
NeilBarton-NOAA Feb 29, 2024
1c670b0
edits for option to stage ocean perturbation files
NeilBarton-NOAA Feb 29, 2024
cb09d61
Update exglobal_stage_ic.sh
aerorahul Feb 29, 2024
a975e79
Update scripts/exglobal_stage_ic.sh
NeilBarton-NOAA Mar 1, 2024
03ed0ca
Update scripts/exglobal_stage_ic.sh
NeilBarton-NOAA Mar 1, 2024
622683d
Merge remote-tracking branch 'origin/develop' into EP5d_OCEANPERT
NeilBarton-NOAA Mar 5, 2024
267db5e
Ocean Ensmemble Options
NeilBarton-NOAA Mar 7, 2024
418e2e3
add some defaults to YAML
NeilBarton-NOAA Mar 8, 2024
cb537b3
Update ush/parsing_namelists_FV3.sh
NeilBarton-NOAA Mar 11, 2024
a15b3cd
Update ush/parsing_namelists_FV3.sh
NeilBarton-NOAA Mar 11, 2024
0a49463
moving variables to config files
NeilBarton-NOAA Mar 11, 2024
2639d86
Merge branch 'EP5d_OCEANPERT' of https://github.com/NeilBarton-NOAA/g…
NeilBarton-NOAA Mar 11, 2024
47ed894
Merge remote-tracking branch 'origin/develop' into EP5d_OCEANPERT
NeilBarton-NOAA Mar 12, 2024
e2dd1ea
Update scripts/exglobal_stage_ic.sh
NeilBarton-NOAA Mar 13, 2024
8b90841
Update ush/forecast_postdet.sh
NeilBarton-NOAA Mar 13, 2024
2a2d523
Merge branch 'develop' into EP5d_OCEANPERT
aerorahul Mar 14, 2024
1b50a39
Update scripts/exglobal_stage_ic.sh
aerorahul Mar 14, 2024
539b3ba
Merge branch 'develop' into EP5d_OCEANPERT
aerorahul Mar 14, 2024
8255a99
Merge branch 'develop' into EP5d_OCEANPERT
aerorahul Mar 14, 2024
1aa6c10
make OCAN ODA usage in GEFS dependent on if the OCN increments are st…
NeilBarton-NOAA Mar 15, 2024
d644a71
Merge branch 'EP5d_OCEANPERT' of https://github.com/NeilBarton-NOAA/g…
NeilBarton-NOAA Mar 15, 2024
ea965a6
add co2 data location for reforecast case. Issue #2403
aerorahul Mar 19, 2024
3b201cd
Merge pull request #2 from aerorahul/patch/pr2385
NeilBarton-NOAA Mar 19, 2024
ae0b592
Merge branch 'develop' into EP5d_OCEANPERT
aerorahul Mar 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export NCP="/bin/cp -p"
export NMV="/bin/mv"
export NLN="/bin/ln -sf"
export VERBOSE="YES"
export KEEPDATA="NO"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason to template this variable?

export KEEPDATA="@KEEPDATA@"
export DEBUG_POSTSCRIPT="NO" # PBS only; sets debug=true
export CHGRP_RSTPROD="@CHGRP_RSTPROD@"
export CHGRP_CMD="@CHGRP_CMD@"
Expand Down Expand Up @@ -262,7 +262,7 @@ export MEMDIR="mem${ENSMEM}"

# initialize ocean ensemble members with perturbations
# if true, only occurs for members greater than zero
export OCN_ENS_PERTURB_FILES=false
export USE_OCN_PERTURB_FILES=@STAGE_OCN_PERTURB_FILES@

export DOIAU="NO" # While we are not doing IAU, we may want to warm start w/ IAU in the future
# Check if cycle is cold starting
Expand Down
20 changes: 20 additions & 0 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,27 @@ export SPPT_TAU=21600.
export SPPT_LSCALE=500000.
export SPPT_LOGIT=".true."
export SPPT_SFCLIMIT=".true."
# OCN options
export DO_OCN_SPPT="YES"
export OCNSPPT="0.8,0.4,0.2,0.08,0.04"
export OCNSPPT_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
export OCNSPPT_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"
export DO_OCN_PERT_EPBL="YES"
export EPBL="0.8,0.4,0.2,0.08,0.04"
export EPBL_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
export EPBL_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"

if [[ "${USE_OCN_PERTURB_FILES:-false}" == "true" ]]; then
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
else
export ODA_INCUPD="False"
fi
export restart_interval="${restart_interval_gfs}"

echo "END: config.efcs"
5 changes: 5 additions & 0 deletions parm/config/gefs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ base:
DO_JEDIOCNVAR: "NO"
DO_JEDISNOWDA: "NO"
DO_MERGENSST: "NO"
KEEPDATA: "NO"
FHMAX_GFS: 120

stage_ic:
USE_OCN_PERTURB_FILES: "false"

2 changes: 1 addition & 1 deletion scripts/exglobal_stage_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do

# Ocean Perturbation Files
# Extra zero on MEMDIR ensure we have a number even if the string is empty
if (( 0${MEMDIR:3} > 0 )) && [[ "${OCN_ENS_PERTURB_FILES:-false}" == "true" ]]; then
if (( 0${MEMDIR:3} > 0 )) && [[ "${USE_OCN_PERTURB_FILES:-false}" == "true" ]]; 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}"
Expand Down
30 changes: 21 additions & 9 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,15 @@ EOF

${NLN} "${FIXgfs}/am/global_co2historicaldata_glob.txt" "${DATA}/co2historicaldata_glob.txt"
${NLN} "${FIXgfs}/am/co2monthlycyc.txt" "${DATA}/co2monthlycyc.txt"
if [[ ${ICO2} -gt 0 ]]; then
for file in $(ls "${FIXgfs}/am/fix_co2_proj/global_co2historicaldata"*) ; do
# Set historical CO2 values based on whether this is a reforecast run or not
# Ref. issue 2403
local co2dir
co2dir="fix_co2_proj"
if [[ ${reforecast:-"NO"} == "YES" ]]; then
co2dir="co2dat_4a"
fi
if (( ICO2 > 0 )); then
for file in $(ls "${FIXgfs}/am/${co2dir}/global_co2historicaldata"*) ; do
${NLN} "${file}" "${DATA}/$(basename "${file//global_}")"
done
fi
Expand Down Expand Up @@ -695,6 +702,13 @@ MOM6_postdet() {
${NLN} "${COM_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc"
fi

# GEFS perturbations
# TODO if [[ $RUN} == "gefs" ]] block maybe be needed
# to ensure it does not interfere with the GFS
if (( MEMBER > 0 )) && [[ "${ODA_INCUPD:-False}" == "True" ]]; 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,13 +723,11 @@ MOM6_postdet() {

# If using stochatic parameterizations, create a seed that does not exceed the
# 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 ))
else
ISEED=${ISEED:-0}
fi
if [[ ${DO_OCN_SPPT} = "YES" ]]; then
ISEED_OCNSPPT=$((current_cycle*10000 + ${MEMBER#0}*100 + 8)),$((current_cycle*10000 + ${MEMBER#0}*100 + 9)),$((current_cycle*10000 + ${MEMBER#0}*100 + 10)),$((current_cycle*10000 + ${MEMBER#0}*100 + 11)),$((current_cycle*10000 + ${MEMBER#0}*100 + 12))
fi
if [[ ${DO_OCN_PERT_EPBL} = "YES" ]]; then
ISEED_EPBL=$((current_cycle*10000 + ${MEMBER#0}*100 + 13)),$((current_cycle*10000 + ${MEMBER#0}*100 + 14)),$((current_cycle*10000 + ${MEMBER#0}*100 + 15)),$((current_cycle*10000 + ${MEMBER#0}*100 + 16)),$((current_cycle*10000 + ${MEMBER#0}*100 + 17))
fi

# Link output files
Expand Down
18 changes: 18 additions & 0 deletions ush/parsing_namelists_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,24 @@ EOF
use_zmtnblck = ${use_zmtnblck:-".true."}
EOF
fi

if [[ "${DO_OCN_SPPT:-NO}" == "YES" ]]; then
cat >> input.nml <<EOF
OCNSPPT=${OCNSPPT}
OCNSPPT_LSCALE=${OCNSPPT_LSCALE}
OCNSPPT_TAU=${OCNSPPT_TAU}
ISEED_OCNSPPT=${ISEED_OCNSPPT:-${ISEED}}
EOF
fi

if [[ "${DO_OCN_PERT_EPBL:-NO}" == "YES" ]]; then
cat >> input.nml <<EOF
EPBL=${EPBL}
EPBL_LSCALE=${EPBL_LSCALE}
EPBL_TAU=${EPBL_TAU}
ISEED_EPBL=${ISEED_EPBL:-${ISEED}}
EOF
fi

cat >> input.nml << EOF
${nam_stochy_nml:-}
Expand Down
28 changes: 5 additions & 23 deletions ush/parsing_namelists_MOM6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,6 @@ EOF
# new_lscale=.true.
#EOF

if [[ "${DO_OCN_SPPT}" == "YES" ]]; then
cat >> input.nml <<EOF
OCNSPPT=${OCNSPPT:-1.0}
OCNSPPT_LSCALE=${OCNSPPT_LSCALE:-500e3}
OCNSPPT_TAU=${OCNSPPT_TAU:-21600}
ISEED_OCNSPPT=${ISEED_OCNSPPT:-${ISEED}}
EOF
fi

if [[ "${DO_OCN_PERT_EPBL}" == "YES" ]]; then
cat >> input.nml <<EOF
EPBL=${EPBL:-1.0}
EPBL_LSCALE=${EPBL_LSCALE:-500e3}
EPBL_TAU=${EPBL_TAU:-21600}
ISEED_EPBL=${ISEED_EPBL:-${ISEED}}
EOF
fi

aerorahul marked this conversation as resolved.
Show resolved Hide resolved
#cat >> input.nml <<EOF
#/
#
Expand Down Expand Up @@ -85,12 +67,12 @@ else
local MOM6_USE_WAVES="False"
fi
# == MOM_oda_incupd section ==
local ODA_TEMPINC_VAR="Temp"
local ODA_SALTINC_VAR="Salt"
local ODA_THK_VAR="h"
local ODA_TEMPINC_VAR=${ODA_TEMPINC_VAR:-"Temp"}
local ODA_SALTINC_VAR=${ODA_SALTINC_VAR:-"Salt"}
local ODA_THK_VAR=${ODA_THK_VAR:-"h"}
local ODA_INCUPD_UV="True"
local ODA_UINC_VAR="u"
local ODA_VINC_VAR="v"
local ODA_UINC_VAR=${ODA_UINC_VAR:-"u"}
local ODA_VINC_VAR=${ODA_VINC_VAR:-"v"}
# ODA_INCUPD
# ODA_INCUPD_NHOURS
# == MOM_surface_forcing section ==
Expand Down
Loading