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 option to create WGNE atmosphere products #2233

Merged
merged 4 commits into from
Jan 18, 2024
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
6 changes: 6 additions & 0 deletions parm/config/gfs/config.atmos_products
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ if [[ "${RUN:-}" == "gdas" ]]; then
export downset=1
export FHOUT_PGBS=${FHOUT:-1} # Output frequency of supplemental gfs pgb file at 1.0 and 0.5 deg
export FLXGF="NO" # Create interpolated sflux.1p00 file
export WGNE="NO" # WGNE products are created for first FHMAX_WGNE forecast hours
export FHMAX_WGNE=0
elif [[ "${RUN:-}" == "gfs" ]]; then
export downset=2
export FHOUT_PGBS=${FHOUT_GFS:-3} # Output frequency of supplemental gfs pgb file at 1.0 and 0.5 deg
export FLXGF="YES" # Create interpolated sflux.1p00 file
export WGNE="YES" # WGNE products are created for first FHMAX_WGNE forecast hours
export FHMAX_WGNE=180
fi

export APCP_MSG="597" # Message number for APCP in GFSv16. Look for TODO in exglobal_atmos_products.sh

# paramlist files for the different forecast hours and downsets
export paramlista="${HOMEgfs}/parm/product/gfs.fFFF.paramlist.a.txt"
export paramlista_anl="${HOMEgfs}/parm/product/gfs.anl.paramlist.a.txt"
Expand Down
20 changes: 18 additions & 2 deletions scripts/exglobal_atmos_products.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
downset=${downset:-1} # No. of groups of pressure grib2 products to create
npe_atmos_products=${npe_atmos_products:-8} # no. of processors available to process each group

# WGNE related options
WGNE=${WGNE:-NO} # Create WGNE products
FHMAX_WGNE=${FHMAX_WGNE:-0} # WGNE products are created for first FHMAX_WGNE forecast hours (except 0)

cd "${DATA}" || exit 1

# Set paramlist files based on FORECAST_HOUR (-1, 0, 3, 6, etc.)
Expand Down Expand Up @@ -194,6 +198,15 @@
done
fi

# Section creating 0.25 degree WGNE products for nset=1, and fhr <= FHMAX_WGNE
if [[ "${WGNE:-}" == "YES" ]]; then
grp="" # TODO: this should be "a" when we eventually rename the pressure grib2 files per EE2 convention
if (( FORECAST_HOUR > 0 & FORECAST_HOUR <= FHMAX_WGNE )); then
# TODO: 597 is the message number for APCP in GFSv16. GFSv17 may change this as more messages are added. This can be controlled via config.atmos_products
${WGRIB2} "${COM_ATMOS_GRIB_0p25}/${PREFIX}pgrb2${grp}.0p25.${fhr3}" -d "${APCP_MSG:-597}" -grib "${COM_ATMOS_GRIB_0p25}/${PREFIX}wgne.${fhr3}"
fi
fi

#---------------------------------------------------------------

# Start sending DBN alerts
Expand All @@ -204,18 +217,21 @@
if [[ "${RUN}" == "gfs" ]]; then
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2B_0P25" "${job}" "${COM_ATMOS_GRIB_0p25}/${PREFIX}pgrb2b.0p25.${fhr3}"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2B_0P25_WIDX" "${job}" "${COM_ATMOS_GRIB_0p25}/${PREFIX}pgrb2b.0p25.${fhr3}.idx"
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
if [[ -s "${COM_ATMOS_GRIB_0p50}/${PREFIX}pgrb2.0p50.f${fhr3}" ]]; then
if [[ -s "${COM_ATMOS_GRIB_0p50}/${PREFIX}pgrb2.0p50.${fhr3}" ]]; then
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2_0P5" "${job}" "${COM_ATMOS_GRIB_0p50}/${PREFIX}pgrb2.0p50.${fhr3}"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2_0P5_WIDX" "${job}" "${COM_ATMOS_GRIB_0p50}/${PREFIX}pgrb2.0p50.${fhr3}.idx"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2B_0P5" "${job}" "${COM_ATMOS_GRIB_0p50}/${PREFIX}pgrb2b.0p50.${fhr3}"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2B_0P5_WIDX" "${job}" "${COM_ATMOS_GRIB_0p50}/${PREFIX}pgrb2b.0p50.${fhr3}.idx"
fi
if [[ -s "${COM_ATMOS_GRIB_1p00}/${PREFIX}pgrb2.1p00.f${fhr3}" ]]; then
if [[ -s "${COM_ATMOS_GRIB_1p00}/${PREFIX}pgrb2.1p00.${fhr3}" ]]; then
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2_1P0" "${job}" "${COM_ATMOS_GRIB_1p00}/${PREFIX}pgrb2.1p00.${fhr3}"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2_1P0_WIDX" "${job}" "${COM_ATMOS_GRIB_1p00}/${PREFIX}pgrb2.1p00.${fhr3}.idx"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2B_1P0" "${job}" "${COM_ATMOS_GRIB_1p00}/${PREFIX}pgrb2b.1p00.${fhr3}"
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_PGB2B_1P0_WIDX" "${job}" "${COM_ATMOS_GRIB_1p00}/${PREFIX}pgrb2b.1p00.${fhr3}.idx"
fi
if [[ "${WGNE:-}" == "YES"]] & [[ -s "${COM_ATMOS_GRIB_0p25}/${PREFIX}wgne.${fhr3}" ]] ; then
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
"${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_WGNE" "${job}" "${COM_ATMOS_GRIB_0p25}/${PREFIX}wgne.${fhr3}"
fi
fi

if [[ "${fhr3}" == "anl" ]]; then
Expand Down