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 support for forecast-only low resolution #1648

Merged
merged 6 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
3 changes: 3 additions & 0 deletions jobs/rocoto/coupled_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ if [[ "${DO_OCN:-}" = "YES" ]]; then
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
case "${OCNRES}" in
"500")
echo "Do not have Mom.res_*.nc files for 5 deg ocean"
;;
"025")
for nn in $(seq 1 4); do
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res_${nn}.nc"
Expand Down
41 changes: 22 additions & 19 deletions jobs/rocoto/ocnpost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,28 @@ for fhr in ${fhrlst}; do
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
fi
if [[ -f "${COM_OCEAN_XSECT}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc" ]]; then
echo "File ${COM_OCEAN_XSECT}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc already exists"
else
ncks -v temp -d yh,503 -d xh,-299.92,60.03 \
"${COM_OCEAN_3D}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc" \
"${COM_OCEAN_XSECT}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
fi
if [[ -f "${COM_OCEAN_XSECT}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc" ]]; then
echo "File ${COM_OCEAN_XSECT}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc already exists"
else
ncks -v uo -d yh,503 -d xh,-299.92,60.03 \
"${COM_OCEAN_3D}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc" \
"${COM_OCEAN_XSECT}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
fi
fi
if [[ ${OCNRES} == "025" ]]; then
#TODO: the following code is hard-coded for OCNRES=025
if [[ -f "${COM_OCEAN_XSECT}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc" ]]; then
echo "File ${COM_OCEAN_XSECT}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc already exists"
else
ncks -v temp -d yh,503 -d xh,-299.92,60.03 \
"${COM_OCEAN_3D}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc" \
"${COM_OCEAN_XSECT}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
fi
if [[ -f "${COM_OCEAN_XSECT}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc" ]]; then
echo "File ${COM_OCEAN_XSECT}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc already exists"
else
ncks -v uo -d yh,503 -d xh,-299.92,60.03 \
"${COM_OCEAN_3D}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc" \
"${COM_OCEAN_XSECT}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
fi
fi
fi
done

# clean up working folder
Expand Down
12 changes: 12 additions & 0 deletions parm/config/gfs/config.coupled_ic
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ fi


case "${CASE}" in
"C48")
export CPL_ATMIC=workflowtest
export CPL_ICEIC=workflowtest
export CPL_OCNIC=workflowtest
export CPL_WAVIC=workflowtest
;;
"C96")
export CPL_ATMIC=workflowtest
export CPL_ICEIC=workflowtest
export CPL_OCNIC=workflowtest
export CPL_WAVIC=workflowtest
;;
"C384")
#C384 and P8 ICs
export CPL_ATMIC=GEFS-NoahMP-aerosols-p8c
Expand Down
15 changes: 14 additions & 1 deletion parm/config/gfs/config.ocnpost
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,21 @@ echo "BEGIN: config.ocnpost"
# Get task specific resources
source $EXPDIR/config.resources ocnpost

# Convert nemsio files to grib files using post job
# Convert netcdf files to grib files using post job
#-------------------------------------------
case "${OCNRES}" in
"025") export MAKE_OCN_GRIB="YES";;
"050") export MAKE_OCN_GRIB="NO";;
"100") export MAKE_OCN_GRIB="NO";;
"500") export MAKE_OCN_GRIB="NO";;
*) export MAKE_OCN_GRIB="NO";;
esac

if [[ "${machine}" = "WCOSS2" ]]; then
#Currently the conversion to netcdf uses NCL which is not on WCOSS2
#This should be removed when this is updated
export MAKE_OCN_GRIB="NO"
fi

# No. of concurrent post jobs [0 implies sequential]
export NPOSTGRP=2
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ elif [[ "${step}" = "fcst" || "${step}" = "efcs" ]]; then
# See https://docs.google.com/document/d/1bKpi-52t5jIfv2tuNHmQkYUe3hkKsiG_DG_s6Mnukog/edit
# TODO: Update reference when moved to ufs-weather-model RTD
MEDTHREADS=${nthreads_mediator:-1}
MEDPETS=${MEDPETS:-ATMPETS}
MEDPETS=${MEDPETS:-${FV3PETS}}
[[ "${MEDPETS}" -gt 300 ]] && MEDPETS=300
export MEDPETS MEDTHREADS
echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})"
Expand Down
3 changes: 2 additions & 1 deletion ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,8 @@ CICE_postdet() {
year=$(echo $CDATE|cut -c 1-4)
month=$(echo $CDATE|cut -c 5-6)
day=$(echo $CDATE|cut -c 7-8)
sec=$(echo $CDATE|cut -c 9-10)
hour=$(echo $CDATE|cut -c 9-10)
sec=$(($hour*3600))
stepsperhr=$((3600/$ICETIM))
nhours=$($NHOUR $CDATE ${year}010100)
steps=$((nhours*stepsperhr))
Expand Down
11 changes: 7 additions & 4 deletions workflow/rocoto/workflow_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,13 @@ def coupled_ic(self):
if self.app_config.do_ocean:
ocn_res = f"{self._base.get('OCNRES', '025'):03d}"
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_OCNIC']}/@Y@m@d@H/ocn"
for res in ['res'] + [f'res_{res_index}' for res_index in range(1, 4)]:
data = f"{prefix}/{ocn_res}/MOM.{res}.nc"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
data = f"{prefix}/{ocn_res}/MOM.res.nc"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
#for res in ['res'] + [f'res_{res_index}' for res_index in range(1, 4)]:
# data = f"{prefix}/{ocn_res}/MOM.{res}.nc"
# dep_dict = {'type': 'data', 'data': data}
# deps.append(rocoto.add_dependency(dep_dict))
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved

# Ice ICs
if self.app_config.do_ice:
Expand Down