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 8 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
6 changes: 1 addition & 5 deletions parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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 CHGRP_RSTPROD="@CHGRP_RSTPROD@"
export CHGRP_CMD="@CHGRP_CMD@"
export NCDUMP="${NETCDF:-${netcdf_c_ROOT:-}}/bin/ncdump"
Expand Down Expand Up @@ -260,10 +260,6 @@ export NMEM_ENS=@NMEM_ENS@
export ENSMEM=${ENSMEM:-"000"}
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 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
if [[ "${EXP_WARM_START}" = ".false." ]]; then
Expand Down
11 changes: 11 additions & 0 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ export SPPT_TAU=21600.
export SPPT_LSCALE=500000.
export SPPT_LOGIT=".true."
export SPPT_SFCLIMIT=".true."
# OCN options
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: 4 additions & 0 deletions parm/config/gefs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

echo "BEGIN: config.stage_ic"

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

# Get task specific resources
source "${EXPDIR}/config.resources" stage_ic

Expand Down
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:
STAGE_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 )) && [[ "${STAGE_OCN_PERTURB_FILES:-false}" == "true" ]]; then
NeilBarton-NOAA marked this conversation as resolved.
Show resolved Hide resolved
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
23 changes: 16 additions & 7 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,11 @@ MOM6_postdet() {
${NLN} "${COM_OCEAN_ANALYSIS}/${RUN}.t${cyc}z.ocninc.nc" "${DATA}/INPUT/mom6_increment.nc"
fi

# GEFS perturbations
if (( 0${MEMDIR:3} > 0 )) && [[ "${ODA_INCUPD:-False}" == "True" ]]; then
NeilBarton-NOAA marked this conversation as resolved.
Show resolved Hide resolved
${NLN} "${COM_OCEAN_RESTART_PREV}/${sPDY}.${scyc}0000.mom6_increment.nc" "${DATA}/INPUT/mom6_increment.nc"
fi

Copy link
Contributor

Choose a reason for hiding this comment

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

We may need to wrap this in a if [[ $RUN} == "gefs" ]] block to ensure it does not interfere with the GFS ensemble. That component is not ready yet, so we may just add a TODO for now and leave it at that.

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

Expand All @@ -707,13 +712,17 @@ 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
OCNSPPT=${OCNSPPT:-0.8,0.4,0.2,0.08,0.04}
Copy link
Contributor

Choose a reason for hiding this comment

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

should elevate this to config.efcs and remove from here.

OCNSPPT_TAU=${OCNSPPT_TAU:-2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7}
Copy link
Contributor

Choose a reason for hiding this comment

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

same for this variable.

OCNSPPT_LSCALE=${OCNSPPT_LSCALE:-500.E3,1000.E3,2000.E3,2000.E3,2000.E3}
Copy link
Contributor

Choose a reason for hiding this comment

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

and this.

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))
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
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}
Copy link
Contributor

Choose a reason for hiding this comment

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

raise these to config.efcs

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))
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
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:-1.0}
OCNSPPT_LSCALE=${OCNSPPT_LSCALE:-500e3}
OCNSPPT_TAU=${OCNSPPT_TAU:-21600}
NeilBarton-NOAA marked this conversation as resolved.
Show resolved Hide resolved
ISEED_OCNSPPT=${ISEED_OCNSPPT:-${ISEED}}
EOF
fi

if [[ "${DO_OCN_PERT_EPBL:-NO}" == "YES" ]]; then
cat >> input.nml <<EOF
EPBL=${EPBL:-1.0}
EPBL_LSCALE=${EPBL_LSCALE:-500e3}
EPBL_TAU=${EPBL_TAU:-21600}
NeilBarton-NOAA marked this conversation as resolved.
Show resolved Hide resolved
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