Skip to content

Commit

Permalink
attempt at making ocn/ice output seperate from atm output
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA committed Feb 18, 2024
1 parent a23b7f2 commit 2b489fc
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 9 deletions.
3 changes: 2 additions & 1 deletion parm/config/gefs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,10 @@ export gfs_cyc=@gfs_cyc@ # 0: no GFS cycle, 1: 00Z only, 2: 00Z and 12Z only, 4:
export FHMIN_GFS=0
export FHMIN=${FHMIN_GFS}
export FHMAX_GFS=@FHMAX_GFS@
export FHOUT_GFS=6 # Must be 6 for S2S until #1629 is addressed; 3 for ops
export FHOUT_GFS=6
export FHMAX_HF_GFS=0
export FHOUT_HF_GFS=1
export FHOUT_OCNICE_GFS=6
if (( gfs_cyc != 0 )); then
export STEP_GFS=$(( 24 / gfs_cyc ))
else
Expand Down
1 change: 1 addition & 0 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export FHMAX=${FHMAX_GFS}
export FHOUT=${FHOUT_GFS}
export FHMAX_HF=${FHMAX_HF_GFS}
export FHOUT_HF=${FHOUT_HF_GFS}
export FHOUT_OCNICE_GFS=${FHOUT_OCNICE}

# Get task specific resources
source "${EXPDIR}/config.resources" fcst
Expand Down
4 changes: 3 additions & 1 deletion parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ fi
export FHMIN=0
export FHMAX=9
export FHOUT=3 # Will be changed to 1 in config.base if (DOHYBVAR set to NO and l4densvar set to false)
export FHOUT_OCNICE=3

# Cycle to run EnKF (set to BOTH for both gfs and gdas)
export EUPD_CYC="gdas"
Expand All @@ -258,9 +259,10 @@ export gfs_cyc=@gfs_cyc@ # 0: no GFS cycle, 1: 00Z only, 2: 00Z and 12Z only, 4:
# GFS output and frequency
export FHMIN_GFS=0
export FHMAX_GFS=@FHMAX_GFS@
export FHOUT_GFS=6 # Must be 6 for S2S until #1629 is addressed; 3 for ops
export FHOUT_GFS=3 # Must be 6 for S2S until #1629 is addressed; 3 for ops
export FHMAX_HF_GFS=0
export FHOUT_HF_GFS=1
export FHOUT_OCNICE_GFS=6
if (( gfs_cyc != 0 )); then
export STEP_GFS=$(( 24 / gfs_cyc ))
else
Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ case ${RUN} in
export FHOUT=${FHOUT_GFS}
export FHMAX_HF=${FHMAX_HF_GFS}
export FHOUT_HF=${FHOUT_HF_GFS}
export FHOUT_OCNICE=${FHOUT_OCNICE_GFS}
;;
*gdas)
export FHMAX_HF=0
Expand Down
4 changes: 2 additions & 2 deletions parm/ufs/fv3/diag_table
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"fv3_history", 0, "hours", 1, "hours", "time"
"fv3_history2d", 0, "hours", 1, "hours", "time"
"ocn%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "1901 1 1 0 0 0"
"ocn_daily%4yr%2mo%2dy", 1, "days", 1, "days", "time", 1, "days", "1901 1 1 0 0 0"
"ocn%4yr%2mo%2dy%2hr", @[FHOUT_OCNICE], "hours", 1, "hours", "time", @[FHOUT_OCNICE], "hours", "@[SYEAR] @[SMONTH] @[SDAY] @[CHOUR] 0 0"
"ocn_daily%4yr%2mo%2dy", 1, "days", 1, "days", "time", 1, "days", "@[SYEAR] @[SMONTH] @[SDAY] @[CHOUR] 0 0"

##############
# Ocean fields
Expand Down
4 changes: 2 additions & 2 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ CICE_predet(){
# Convert output settings into an explicit list for CICE
# Ignore "not used" warning
# shellcheck disable=SC2034
CICE_OUTPUT_FH=$(seq -s ' ' "${FHMIN}" "${FHOUT}" "${FHMAX}")
CICE_OUTPUT_FH=$(seq -s ' ' "${FHMIN}" "${FHOUT_OCNICE}" "${FHMAX}")

}

Expand All @@ -247,7 +247,7 @@ MOM6_predet(){
# Convert output settings into an explicit list for MOM6
# Ignore "not used" warning
# shellcheck disable=SC2034
MOM6_OUTPUT_FH=$(seq -s ' ' "${FHMIN}" "${FHOUT}" "${FHMAX}")
MOM6_OUTPUT_FH=$(seq -s ' ' "${FHMIN}" "${FHOUT_OCNICE}" "${FHMAX}")

}

Expand Down
2 changes: 1 addition & 1 deletion ush/parsing_namelists_CICE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ local CICE_RESTART_FILE="cice_model.res"
local CICE_DUMPFREQ="y" # "h","d","m" or "y" for restarts at intervals of "hours", "days", "months" or "years"
local CICE_DUMPFREQ_N=10000 # Set this to a really large value, as cice, mom6 and cmeps restart interval is controlled by ufs.configure
local CICE_DIAGFREQ=6
local CICE_HISTFREQ_N="0, 0, ${FHOUT}, 1, 1"
local CICE_HISTFREQ_N="0, 0, ${FHOUT_OCNICE}, 1, 1"
if [[ "${RUN}" =~ "gdas" ]]; then
local CICE_HIST_AVG=".false., .false., .false., .false., .false." # DA needs instantaneous
else
Expand Down
10 changes: 9 additions & 1 deletion ush/parsing_namelists_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ if [[ -n "${AERO_DIAG_TABLE:-}" ]]; then
cat "${AERO_DIAG_TABLE}"
fi
cat "${DIAG_TABLE_APPEND}"
} >> diag_table
} >> diag_table_template

local template=diag_table_template
local SYEAR=${current_cycle:0:4}
local SMONTH=${current_cycle:4:2}
local SDAY=${current_cycle:6:2}
local CHOUR=${current_cycle:8:2}
source "${HOMEgfs}/ush/atparse.bash"
atparse < "${template}" >> "diag_table"


# copy data table
Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/oceanice_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, config: Dict[str, Any]) -> None:
# TODO: This is a bit of a hack, but it works for now
# FIXME: find a better way to provide the averaging period
# This will be different for ocean and ice, so when they are made flexible, this will need to be addressed
avg_period = f"{self.config.FORECAST_HOUR-self.config.FHOUT_GFS:03d}-{self.config.FORECAST_HOUR:03d}"
avg_period = f"{self.config.FORECAST_HOUR-self.config.FHOUT_OCNICE_GFS:03d}-{self.config.FORECAST_HOUR:03d}"

localdict = AttrDict(
{'component': self.config.COMPONENT,
Expand Down
1 change: 1 addition & 0 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ def _get_ufs_postproc_grps(cdump, config, component='atmos'):
if component in ['ocean', 'ice']:
local_config['FHMAX_HF_GFS'] = config['FHMAX_GFS']
local_config['FHOUT_HF_GFS'] = config['FHOUT_GFS']
local_config['FHOUT_GFS']=config['FHOUT_OCNICE_GFS']

fhrs = Tasks._get_forecast_hours(cdump, local_config)

Expand Down

0 comments on commit 2b489fc

Please sign in to comment.