Skip to content

Commit

Permalink
Merge pull request #2 from aerorahul/patch/pr2385
Browse files Browse the repository at this point in the history
Add co2 data location for reforecast case.  Issue NOAA-EMC#2403
  • Loading branch information
NeilBarton-NOAA committed Mar 19, 2024
2 parents d644a71 + ea965a6 commit 3b201cd
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 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 @@ -696,12 +703,12 @@ MOM6_postdet() {
fi

# GEFS perturbations
# TODO if [[ $RUN} == "gefs" ]] block maybe be needed
# 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 @@ -716,7 +723,7 @@ MOM6_postdet() {

# If using stochatic parameterizations, create a seed that does not exceed the
# largest signed integer
if [[ ${DO_OCN_SPPT} = "YES" ]]; then
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
Expand Down

0 comments on commit 3b201cd

Please sign in to comment.