From 7759163c668eb6ccc11dc1ecd39c0dc5d433cdc1 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 18 Jan 2024 01:13:49 -0500 Subject: [PATCH] Add option to create WGNE atmosphere products (#2233) Adds option to create WGNE products for the atmosphere. Resolves #1951 Resolves #2226 --- parm/config/gfs/config.atmos_products | 6 ++++++ scripts/exglobal_atmos_products.sh | 20 ++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.atmos_products b/parm/config/gfs/config.atmos_products index b8a09bf6bd..aefb1e7014 100644 --- a/parm/config/gfs/config.atmos_products +++ b/parm/config/gfs/config.atmos_products @@ -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" diff --git a/scripts/exglobal_atmos_products.sh b/scripts/exglobal_atmos_products.sh index 43c94bd6d0..5ebc7432f0 100755 --- a/scripts/exglobal_atmos_products.sh +++ b/scripts/exglobal_atmos_products.sh @@ -13,6 +13,10 @@ INTERP_ATMOS_SFLUXSH=${INTERP_ATMOS_SFLUXSH:-"${HOMEgfs}/ush/interp_atmos_sflux. 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.) @@ -194,6 +198,15 @@ if [[ "${FLXGF:-}" == "YES" ]]; then 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 @@ -204,18 +217,21 @@ if [[ "${SENDDBN:-}" == "YES" ]]; then 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" - 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 + "${DBNROOT}/bin/dbn_alert" MODEL "${RUN^^}_WGNE" "${job}" "${COM_ATMOS_GRIB_0p25}/${PREFIX}wgne.${fhr3}" + fi fi if [[ "${fhr3}" == "anl" ]]; then