diff --git a/parm/config/gefs/config.base b/parm/config/gefs/config.base index da315a73e7..7ec3993f5f 100644 --- a/parm/config/gefs/config.base +++ b/parm/config/gefs/config.base @@ -74,7 +74,7 @@ export NCP="/bin/cp -p" export NMV="/bin/mv" export NLN="/bin/ln -sf" export VERBOSE="YES" -export KEEPDATA="NO" +export KEEPDATA="@KEEPDATA@" export DEBUG_POSTSCRIPT="NO" # PBS only; sets debug=true export CHGRP_RSTPROD="@CHGRP_RSTPROD@" export CHGRP_CMD="@CHGRP_CMD@" @@ -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 diff --git a/parm/config/gefs/config.efcs b/parm/config/gefs/config.efcs index a6f34818d7..e57584be17 100644 --- a/parm/config/gefs/config.efcs +++ b/parm/config/gefs/config.efcs @@ -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" diff --git a/parm/config/gefs/yaml/defaults.yaml b/parm/config/gefs/yaml/defaults.yaml index b19eb57e55..5d5fe5963d 100644 --- a/parm/config/gefs/yaml/defaults.yaml +++ b/parm/config/gefs/yaml/defaults.yaml @@ -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" + diff --git a/scripts/exglobal_stage_ic.sh b/scripts/exglobal_stage_ic.sh index 6a1be22e71..e7dfc3c495 100755 --- a/scripts/exglobal_stage_ic.sh +++ b/scripts/exglobal_stage_ic.sh @@ -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}" diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 1e244ab433..d112271d0c 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -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 @@ -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 @@ -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 diff --git a/ush/parsing_namelists_FV3.sh b/ush/parsing_namelists_FV3.sh index 14610f1201..ac18b06e71 100755 --- a/ush/parsing_namelists_FV3.sh +++ b/ush/parsing_namelists_FV3.sh @@ -631,6 +631,24 @@ EOF use_zmtnblck = ${use_zmtnblck:-".true."} EOF fi + + if [[ "${DO_OCN_SPPT:-NO}" == "YES" ]]; then + cat >> input.nml <> input.nml <> input.nml << EOF ${nam_stochy_nml:-} diff --git a/ush/parsing_namelists_MOM6.sh b/ush/parsing_namelists_MOM6.sh index 9c1378fec4..923288c76a 100755 --- a/ush/parsing_namelists_MOM6.sh +++ b/ush/parsing_namelists_MOM6.sh @@ -25,24 +25,6 @@ EOF # new_lscale=.true. #EOF -if [[ "${DO_OCN_SPPT}" == "YES" ]]; then - cat >> input.nml <> input.nml <> input.nml <