diff --git a/.gitignore b/.gitignore index f3cb1e1b3e..7669dac845 100644 --- a/.gitignore +++ b/.gitignore @@ -162,10 +162,6 @@ ush/global_cycle_driver.sh ush/jediinc2fv3.py ush/ufsda ush/soca -ush/make_NTC_file.pl -ush/make_ntc_bull.pl -ush/make_tif.sh -ush/month_name.sh ush/imsfv3_scf2ioda.py ush/atparse.bash ush/run_bufr2ioda.py diff --git a/ci/cases/pr/C48_S2SW_extended.yaml b/ci/cases/pr/C48_S2SW_extended.yaml new file mode 100644 index 0000000000..f3c2a567b7 --- /dev/null +++ b/ci/cases/pr/C48_S2SW_extended.yaml @@ -0,0 +1,21 @@ +experiment: + system: gfs + mode: forecast-only + +arguments: + pslot: {{ 'pslot' | getenv }} + app: S2SW + resdetatmos: 48 + resdetocean: 5.0 + comroot: {{ 'RUNTESTS' | getenv }}/COMROOT + expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR + idate: 2021032312 + edate: 2021032312 + yaml: {{ HOMEgfs }}/ci/cases/yamls/gfs_extended_ci.yaml + +skip_ci_on_hosts: + - hera + - gaea + - orion + - hercules + - wcoss2 # TODO run on WCOSS2 once the gfs_waveawipsbulls job is fixed diff --git a/ci/cases/yamls/gfs_extended_ci.yaml b/ci/cases/yamls/gfs_extended_ci.yaml index 2e7a173994..12ccda6bbd 100644 --- a/ci/cases/yamls/gfs_extended_ci.yaml +++ b/ci/cases/yamls/gfs_extended_ci.yaml @@ -6,7 +6,7 @@ base: DO_GOES: "YES" DO_BUFRSND: "YES" DO_GEMPAK: "YES" - DO_AWIPS: "NO" + DO_AWIPS: "YES" DO_NPOESS: "YES" DO_GENESIS_FSU: "NO" FCST_BREAKPOINTS: 192 diff --git a/env/HERA.env b/env/HERA.env index 051287004b..ec49724842 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -133,11 +133,6 @@ elif [[ "${step}" = "marinebmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" export APRUN_MARINEBMAT="${APRUN_default}" -elif [[ "${step}" = "marinebmat" ]]; then - - export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_MARINEBMAT="${APRUN_default}" - elif [[ "${step}" = "marineanlvar" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" diff --git a/gempak/ush/gdas_ecmwf_meta_ver.sh b/gempak/ush/gdas_ecmwf_meta_ver.sh index b038be6c25..66bd761979 100755 --- a/gempak/ush/gdas_ecmwf_meta_ver.sh +++ b/gempak/ush/gdas_ecmwf_meta_ver.sh @@ -24,7 +24,7 @@ fi export COMIN="gdas.${PDY}${cyc}" if [[ ! -L ${COMIN} ]]; then - ${NLN} "${COM_ATMOS_GEMPAK_1p00}" "${COMIN}" + ${NLN} "${COMIN_ATMOS_GEMPAK_1p00}" "${COMIN}" fi vergrid="F-GDAS | ${PDY:2}/0600" fcsthr="0600f006" @@ -152,16 +152,16 @@ if (( err != 0 )) || [[ ! -s ecmwfver.meta ]]; then exit "${err}" fi -mv ecmwfver.meta "${COM_ATMOS_GEMPAK_META}/ecmwfver_${PDY}_${cyc2}" +mv ecmwfver.meta "${COMOUT_ATMOS_GEMPAK_META}/ecmwfver_${PDY}_${cyc2}" export err=$? if (( err != 0 )) ; then - echo "FATAL ERROR: Failed to move meta file to ${COM_ATMOS_GEMPAK_META}/ecmwfver_${PDY}_${cyc2}" + echo "FATAL ERROR: Failed to move meta file to ${COMOUT_ATMOS_GEMPAK_META}/ecmwfver_${PDY}_${cyc2}" exit "${err}" fi if [[ "${SENDDBN}" == "YES" ]] ; then "${DBNROOT}/bin/dbn_alert" MODEL ECMWFVER_HPCMETAFILE "${job}" \ - "${COM_ATMOS_GEMPAK_META}/ecmwfver_${PDY}_${cyc2}" + "${COMOUT_ATMOS_GEMPAK_META}/ecmwfver_${PDY}_${cyc2}" fi exit diff --git a/gempak/ush/gdas_meta_loop.sh b/gempak/ush/gdas_meta_loop.sh index 3191789c9b..8baa4c2899 100755 --- a/gempak/ush/gdas_meta_loop.sh +++ b/gempak/ush/gdas_meta_loop.sh @@ -13,7 +13,7 @@ device="nc | gdasloop.meta" # export COMIN="${RUN}.${PDY}${cyc}" if [[ ! -L "${COMIN}" ]]; then - ${NLN} "${COM_ATMOS_GEMPAK_1p00}" "${COMIN}" + ${NLN} "${COMIN_ATMOS_GEMPAK_1p00}" "${COMIN}" fi if [[ "${envir}" == "para" ]] ; then @@ -38,10 +38,10 @@ for (( fhr=24; fhr<=144; fhr+=24 )); do cycles=$(seq -s ' ' -f "%02g" 0 6 "${cyc}") for cycle in ${cycles}; do # Test with GDAS in PROD - YMD=${day} HH=${cyc} GRID=1p00 declare_from_tmpl "COM_ATMOS_GEMPAK_1p00_past:COM_ATMOS_GEMPAK_TMPL" + YMD=${day} HH=${cyc} GRID=1p00 declare_from_tmpl "COMIN_ATMOS_GEMPAK_1p00_past:COM_ATMOS_GEMPAK_TMPL" export COMIN="${RUN}.${day}${cycle}" if [[ ! -L "${COMIN}" ]]; then - ${NLN} "${COM_ATMOS_GEMPAK_1p00_past}" "${COMIN}" + ${NLN} "${COMIN_ATMOS_GEMPAK_1p00_past}" "${COMIN}" fi gdfile="${COMIN}/gdas_1p00_${day}${cycle}f000" @@ -228,16 +228,16 @@ if (( err != 0 )) || [[ ! -s gdasloop.meta ]]; then exit "${err}" fi -mv gdasloop.meta "${COM_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_loop" +mv gdasloop.meta "${COMOUT_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_loop" export err=$? if (( err != 0 )) ; then - echo "FATAL ERROR: Failed to move meta file to ${COM_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_loop" + echo "FATAL ERROR: Failed to move meta file to ${COMOUT_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_loop" exit "${err}" fi if [[ ${SENDDBN} == "YES" ]] ; then "${DBNROOT}/bin/dbn_alert" MODEL "${DBN_ALERT_TYPE}" "${job}" \ - "${COM_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_loop" + "${COMOUT_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_loop" fi exit diff --git a/gempak/ush/gdas_meta_na.sh b/gempak/ush/gdas_meta_na.sh index 6a7e0a28c3..8873fa5a7c 100755 --- a/gempak/ush/gdas_meta_na.sh +++ b/gempak/ush/gdas_meta_na.sh @@ -13,7 +13,7 @@ device="nc | gdas.meta" # export COMIN="${RUN}.${PDY}${cyc}" if [[ ! -L "${COMIN}" ]]; then - ${NLN} "${COM_ATMOS_GEMPAK_1p00}" "${COMIN}" + ${NLN} "${COMIN_ATMOS_GEMPAK_1p00}" "${COMIN}" fi if [[ "${envir}" == "para" ]] ; then @@ -99,14 +99,14 @@ if (( err != 0 )) || [[ ! -s gdas.meta ]] &> /dev/null; then exit "${err}" fi -mv gdas.meta "${COM_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_na" +mv gdas.meta "${COMOUT_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_na" export err=$? if (( err != 0 )) ; then - echo "FATAL ERROR: Failed to move meta file to ${COM_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_na" + echo "FATAL ERROR: Failed to move meta file to ${COMOUT_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_na" exit "${err}" fi if [[ "${SENDDBN}" == "YES" ]] ; then "${DBNROOT}/bin/dbn_alert" MODEL "${DBN_ALERT_TYPE}" "${job}" \ - "${COM_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_na" + "${COMOUT_ATMOS_GEMPAK_META}/gdas_${PDY}_${cyc}_na" fi diff --git a/gempak/ush/gdas_ukmet_meta_ver.sh b/gempak/ush/gdas_ukmet_meta_ver.sh index be3d459e8c..065a3e95af 100755 --- a/gempak/ush/gdas_ukmet_meta_ver.sh +++ b/gempak/ush/gdas_ukmet_meta_ver.sh @@ -23,7 +23,7 @@ cp "${HOMEgfs}/gempak/fix/datatype.tbl" datatype.tbl # SET CURRENT CYCLE AS THE VERIFICATION GRIDDED FILE. export COMIN="gdas.${PDY}${cyc}" if [[ ! -L ${COMIN} ]]; then - ${NLN} "${COM_ATMOS_GEMPAK_1p00}" "${COMIN}" + ${NLN} "${COMINT_ATMOS_GEMPAK_1p00}" "${COMIN}" fi vergrid="F-GDAS | ${PDY:2}/0600" fcsthr="0600f006" @@ -155,16 +155,16 @@ if (( err != 0 )) || [[ ! -s ukmetver_12.meta ]]; then exit "${err}" fi -mv ukmetver_12.meta "${COM_ATMOS_GEMPAK_META}/ukmetver_${PDY}_12" +mv ukmetver_12.meta "${COMOUT_ATMOS_GEMPAK_META}/ukmetver_${PDY}_12" export err=$? if (( err != 0 )) ; then - echo "FATAL ERROR: Failed to move meta file to ${COM_ATMOS_GEMPAK_META}/ukmetver_${PDY}_12" + echo "FATAL ERROR: Failed to move meta file to ${COMOUT_ATMOS_GEMPAK_META}/ukmetver_${PDY}_12" exit "${err}" fi if [[ "${SENDDBN}" == "YES" ]] ; then "${DBNROOT}/bin/dbn_alert" MODEL UKMETVER_HPCMETAFILE "${job}" \ - "${COM_ATMOS_GEMPAK_META}/ukmetver_${PDY}_12" + "${COMOUT_ATMOS_GEMPAK_META}/ukmetver_${PDY}_12" fi exit diff --git a/gempak/ush/gempak_gdas_f000_gif.sh b/gempak/ush/gempak_gdas_f000_gif.sh index 80e28f5345..3e7ebf3c47 100755 --- a/gempak/ush/gempak_gdas_f000_gif.sh +++ b/gempak/ush/gempak_gdas_f000_gif.sh @@ -274,24 +274,24 @@ EOF # Copy the GIF images into my area -cp "${hgttmp850dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgttmp700dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgttmp500dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgtiso300dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgtiso250dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgtiso200dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${mslpthksfcdev}" "${COM_ATMOS_GEMPAK_GIF}/." +cp "${hgttmp850dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgttmp700dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgttmp500dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgtiso300dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgtiso250dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgtiso200dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${mslpthksfcdev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." # Send the GIF images onto the NCDC area on the public ftp server if [[ ${SENDDBN} == YES ]]; then - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp850dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp700dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp500dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso300dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso250dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso200dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp850dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp700dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp500dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso300dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso250dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso200dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" fi @@ -443,18 +443,18 @@ EOF # Copy the GIF images into my area -cp "${mslpthksfcdev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgttmp500dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgtiso300dev}" "${COM_ATMOS_GEMPAK_GIF}/." -cp "${hgtiso250dev}" "${COM_ATMOS_GEMPAK_GIF}/." +cp "${mslpthksfcdev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgttmp500dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgtiso300dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." +cp "${hgtiso250dev}" "${COMOUT_ATMOS_GEMPAK_GIF}/." # Copy the GIF images onto the NCDC area on the public ftp server if [[ ${SENDDBN} == YES ]]; then - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp500dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso300dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso250dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp500dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso300dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso250dev}" fi exit diff --git a/gempak/ush/gempak_gfs_f000_gif.sh b/gempak/ush/gempak_gfs_f000_gif.sh index 6a709fcc16..4393c01a7e 100755 --- a/gempak/ush/gempak_gfs_f000_gif.sh +++ b/gempak/ush/gempak_gfs_f000_gif.sh @@ -15,6 +15,8 @@ # ######################################################################### +source "${HOMEgfs}/ush/preamble.sh" + LATVAL="1/1/1/1/5;5" pixels="1728;1472" cp "${HOMEgfs}/gempak/fix/coltbl.spc" coltbl.xwp @@ -533,41 +535,41 @@ EOF # Copy the GIF images into my area -cp "${hgttmp700dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgttmp500dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtiso300dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtiso250dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgttmp250dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtiso200dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtiso100dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgttmp100dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${mslpthksfcdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${mslpthksfcusdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtvor500dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtvor500usdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${liftdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${prswshtropdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${rhvvel700dev}" "${COM_ATMOS_GEMPAK_GIF}" +cp "${hgttmp700dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgttmp500dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtiso300dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtiso250dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgttmp250dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtiso200dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtiso100dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgttmp100dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${mslpthksfcdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${mslpthksfcusdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtvor500dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtvor500usdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${liftdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${prswshtropdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${rhvvel700dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" # Copy the GIF images onto the NCDC area on the public ftp server if [[ "${SENDDBN}" == "YES" ]]; then - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp700dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp500dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso300dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso250dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp250dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso200dev}" -# "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp200dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtiso100dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgttmp100dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${mslpthksfcusdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtvor500dev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtvor500usdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${liftdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${prswshtropdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${rhvvel700dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp700dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp500dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso300dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso250dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp250dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso200dev}" +# "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp200dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtiso100dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp100dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${mslpthksfcusdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtvor500dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtvor500usdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${liftdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${prswshtropdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${rhvvel700dev}" @@ -576,7 +578,7 @@ fi # Convert the 500mb NH Hgts/Temps chart to tif, attach a heading and # send to TOC via the NTC -export input=${COM_ATMOS_GEMPAK_GIF}/${hgttmp500dev} +export input=${COMOUT_ATMOS_GEMPAK_GIF}/${hgttmp500dev} export HEADER=YES export OUTPATH=${DATA}/gfs_500_hgt_tmp_nh_anl_${cyc}.tif "${USHgfs}/make_tif.sh" diff --git a/gempak/ush/gempak_gfs_fhhh_gif.sh b/gempak/ush/gempak_gfs_fhhh_gif.sh index 33f5764068..2a89219ecc 100755 --- a/gempak/ush/gempak_gfs_fhhh_gif.sh +++ b/gempak/ush/gempak_gfs_fhhh_gif.sh @@ -7,6 +7,8 @@ # ######################################################################### +source "${HOMEgfs}/ush/preamble.sh" + LATVAL="1/1/1/1/5;5" pixels="1728;1472" cp "${HOMEgfs}/gempak/fix/coltbl.spc" coltbl.xwp @@ -170,18 +172,18 @@ EOF # Copy the GIF images into my area -cp "${mslpthksfcdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtvor500dev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${hgtvor500usdev}" "${COM_ATMOS_GEMPAK_GIF}" -cp "${rhvvel700dev}" "${COM_ATMOS_GEMPAK_GIF}" +cp "${mslpthksfcdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtvor500dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${hgtvor500usdev}" "${COMOUT_ATMOS_GEMPAK_GIF}" +cp "${rhvvel700dev}" "${COMOUT_ATMOS_GEMPAK_GIF}" # Copy the GIF images onto the NCDC area on the public ftp server if [[ "${SENDDBN}" == YES ]]; then - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtvor500dev}" - # "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${hgtvor500usdev}" - "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COM_ATMOS_GEMPAK_GIF}/${rhvvel700dev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${mslpthksfcdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtvor500dev}" + # "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${hgtvor500usdev}" + "${DBNROOT}/bin/dbn_alert" MODEL NCDCGIF "${job}" "${COMOUT_ATMOS_GEMPAK_GIF}/${rhvvel700dev}" fi echo "GEMPAK_GIF ${fhr3} hour completed normally" diff --git a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC index dca629c845..1a31e077f9 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC +++ b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC @@ -34,17 +34,17 @@ export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} ############################################## # Define COM directories ############################################## -GRID=1p00 YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COM_ATMOS_GEMPAK_1p00:COM_ATMOS_GEMPAK_TMPL" +GRID=1p00 YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COMIN_ATMOS_GEMPAK_1p00:COM_ATMOS_GEMPAK_TMPL" -GRID="meta" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COM_ATMOS_GEMPAK_META:COM_ATMOS_GEMPAK_TMPL" -if [[ ! -d "${COM_ATMOS_GEMPAK_META}" ]]; then - mkdir -m 775 -p "${COM_ATMOS_GEMPAK_META}" +GRID="meta" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COMOUT_ATMOS_GEMPAK_META:COM_ATMOS_GEMPAK_TMPL" +if [[ ! -d "${COMOUT_ATMOS_GEMPAK_META}" ]]; then + mkdir -m 775 -p "${COMOUT_ATMOS_GEMPAK_META}" fi if (( cyc%12 == 0 )); then - GRID="gif" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COM_ATMOS_GEMPAK_GIF:COM_ATMOS_GEMPAK_TMPL" - if [[ ! -d "${COM_ATMOS_GEMPAK_GIF}" ]]; then - mkdir -m 775 -p "${COM_ATMOS_GEMPAK_GIF}" + GRID="gif" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COMOUT_ATMOS_GEMPAK_GIF:COM_ATMOS_GEMPAK_TMPL" + if [[ ! -d "${COMOUT_ATMOS_GEMPAK_GIF}" ]]; then + mkdir -m 775 -p "${COMOUT_ATMOS_GEMPAK_GIF}" fi fi diff --git a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF index d62c3320a1..b9559ed7ac 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF +++ b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF @@ -29,17 +29,19 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COM_OBS" -GRID=1p00 YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COM_ATMOS_GEMPAK_1p00:COM_ATMOS_GEMPAK_TMPL" +YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_OBS:COM_OBS_TMPL +GRID=1p00 YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COMIN_ATMOS_GEMPAK_1p00:COM_ATMOS_GEMPAK_TMPL" +# Declare COMOUT_ATMOS_GEMPAK_GIF and COMOUT_ATMOS_GEMPAK_UPPER_AIR for grid in gif upper_air; do - gempak_dir="COM_ATMOS_GEMPAK_${grid^^}" + _GRID="${grid^^}" + gempak_dir="COMOUT_ATMOS_GEMPAK_${_GRID}" GRID=${grid} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "${gempak_dir}:COM_ATMOS_GEMPAK_TMPL" if [[ ! -d "${!gempak_dir}" ]]; then mkdir -m 775 -p "${!gempak_dir}"; fi done -YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_WMO -if [[ ! -d "${COM_ATMOS_WMO}" ]]; then mkdir -m 775 -p "${COM_ATMOS_WMO}"; fi +YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMOUT_ATMOS_WMO:COM_ATMOS_WMO_TMPL +if [[ ! -d "${COMOUT_ATMOS_WMO}" ]]; then mkdir -m 775 -p "${COMOUT_ATMOS_WMO}"; fi export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} @@ -65,4 +67,3 @@ fi if [[ "${KEEPDATA}" != "YES" ]] ; then rm -rf "${DATA}" fi - diff --git a/jobs/JGLOBAL_WAVE_GEMPAK b/jobs/JGLOBAL_WAVE_GEMPAK index 9822e4d416..c7b615c560 100755 --- a/jobs/JGLOBAL_WAVE_GEMPAK +++ b/jobs/JGLOBAL_WAVE_GEMPAK @@ -13,9 +13,11 @@ export DBN_ALERT_TYPE=GFS_WAVE_GEMPAK export SENDDBN=${SENDDBN:-YES} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_GRID COM_WAVE_GEMPAK +YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ + COMIN_WAVE_GRID:COM_WAVE_GRID_TMPL \ + COMOUT_WAVE_GEMPAK:COM_WAVE_GEMPAK_TMPL -if [[ ! -d ${COM_WAVE_GEMPAK} ]]; then mkdir -p "${COM_WAVE_GEMPAK}"; fi +if [[ ! -d ${COMOUT_WAVE_GEMPAK} ]]; then mkdir -p "${COMOUT_WAVE_GEMPAK}"; fi ######################################################## # Execute the script. diff --git a/modulefiles/module_base.wcoss2.lua b/modulefiles/module_base.wcoss2.lua index 830ea78b05..ad4f45f7d5 100644 --- a/modulefiles/module_base.wcoss2.lua +++ b/modulefiles/module_base.wcoss2.lua @@ -17,6 +17,7 @@ load(pathJoin("libjpeg", (os.getenv("libjpeg_ver") or "None"))) load(pathJoin("udunits", (os.getenv("udunits_ver") or "None"))) load(pathJoin("gsl", (os.getenv("gsl_ver") or "None"))) load(pathJoin("cdo", (os.getenv("cdo_ver") or "None"))) +load(pathJoin("imagemagick", (os.getenv("imagemagick_ver") or "None"))) load(pathJoin("hdf5", (os.getenv("hdf5_ver") or "None"))) load(pathJoin("netcdf", (os.getenv("netcdf_ver") or "None"))) diff --git a/parm/archive/gfs_downstream.yaml.j2 b/parm/archive/gfs_downstream.yaml.j2 index 94bdd1df56..43aa4df4ba 100644 --- a/parm/archive/gfs_downstream.yaml.j2 +++ b/parm/archive/gfs_downstream.yaml.j2 @@ -3,8 +3,10 @@ gfs_downstream: name: "GFS_DOWNSTREAM" target: "{{ ATARDIR }}/{{ cycle_YMDH }}/gfs_downstream.tar" required: + {% if DO_GEMPAK %} - "{{ COMIN_ATMOS_GEMPAK | relpath(ROTDIR) }}/gfs_{{ cycle_YMDH }}.sfc" - "{{ COMIN_ATMOS_GEMPAK | relpath(ROTDIR) }}/gfs_{{ cycle_YMDH }}.snd" + {% endif %} {% for i in range(1, NUM_SND_COLLECTIVES) %} - "{{ COMIN_ATMOS_BUFR | relpath(ROTDIR) }}/gfs_collective{{ i }}.fil" {% endfor %} diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 5acc7e5620..6a85a6de14 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1293,6 +1293,7 @@ case ${step} in ntasks=1 threads_per_task=1 memory="4GB" + tasks_per_node=1 ;; "mos_stn_prep") diff --git a/parm/config/gfs/config.waveawipsbulls b/parm/config/gfs/config.waveawipsbulls index 65a8d5076b..e8f27dd881 100644 --- a/parm/config/gfs/config.waveawipsbulls +++ b/parm/config/gfs/config.waveawipsbulls @@ -8,6 +8,4 @@ echo "BEGIN: config.waveawipsbulls" # Get task specific resources . $EXPDIR/config.resources waveawipsbulls -export DBNROOT=/dev/null - echo "END: config.waveawipsbulls" diff --git a/parm/config/gfs/config.waveawipsgridded b/parm/config/gfs/config.waveawipsgridded index bd7c7c11e4..48cbfda6a7 100644 --- a/parm/config/gfs/config.waveawipsgridded +++ b/parm/config/gfs/config.waveawipsgridded @@ -8,6 +8,12 @@ echo "BEGIN: config.waveawipsgridded" # Get task specific resources . $EXPDIR/config.resources waveawipsgridded -export DBNROOT=/dev/null +# AWIPS output frequency +export FHMAX_HF_WAV_WMO=72 +export FHMAX_WAV_WMO=180 +export FHOUT_HF_WAV_WMO=3 +export FHOUT_WAV_WMO=6 +export FHMAX_HF_WAV_WMO=$(( FHMAX_HF_WAV_WMO > FHMAX_WAV ? FHMAX_WAV : FHMAX_HF_WAV_WMO )) +export FHMAX_WAV_WMO=$(( FHMAX_WAV_WMO > FHMAX_WAV ? FHMAX_WAV : FHMAX_WAV_WMO )) echo "END: config.waveawipsgridded" diff --git a/scripts/exgdas_atmos_gempak_gif_ncdc.sh b/scripts/exgdas_atmos_gempak_gif_ncdc.sh index 2dc460cc55..f932fb570c 100755 --- a/scripts/exgdas_atmos_gempak_gif_ncdc.sh +++ b/scripts/exgdas_atmos_gempak_gif_ncdc.sh @@ -19,7 +19,7 @@ if [[ ${MODEL} == GDAS ]]; then max_tries=180 export fhr3 for fhr3 in ${fcsthrs}; do - gempak_file="${COM_ATMOS_GEMPAK_1p00}/${RUN}_1p00_${PDY}${cyc}f${fhr3}" + gempak_file="${COMIN_ATMOS_GEMPAK_1p00}/${RUN}_1p00_${PDY}${cyc}f${fhr3}" if ! wait_for_file "${gempak_file}" "${sleep_interval}" "${max_tries}" ; then echo "FATAL ERROR: ${gempak_file} not found after ${max_tries} iterations" exit 10 diff --git a/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh b/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh index f7e981c6b6..e8a7c305d5 100755 --- a/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh +++ b/scripts/exgfs_atmos_gempak_gif_ncdc_skew_t.sh @@ -27,7 +27,7 @@ if [[ "${MODEL}" == GDAS ]] || [[ "${MODEL}" == GFS ]]; then max_tries=180 for fhr in ${fcsthrs}; do fhr3=$(printf %03d "${fhr}") - export GRIBFILE=${COM_ATMOS_GEMPAK_1p00}/${RUN}_1p00_${PDY}${cyc}f${fhr3} + export GRIBFILE=${COMIN_ATMOS_GEMPAK_1p00}/${RUN}_1p00_${PDY}${cyc}f${fhr3} if ! wait_for_file "${GRIBFILE}" "${sleep_interval}" "${max_tries}" ; then echo "FATAL ERROR: ${GRIBFILE} not found after ${max_tries} iterations" exit 10 @@ -50,7 +50,7 @@ export RSHPDY="${PDY:4:}${PDY:2:2}" cp "${HOMEgfs}/gempak/dictionaries/sonde.land.tbl" sonde.land.tbl cp "${HOMEgfs}/gempak/dictionaries/metar.tbl" metar.tbl sort -k 2n,2 metar.tbl > metar_stnm.tbl -cp "${COM_OBS}/${model}.${cycle}.adpupa.tm00.bufr_d" fort.40 +cp "${COMIN_OBS}/${model}.${cycle}.adpupa.tm00.bufr_d" fort.40 err=$? if (( err != 0 )) ; then echo "FATAL ERROR: File ${model}.${cycle}.adpupa.tm00.bufr_d could not be copied (does it exist?)." @@ -68,11 +68,11 @@ export filesize=$( ls -l rdbfmsua.out | awk '{print $5}' ) ################################################################ if (( filesize > 40 )); then - cp rdbfmsua.out "${COM_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperair" - cp sonde.idsms.tbl "${COM_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperairtble" + cp rdbfmsua.out "${COMOUT_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperair" + cp sonde.idsms.tbl "${COMOUT_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperairtble" if [[ ${SENDDBN} = "YES" ]]; then - "${DBNROOT}/bin/dbn_alert" DATA MSUPPER_AIR "${job}" "${COM_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperair" - "${DBNROOT}/bin/dbn_alert" DATA MSUPPER_AIRTBL "${job}" "${COM_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperairtble" + "${DBNROOT}/bin/dbn_alert" DATA MSUPPER_AIR "${job}" "${COMOUT_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperair" + "${DBNROOT}/bin/dbn_alert" DATA MSUPPER_AIRTBL "${job}" "${COMOUT_ATMOS_GEMPAK_UPPER_AIR}/${RUN}.${cycle}.msupperairtble" fi fi diff --git a/scripts/exgfs_atmos_postsnd.sh b/scripts/exgfs_atmos_postsnd.sh index 8f2aa43568..61761b936d 100755 --- a/scripts/exgfs_atmos_postsnd.sh +++ b/scripts/exgfs_atmos_postsnd.sh @@ -117,7 +117,7 @@ for fhr in "${hour_list[@]}"; do echo "File ${filename} is required but not found." err_exit "FATAL ERROR: logf${fhr} not found." else - echo "${runscript} \"${fhr}\" \"${fhr_p}\" \"${FINT}\" \"${F00FLAG}\" \"${DATA}/${fhr}\"" >> "${DATA}/poescript_bufr" + echo "${runscript} ${fhr} ${fhr_p} ${FINT} ${F00FLAG} ${DATA}/${fhr}" >> "${DATA}/poescript_bufr" fi done diff --git a/scripts/exgfs_wave_nawips.sh b/scripts/exgfs_wave_nawips.sh index 949425cbc1..68ebfc90c7 100755 --- a/scripts/exgfs_wave_nawips.sh +++ b/scripts/exgfs_wave_nawips.sh @@ -14,7 +14,7 @@ source "${USHgfs}/preamble.sh" #export grids=${grids:-'glo_30m at_10m ep_10m wc_10m ao_9km'} #Interpolated grids -export grids=${grids:-'glo_30m'} #Native grids +export grids=${grids:-${waveinterpGRD:-'glo_30m'}} #Native grids export RUNwave=${RUNwave:-${RUN}wave} export fstart=${fstart:-0} export FHMAX_WAV=${FHMAX_WAV:-180} #180 Total of hours to process @@ -68,13 +68,15 @@ while [ ${fhcnt} -le ${FHMAX_WAV} ]; do gso_15m) grdIDin='gsouth.0p25' #grdIDout='gfswaves25k' ;; grdIDout='gfswavesh' ;; - *) gridIDin= + glo_200) grdIDin='global.2p00' + grdIDout='gfswaves200k' ;; + *) grdIDin= grdIDout= ;; esac - GRIBIN="${COM_WAVE_GRID}/${RUNwave}.${cycle}.${grdIDin}.f${fhr}.grib2" + GRIBIN="${COMIN_WAVE_GRID}/${RUNwave}.${cycle}.${grdIDin}.f${fhr}.grib2" GRIBIN_chk=${GRIBIN}.idx if ! wait_for_file "${GRIBIN_chk}" "${sleep_interval}" "${maxtries}"; then - echo "FATAL ERROR: ${GRIBIN_chk} not found after waiting $((sleep_interval * ( max_tries - 1))) secs" + echo "FATAL ERROR: ${GRIBIN_chk} not found after waiting $((sleep_interval * ( maxtries - 1))) secs" echo "${RUNwave} ${grdID} ${fhr} prdgen ${date} ${cycle} : GRIB file missing." >> "${wavelog}" err=1;export err;"${errchk}" || exit "${err}" fi @@ -140,11 +142,11 @@ while [ ${fhcnt} -le ${FHMAX_WAV} ]; do gpend fi - cpfs "${GEMGRD}" "${COM_WAVE_GEMPAK}/${GEMGRD}" + cpfs "${GEMGRD}" "${COMOUT_WAVE_GEMPAK}/${GEMGRD}" if [ ${SENDDBN} = "YES" ] ; then - "${DBNROOT}/bin/dbn_alert" MODEL "${DBN_ALERT_TYPE}" "${job}" "${COM_WAVE_GEMPAK}/${GEMGRD}" + "${DBNROOT}/bin/dbn_alert" MODEL "${DBN_ALERT_TYPE}" "${job}" "${COMOUT_WAVE_GEMPAK}/${GEMGRD}" else - echo "##### DBN_ALERT is: MODEL ${DBN_ALERT_TYPE} ${job} ${COM_WAVE_GEMPAK}/${GEMGRD}#####" + echo "##### DBN_ALERT is: MODEL ${DBN_ALERT_TYPE} ${job} ${COMOUT_WAVE_GEMPAK}/${GEMGRD}#####" fi rm grib_${grid} done diff --git a/scripts/exgfs_wave_prdgen_bulls.sh b/scripts/exgfs_wave_prdgen_bulls.sh index 5f5b2c531e..714b9a82b2 100755 --- a/scripts/exgfs_wave_prdgen_bulls.sh +++ b/scripts/exgfs_wave_prdgen_bulls.sh @@ -150,18 +150,18 @@ source "${USHgfs}/preamble.sh" echo ' Looping over buoys ... \n' for bull in $bulls; do - fname="${RUNwave}.$bull.cbull" + fname="${RUNwave}.${bull}.cbull" oname="awipsbull.$bull.$cycle.${RUNwave}" headr=$(grep "b${bull}=" awipsbull.data | sed 's/=/ /g' | awk '{ print $3}') echo " Processing $bull ($headr $oname) ..." - if [ -z "$headr" ] || [ ! -s $fname ]; then + if [[ -z "${headr}" ]] || [[ ! -s "${fname}" ]]; then set_trace - msg="ABNORMAL EXIT: MISSING BULLETING INFO" + msg="ABNORMAL EXIT: MISSING BULLETIN INFO" set +x echo ' ' echo '******************************************** ' - echo '*** FATAL ERROR : MISSING BULLETING INFO *** ' + echo '*** FATAL ERROR : MISSING BULLETIN INFO *** ' echo '******************************************** ' echo ' ' echo $msg @@ -177,7 +177,7 @@ source "${USHgfs}/preamble.sh" -p "${COMOUT_WAVE_WMO}" -s "NO" -o "${oname}" > formbul.out 2>&1 OK=$? - if [ "$OK" != '0' ] || [ ! -f $oname ]; then + if [[ ${OK} -ne 0 ]] || [[ ! -f "${oname}" ]]; then set_trace cat formbul.out msg="ABNORMAL EXIT: ERROR IN formbul" @@ -194,7 +194,7 @@ source "${USHgfs}/preamble.sh" exit $err fi - cat $oname >> awipsbull.$cycle.${RUNwave} + cat "${oname}" >> "awipsbull.$cycle.${RUNwave}" done diff --git a/scripts/exgfs_wave_prdgen_gridded.sh b/scripts/exgfs_wave_prdgen_gridded.sh index 9111c81273..8fd6b5cc76 100755 --- a/scripts/exgfs_wave_prdgen_gridded.sh +++ b/scripts/exgfs_wave_prdgen_gridded.sh @@ -9,7 +9,7 @@ # - Supplemental error output is witten to the wave.log file. # # # # COM inputs: # -# - ${COMIN_WAVE_GRID}/${RUNwave}.${cycle}.${grdID}.f${fhr}.grib2 # +# - ${COMIN_WAVE_GRID}/${RUNwave}.${cycle}.${grdIDin}.f${fhr}.grib2 # # # # COM outputs: # # - ${COMOUT_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut} # @@ -31,38 +31,40 @@ source "${USHgfs}/preamble.sh" export RUNwave=${RUNwave:-${RUN}wave} export envir=${envir:-ops} export fstart=${fstart:-0} - export FHMAX_WAV=${FHMAX_WAV:-180} #180 Total of hours to process - export FHMAX_HF_WAV=${FHMAX_HF_WAV:-72} #from 00 to 72 inc=3 - export FHOUT_WAV=${FHOUT_WAV:-6} #from 72 to 180 inc=6 - export FHOUT_HF_WAV=${FHOUT_HF_WAV:-3} + export FHMAX_WAV=${FHMAX_WAV_WMO:-180} #180 Total of hours to process + export FHMAX_HF_WAV=${FHMAX_HF_WAV_WMO:-72} #from 00 to 72 inc=3 + export FHOUT_WAV=${FHOUT_WAV_WMO:-6} #from 72 to 180 inc=6 + export FHOUT_HF_WAV=${FHOUT_HF_WAV_WMO:-3} export maxtries=720 export cyc=${cyc:-00} export cycle=${cycle:-t${cyc}z} export pgmout=OUTPUT.$$ export DATA=${DATA:-${DATAROOT:?}/${job}.$$} - mkdir -p $DATA - cd $DATA + mkdir -p "${DATA}" + cd "${DATA}" || exit 1 export wavelog=${DATA}/${RUNwave}_prdggridded.log echo "Starting MWW3 GRIDDED PRODUCTS SCRIPT" +# Input grid +grid_in="${waveinterpGRD:-glo_15mxt}" # Output grids - # grids=${grids:-ao_9km at_10m ep_10m wc_10m glo_30m} -grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} +grids=${grids:-ao_9km at_10m ep_10m wc_10m glo_30m} # export grids=${wavepostGRD} maxtries=${maxtries:-720} # 0.b Date and time stuff - export date=$PDY + start_time=$(date) + export date=${PDY} export YMDH=${PDY}${cyc} echo ' ' echo ' ****************************' echo ' *** MWW3 PRODUCTS SCRIPT ***' echo ' ****************************' - echo " $date $cycle" + echo " ${date} ${cycle}" echo ' ' - echo "Starting at : $(date)" + echo "Starting at : ${start_time}" echo ' ' echo " AWIPS grib fields" - echo " Wave Grids : $grids" + echo " Wave Grids : ${grids}" echo ' ' set_trace @@ -79,16 +81,28 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} ASWDIR=(SWDIR1 SWDIR2) # Indices of DIRECTIONS from partitions # (should be same as ASWELL) #export arrpar=(WIND UGRD VGRD HTSGW PERPW DIRPW WVHGT WVPER WVDIR WDIR ${ASWELL[@]} ${ASWDIR[@]} ${ASWPER[@]}) - export arrpar=(WIND WDIR UGRD VGRD HTSGW PERPW DIRPW WVHGT ${ASWELL[@]} WVPER ${ASWPER[@]} WVDIR ${ASWDIR[@]} ) - export nparam=$(echo ${arrpar[@]} | wc -w) + export arrpar=(WIND WDIR UGRD VGRD HTSGW PERPW DIRPW WVHGT "${ASWELL[@]}" WVPER "${ASWPER[@]}" WVDIR "${ASWDIR[@]}" ) + export nparam=$(echo "${arrpar[@]}" | wc -w) # 1.a Grib file (AWIPS and FAX charts) - fhcnt=$fstart - while [ $fhcnt -le $FHMAX_WAV ]; do - fhr=$(printf "%03d" $fhcnt) - for grdOut in $grids;do - case $grdOut in + # Get input grid + # TODO flesh this out with additional input grids if needed + case ${grid_in} in + glo_200) + grdIDin='global.2p00' ;; + glo_15mxt) + grdIDin='global.0p25' ;; + *) + echo "FATAL ERROR Unrecognized input grid ${grid_in}" + exit 2;; + esac + + fhcnt=${fstart} + while [[ "${fhcnt}" -le "${FHMAX_WAV}" ]]; do + fhr=$(printf "%03d" "${fhcnt}") + for grdOut in ${grids}; do + case ${grdOut} in ao_9km) grdID='arctic.9km' ;; at_10m) grdID='atlocn.0p16' ;; ep_10m) grdID='epacif.0p16' ;; @@ -100,56 +114,58 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} esac # - GRIBIN="${COM_WAVE_GRID}/${RUNwave}.${cycle}.${grdID}.f${fhr}.grib2" + GRIBIN="${COMIN_WAVE_GRID}/${RUNwave}.${cycle}.${grdIDin}.f${fhr}.grib2" GRIBIN_chk="${GRIBIN}.idx" sleep_interval=5 max_tries=1000 if ! wait_for_file "${GRIBIN_chk}" "${sleep_interval}" "${max_tries}"; then echo "FATAL ERROR: ${GRIBIN_chk} not found after waiting $((sleep_interval * ( max_tries - 1))) secs" - echo "$RUNwave $grdID ${fhr} prdgen $date $cycle : GRIB file missing." >> $wavelog - err=1;export err;${errchk} || exit ${err} + echo "${RUNwave} ${grdIDin} ${fhr} prdgen ${date} ${cycle} : GRIB file missing." >> "${wavelog}" + err=1;export err;${errchk} || exit "${err}" fi - GRIBOUT=$RUNwave.$cycle.$grdID.f${fhr}.clipped.grib2 + GRIBOUT="${RUNwave}.${cycle}.${grdID}.f${fhr}.clipped.grib2" iparam=1 - while [ ${iparam} -le ${nparam} ]; do - nip=${arrpar[$iparam-1]} - prepar=$(echo $nip | rev | cut -c2- | rev) #Part prefix (assumes 1 digit index) - paridx=$(echo $nip | rev | cut -c-1) + while [[ "${iparam}" -le "${nparam}" ]]; do + nip=${arrpar[${iparam}-1]} + prepar=${nip::-1} # Part prefix (assumes 1 digit index) + paridx="${nip:0-1}" npart=0 - case $prepar in + case ${prepar} in SWELL) npart=1 ;; SWDIR) npart=1 ;; SWPER) npart=1 ;; *) npart=0 ;; esac - echo $nip $prepar $paridx $npart - rm temp.grib2 - if [ "${npart}" = "0" ]; then - $WGRIB2 $GRIBIN -s | grep ":${nip}" | $WGRIB2 -i $GRIBIN -grib temp.grib2 > wgrib.out 2>&1 - $WGRIB2 temp.grib2 -append -grib $GRIBOUT + echo "${nip} ${prepar} ${paridx} ${npart}" + rm -f temp.grib2 + if [[ "${npart}" -eq 0 ]]; then + #shellcheck disable=SC2312 + ${WGRIB2} "${GRIBIN}" -s | grep ":${nip}" | "${WGRIB2}" -i "${GRIBIN}" -grib temp.grib2 > wgrib.out 2>&1 + #shellcheck disable=SC2312 + ${WGRIB2} temp.grib2 -append -grib "${GRIBOUT}" else - $WGRIB2 $GRIBIN -s | grep ":${prepar}" | grep "${paridx} in sequence" | \ - $WGRIB2 -i $GRIBIN -grib temp.grib2 > wgrib.out 2>&1 - $WGRIB2 temp.grib2 -append -grib $GRIBOUT + #shellcheck disable=SC2312 + ${WGRIB2} "${GRIBIN}" -s | grep ":${prepar}" | grep "${paridx} in sequence" | \ + ${WGRIB2} -i "${GRIBIN}" -grib temp.grib2 > wgrib.out 2>&1 + ${WGRIB2} temp.grib2 -append -grib "${GRIBOUT}" fi - iparam=$(expr ${iparam} + 1) + iparam=$(( iparam + 1 )) done #end wave param loop #====================================================================== - GRIBIN=$RUNwave.$cycle.$grdID.f${fhr}.clipped.grib2 - GRIBIN_chk=$GRIBIN.idx + GRIBIN="${RUNwave}.${cycle}.${grdID}.f${fhr}.clipped.grib2" - ${NLN} $GRIBIN gribfile.$grdID.f${fhr} + ${NLN} "${GRIBIN}" "gribfile.${grdID}.f${fhr}" # # 1.d Input template files - parmfile=${PARMgfs}/wave/grib2_${RUNwave}.$grdOut.f${fhr} - if [ -f $parmfile ]; then - ${NLN} $parmfile awipsgrb.$grdID.f${fhr} + parmfile="${PARMgfs}/wave/grib2_${RUNwave}.${grdOut}.f${fhr}" + if [[ -f "${parmfile}" ]]; then + ${NLN} "${parmfile}" "awipsgrb.${grdID}.f${fhr}" else - echo '*** ERROR : NO template grib2_${RUNwave}.$grdID.f${fhr} *** ' - echo "$RUNwave $grdID $fhr prdgen $date $cycle : GRIB template file missing." >> $wavelog - err=3;export err;${errchk} || exit ${err} + echo "FATAL ERROR: NO template grib2_${RUNwave}.${grdID}.f${fhr}" + echo "${RUNwave} ${grdID} ${fhr} prdgen ${date} ${cycle} : GRIB template file missing." >> "${wavelog}" + err=3;export err;${errchk} || exit "${err}" fi # # 2. AWIPS product generation @@ -161,26 +177,25 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} # 2.a.1 Set up for tocgrib2 echo " Do set up for tocgrib2." set_trace - #AWIPSGRB=awipsgrib.$grdID.f${fhr} AWIPSGRB=awipsgrib # 2.a.2 Make GRIB index echo " Make GRIB index for tocgrib2." set_trace - $GRB2INDEX gribfile.$grdID.f${fhr} gribindex.$grdID.f${fhr} + ${GRB2INDEX} "gribfile.${grdID}.f${fhr}" "gribindex.${grdID}.f${fhr}" OK=$? - if [ "$OK" != '0' ] + if [[ ${OK} -ne 0 ]] then - msg="ABNORMAL EXIT: ERROR IN grb2index MWW3 for grid $grdID" + msg="ABNORMAL EXIT: ERROR IN grb2index MWW3 for grid ${grdID}" #set +x echo ' ' echo '******************************************** ' echo '*** FATAL ERROR : ERROR IN grb2index MWW3 *** ' echo '******************************************** ' echo ' ' - echo $msg + echo "${msg}" #set_trace - echo "$RUNwave $grdID prdgen $date $cycle : error in grbindex." >> $wavelog + echo "${RUNwave} ${grdID} prdgen ${date} ${cycle} : error in grbindex." >> "${wavelog}" err=4;export err;err_chk fi @@ -192,13 +207,13 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} export pgmout=tocgrib2.out . prep_step - export FORT11="gribfile.$grdID.f${fhr}" - export FORT31="gribindex.$grdID.f${fhr}" - export FORT51="$AWIPSGRB.$grdID.f${fhr}" + export FORT11="gribfile.${grdID}.f${fhr}" + export FORT31="gribindex.${grdID}.f${fhr}" + export FORT51="${AWIPSGRB}.${grdID}.f${fhr}" - $TOCGRIB2 < awipsgrb.$grdID.f${fhr} > tocgrib2.out 2>&1 + ${TOCGRIB2} < "awipsgrb.${grdID}.f${fhr}" > tocgrib2.out 2>&1 OK=$? - if [ "$OK" != '0' ]; then + if [[ ${OK} -ne 0 ]]; then cat tocgrib2.out msg="ABNORMAL EXIT: ERROR IN tocgrib2" #set +x @@ -207,9 +222,9 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} echo '*** FATAL ERROR : ERROR IN tocgrib2 *** ' echo '*************************************** ' echo ' ' - echo $msg + echo "${msg}" #set_trace - echo "$RUNwave prdgen $date $cycle : error in tocgrib2." >> $wavelog + echo "${RUNwave} prdgen ${date} ${cycle} : error in tocgrib2." >> "${wavelog}" err=5;export err;err_chk else echo '*** tocgrib2 ran succesfully *** ' @@ -219,27 +234,27 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m} echo " Get awips GRIB bulletins out ..." #set_trace #set +x - echo " Saving $AWIPSGRB.$grdOut.f${fhr} as grib2.$cycle.awipsww3_${grdID}.f${fhr}" + echo " Saving ${AWIPSGRB}.${grdOut}.f${fhr} as grib2.${cycle}.awipsww3_${grdID}.f${fhr}" echo " in ${COMOUT_WAVE_WMO}" #set_trace cp "${AWIPSGRB}.${grdID}.f${fhr}" "${COMOUT_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut}" #set +x - if [ "$SENDDBN" = 'YES' ] + if [[ "${SENDDBN}" != 'YES' ]] then - echo " Sending $AWIPSGRB.$grdID.f${fhr} to DBRUN." + echo " Sending ${AWIPSGRB}.${grdID}.f${fhr} to DBRUN." "${DBNROOT}/bin/dbn_alert" GRIB_LOW "${RUN}" "${job}" "${COMOUT_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut}" fi - rm -f $AWIPSGRB.$grdID.f${fhr} tocgrib2.out + rm -f "${AWIPSGRB}.${grdID}.f${fhr}" tocgrib2.out done # For grids - if [ $fhcnt -ge $FHMAX_HF_WAV ]; then - inc=$FHOUT_WAV + if [[ ${fhcnt} -ge ${FHMAX_HF_WAV} ]]; then + inc="${FHOUT_WAV}" else - inc=$FHOUT_HF_WAV + inc="${FHOUT_HF_WAV}" fi - let fhcnt=fhcnt+inc + ((fhcnt = fhcnt+inc)) done #For fcst time diff --git a/scripts/exglobal_archive.py b/scripts/exglobal_archive.py index ae613fb39c..df49704e06 100755 --- a/scripts/exglobal_archive.py +++ b/scripts/exglobal_archive.py @@ -40,7 +40,7 @@ def main(): 'NMEM_ENS', 'DO_JEDIATMVAR', 'DO_VRFY_OCEANDA', 'FHMAX_FITS', 'waveGRD', 'IAUFHRS', 'DO_FIT2OBS', 'NET', 'FHOUT_HF_GFS', 'FHMAX_HF_GFS', 'REPLAY_ICS', 'OFFSET_START_HOUR', 'ARCH_EXPDIR', 'EXPDIR', 'ARCH_EXPDIR_FREQ', 'ARCH_HASHES', - 'ARCH_DIFFS', 'SDATE', 'EDATE', 'HOMEgfs'] + 'ARCH_DIFFS', 'SDATE', 'EDATE', 'HOMEgfs', 'DO_GEMPAK'] archive_dict = AttrDict() for key in keys: diff --git a/sorc/gfs_utils.fd b/sorc/gfs_utils.fd index 4848ecbb5e..6274ae7b2e 160000 --- a/sorc/gfs_utils.fd +++ b/sorc/gfs_utils.fd @@ -1 +1 @@ -Subproject commit 4848ecbb5e713b16127433e11f7d3edc6ac784c4 +Subproject commit 6274ae7b2eb6cd3d3ad02b5ad3a16b7d9be1a496 diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index b70b9e894f..1988fe60f6 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -167,9 +167,6 @@ cd "${HOMEgfs}/ush" || exit 8 for file in emcsfc_ice_blend.sh global_cycle_driver.sh emcsfc_snow.sh global_cycle.sh; do ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_utils.fd/ush/${file}" . done -for file in make_ntc_bull.pl make_NTC_file.pl make_tif.sh month_name.sh; do - ${LINK_OR_COPY} "${HOMEgfs}/sorc/gfs_utils.fd/ush/${file}" . -done # Link these templates from ufs-weather-model cd "${HOMEgfs}/parm/ufs" || exit 1 diff --git a/ush/gfs_bufr.sh b/ush/gfs_bufr.sh index 0a7a8e8522..14b9540308 100755 --- a/ush/gfs_bufr.sh +++ b/ush/gfs_bufr.sh @@ -21,16 +21,17 @@ # 2024-08-08 Bo Cui: Update to handle one forecast at a time # echo "History: February 2003 - First implementation of this utility script" # -fhr="$1" -fhr_p="$2" -FINT="$3" -F00FLAG="$4" -workdir="$5" - -cd "${workdir}" || exit 2 source "${USHgfs}/preamble.sh" +fhr="${1}" +fhr_p="${2}" +FINT="${3}" +F00FLAG="${4}" +workdir="${5}" + +cd "${workdir}" || exit 2 + if [[ "${F00FLAG}" == "YES" ]]; then f00flag=".true." else diff --git a/ush/make_NTC_file.pl b/ush/make_NTC_file.pl new file mode 100755 index 0000000000..62905f6aae --- /dev/null +++ b/ush/make_NTC_file.pl @@ -0,0 +1,118 @@ +#!/usr/bin/perl +# +#------------------------------------------------------ +# +# This is make_NTC_file.pl +# It attaches the appropriate headers to the input file +# and copies it to a unique name for input to NTC. +# +# The following lines are prepended to the file: +# 1. A Bulletin Flag Field Seperator +# 2. A WMO header line +# 3. An optional subheader, e.g. DIFAX1064 +# +# Input wmoheader Originator datetime path +# where: +# wmoheader - WMO id to use in WMO header. +# subheader - "NONE" if none. +# Originator - Originator to use in WMO header +# datetime - date/time to use in WMO header, yyyymmddhh +# path - name input file +# output_path - name of output file +# +# Author: Paula Freeman based on script by Larry Sager +# +#------------------------------------------------------ + +$NArgs = @ARGV; + +if ($NArgs < 6) { + usage (); + exit; +} + +# +# Get input +# + +$WMOHeader=shift; +$Origin=shift; +$YYYYMMDDHH=shift; +$SubHeader=shift; +$Filename=shift; +$OutputFilename=shift; + +print "Filename is $Filename\n"; +print "Output Filename is $OutputFilename\n"; +$YYYYMMDDHH =~ /\d{4}(\d{2})(\d{4})/; +$MMDDHH = $1 . $2; +$DDHHMM = $2 . "00"; +print "WMOHeader = $WMOHeader\n"; +print "SubHeader = $SubHeader\n"; +print "Origin = $Origin\n"; + + +if ( ($WMOHeader eq "") || ($Origin eq "") || ($YYYYMMDDHH eq "") || ($Filename eq "") || ($OutputFilename eq "") || ($SubHeader eq "") ) { + usage (); + exit; +} + +# +# Create the file for TOC +# + + make_toc (); +# +# + + +sub usage () { + print "Usage: $0 \n"; +} + +sub make_toc { + +# +# Attach WMO header and subheader (if not "NONE"). +# Get the bytecount of file to insert into the Bulletin Flag Field Seperator. +# Add in length of WMO header, plus two carriage returns and line feed. +# If Subheader specified, count that in also, plus line a feed. +# + + $Header = "$WMOHeader $Origin $DDHHMM"; + $ByteCount = `wc -c $Filename | cut -c1-8`; + $ByteCount= $ByteCount + length($Header) + 3; + if ($SubHeader =~ /NONE/) { + print "No Subheader\n"; + } else { + if ($SubHeader =~ /IMAG/){ + $ByteCount = $ByteCount + length($SubHeader); + } else { + $ByteCount = $ByteCount + length($SubHeader) + 3; + } + } + $BulletinFlagFieldSep = sprintf( "****%10.10d****", $ByteCount); + + open(OUTFILE, ">$OutputFilename") or die "Cannot open $OutputFilename for output."; + print OUTFILE "$BulletinFlagFieldSep\n"; + print OUTFILE "$Header\r\r\n"; + if ($SubHeader =~ /NONE/) { + print "No Subheader\n"; + } else { + if ($SubHeader =~ /IMAG/){ + print OUTFILE "$SubHeader"; + } else { + print OUTFILE "$SubHeader\r\r\n"; + } + } + open (INFILE, $Filename) or die "Cannot open $Filename"; + + while ($rec=) { + print OUTFILE $rec; + } + + close INFILE; + close OUTFILE; + + print "$Filename -> $OutputFilename\n"; +} diff --git a/ush/make_ntc_bull.pl b/ush/make_ntc_bull.pl new file mode 100755 index 0000000000..6dc9e29231 --- /dev/null +++ b/ush/make_ntc_bull.pl @@ -0,0 +1,242 @@ +#!/usr/bin/perl +# +#------------------------------------------------------ +# +# This is make_ntc_bull.pl +# It attaches the appropriate headers to the input file +# and copies it to a unique name for input to NTC. +# +# A Bulletin Flag Field Separator is prepended to the +# text bulletin. This TOC header contains the total +# number of bytes in the product not counting the +# bulletin flag field separator. +# +# Input: +# File identifier - Output name identier. +# subheader - "NONE" if none. +# Originator - Not used currently +# datetime - Not used currently +# filename - input file name +# output_path - name of output file +# +# Author: Larry Sager based on a script by Paula Freeman +# +# 31 Oct 05 -- new script +# +#------------------------------------------------------ + +if ($ENV{job}) { $job=$ENV{job}; } +if ($ENV{SENDDBN}) { $SENDDBN=$ENV{SENDDBN}; } +$NArgs = @ARGV; + +if ($NArgs < 6) { + usage (); + exit; +} + +# +# Get input +# + +$NAME=shift; +$WMOname=shift; +$ORIGname=shift; +$DATEname=shift; +$Filename=shift; +$OutputFilename=shift; +print " Input : $Filename"; +print " Output: $OutputFilename"; + + +if ( ($Filename eq "") || ($OutputFilename eq "") ) { + usage (); + exit; +} + +# +# Create the file for TOC +# + if ( $NAME eq "plot" ) { + make_tocplot (); + } + elsif ($NAME eq "redb" ) { + make_tocredb (); + } + else { + make_tocbull (); + } +# +# + + +sub usage () { + print "Usage: $0 \n"; +} + +sub make_tocbull { + +# +# Attach WMO header +# Get the bytecount of file to insert into the Bulletin Flag Field Seperator. +# + + $ix = 0; + $under = "_"; + open (INFILE, $Filename) or die "Cannot open $Filename"; + + while ($cho=) { + $rec = $rec . $cho; + } + $cho = $rec; + $cho =~ s/\n//g; + $cho =~ s/<<@@/\r\r\n/g; + $cho =~ s/<<@/\r\r\n/g; + $cho =~ s/<//g; + $cho =~ s/\^//g; + $cho =~ s/\$//g; + $cho =~ s/\|/+/g; + $value = 40; + $Outp="$OutputFilename"; + open(OUTFILE, ">$Outp") or die "Cannot open $OutputFilename for output."; + while ($ix == 0) { + $cho = substr($cho,$value); + $value = 38; + $cho =~ s/'1/\&\&/; + $cho =~ s/'0/\&\&/; +# print "cho is $cho"; + ($cho2,$cho) = split(/\&\&/,$cho); + ($cho2,$cho3) = split(/\%/,$cho2); +# print "cho2 is $cho2"; + $ByteCount = length($cho2); + print " length is $ByteCount "; + $BulletinFlagFieldSep = sprintf( "****%10.10d****", $ByteCount); + if ($ByteCount > 50 ) { + print OUTFILE "$BulletinFlagFieldSep\n"; + print OUTFILE $cho2; + } + else { + $ix = 1; + } + } + close OUTFILE; + if ($SENDDBN eq "YES" ) { +# Modified 20051205 by wx11rp to ensure the current production machine is used. +# $dbn_alert="/gpfs/w/nco/dbnet/bin/dbn_alert"; + $dbn_alert=$ENV{'DBNROOT'} . "/bin/dbn_alert"; + $type="GRIB_LOW"; + $job2=$job; + $subtype=$ORIGname; + $file_path=$Outp; + @command = ($dbn_alert, $type, $subtype, $job2, $file_path); + if (system (@command) != 0) { + print "Error alerting: @command \n"; + } + } + + close INFILE; + close OUTFILE; + + print "$Filename -> $OutputFilename\n"; +} + +sub make_tocplot { + +# +# Attach WMO header +# Get the bytecount of file to insert into the Bulletin Flag Field Seperator. +# + + $ix = 0; + $under = "_"; + open (INFILE, $Filename) or die "Cannot open $Filename"; + + while ($cho=) { + $rec = $rec . $cho; + } + $cho = $rec; +# $Outp="$OutputFilename$under$job"; + $Outp="$OutputFilename"; + open(OUTFILE, ">$Outp") or die "Cannot open $OutputFilename for output."; + while ($ix == 0) { + $cho =~ s/\$\$/\&\&/; + ($cho2,$cho) = split(/\&\&/,$cho); +# $cho2 =~ s/@/ /g; +# $cho2 = $cho2 . " "; + $ByteCount = length($cho2); + print " length is $ByteCount "; + $BulletinFlagFieldSep = sprintf( "****%10.10d****", $ByteCount); + if ($ByteCount > 50 ) { + print OUTFILE "$BulletinFlagFieldSep\n"; + print OUTFILE $cho2; + } + else { + $ix = 1; + } + } + close OUTFILE; + if ($SENDDBN eq "YES" ) { +# 20051205 Modified by wx11rp to allow the script to run on any manchine labeled as the production machine +# $dbn_alert="/gpfs/w/nco/dbnet/bin/dbn_alert"; + $dbn_alert=$ENV{'DBNROOT'} . "/bin/dbn_alert"; + $type="GRIB_LOW"; + $subtype=$DATEname; + $job2=$job; + $file_path=$Outp; + @command = ($dbn_alert, $type, $subtype, $job2, $file_path); + if (system (@command) != 0) { + print "Error alerting: @command \n"; + } + } + + close INFILE; + close OUTFILE; + + print "$Filename -> $OutputFilename\n"; +} +sub make_tocredb { + +# +# Prepare the Redbook graphic for transmission to TOC by removing the AWIPS +# header and creating an NTC header. Get the Bytecount of the file to +# insert into the Bulletin Flag Field Seperator. +# + + $ix = 0; + $under = "_"; + open (INFILE, $Filename) or die "Cannot open $Filename"; + + while ($cho=) { + $rec = $rec . $cho; + } + $cho = $rec; + $Outp="$OutputFilename"; + open(OUTFILE, ">$Outp") or die "Cannot open $OutputFilename for output."; + $cho = substr($cho,24); + $ByteCount = length($cho); + print " length is $ByteCount "; + $BulletinFlagFieldSep = sprintf( "****%10.10d****", $ByteCount); + if ($ByteCount > 50 ) { + print OUTFILE "$BulletinFlagFieldSep\n"; + print OUTFILE $cho; + } + close OUTFILE; + if ($SENDDBN eq "YES" ) { +# 20051205 Modified by wx11rp to allow the script to run on any manchine labeled as the production machine +# $dbn_alert="/gpfs/w/nco/dbnet/bin/dbn_alert"; + $dbn_alert=$ENV{'DBNROOT'} . "/bin/dbn_alert"; + $type="GRIB_LOW"; + $subtype=$DATEname; + $job2=$job; + $file_path=$Outp; + @command = ($dbn_alert, $type, $subtype, $job2, $file_path); + if (system (@command) != 0) { + print "Error alerting: @command \n"; + } + } + + close INFILE; + close OUTFILE; + + print "$Filename -> $OutputFilename\n"; +} diff --git a/ush/make_tif.sh b/ush/make_tif.sh new file mode 100755 index 0000000000..633c4ded0c --- /dev/null +++ b/ush/make_tif.sh @@ -0,0 +1,31 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" + +cd "${DATA}" || exit 2 + +outname=out.tif + +convert gif:"${input}" fax:"${outname}" + +# +# Add the ntc heading: +# + +WMO=QTUA11 +ORIG=KWBC +PDYHH="${PDY}${cyc}" + +if [[ "${HEADER}" == "YES" ]]; then + INPATH="${DATA}/${outname}" + SUB=DFAX1064 + "${HOMEgfs}/ush/make_NTC_file.pl" "${WMO}" "${ORIG}" "${PDYHH}" "${SUB}" "${INPATH}" "${OUTPATH}" +# +# Send the graphic to TOC + +cp "${OUTPATH}" "${COMOUT_ATMOS_WMO}/gfs_500_hgt_tmp_nh_anl_${cyc}.tif" + if [[ "${SENDDBN}" == "YES" ]]; then + + "${DBNROOT}/bin/dbn_alert" GRIB_LOW "${NET}" "${job}" "${COMOUT_ATMOS_WMO}/gfs_500_hgt_tmp_nh_anl_${cyc}.tif" + fi +fi diff --git a/ush/month_name.sh b/ush/month_name.sh new file mode 100755 index 0000000000..463e4a08be --- /dev/null +++ b/ush/month_name.sh @@ -0,0 +1,113 @@ +#!/bin/bash + +#################################################################### +# +# SCRIPT: month_name.sh +# +# This script returns the name/abreviation of a month +# in a small text file, month_name.txt. It also echos the +# name/abreviation to stdout. The form of the returned +# name/abreviation is specified by the script arguments. +# +# USAGE: ./month_name.sh < month > < monthspec> +# +# EXAMPLE: ./month_name.sh 5 MON +# +# month spec contents of month_name.txt +# ----------- ------ ---------------------------- +# +# 6/06 Mon Jun +# 8/08 Month August +# 9/09 MON SEP +# 11 MONTH NOVEMBER +# +# +# Note: Variables may be assigned the value of the returned name +# by either of the following methods: +# +# MM=`cat month_name.txt` after executing month_name.sh +# - OR - +# MM=`month_name.sh 5 MON` (for example) +# +# +# +# HISTORY: 07/08/2005 - Original script +# +# +#################################################################### + + + typeset -Z2 month_num + + + month_num=$1 + month_spec=$2 + + case ${month_num} in + + 01) Mon=Jan + Month=January ;; + + 02) Mon=Feb + Month=February ;; + + 03) Mon=Mar + Month=March ;; + + 04) Mon=Apr + Month=April ;; + + 05) Mon=May + Month=May ;; + + 06) Mon=Jun + Month=June ;; + + 07) Mon=Jul + Month=July ;; + + 08) Mon=Aug + Month=August ;; + + 09) Mon=Sep + Month=September ;; + + 10) Mon=Oct + Month=October ;; + + 11) Mon=Nov + Month=November ;; + + 12) Mon=Dec + Month=December ;; + + *) + echo "FATAL ERROR input month number (${month_num}) is invalid" + exit 2 + + esac + + + if [[ "${month_spec}" == "Mon" ]]; then + + echo "${Mon}" + echo "${Mon}" > month_name.txt + + elif [[ "${month_spec}" == "Month" ]]; then + + echo "${Month}" + echo "${Month}" > month_name.txt + + elif [[ "${month_spec}" == "MON" ]]; then + + MON="${Mon^^}" + echo "${MON}" + echo "${MON}" > month_name.txt + + elif [[ "${month_spec}" == "MONTH" ]]; then + + MONTH="${Month^^}" + echo "${MONTH}" + echo "${MONTH}" > month_name.txt + + fi diff --git a/versions/run.wcoss2.ver b/versions/run.wcoss2.ver index f5b11b3a6f..6165bb37e9 100644 --- a/versions/run.wcoss2.ver +++ b/versions/run.wcoss2.ver @@ -27,6 +27,7 @@ export jasper_ver=2.0.25 export zlib_ver=1.2.11 export libpng_ver=1.6.37 export cdo_ver=1.9.8 +export imagemagick_ver=7.0.8-7 export hdf5_ver=1.10.6 export netcdf_ver=4.7.4 diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index 4df03b9444..45a7bccc7a 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -119,7 +119,7 @@ def _get_app_configs(self, run): configs += ['postsnd'] if options['do_awips']: - configs += ['awips'] + configs += ['awips', 'fbwind'] if options['do_wave']: configs += ['waveinit', 'waveprep', 'wavepostsbs', 'wavepostpnt'] @@ -281,12 +281,9 @@ def get_task_names(self): task_names[run] += ['postsnd'] if options['do_gempak']: - task_names[run] += ['gempak'] - task_names[run] += ['gempakmeta'] - task_names[run] += ['gempakncdcupapgif'] + task_names[run] += ['gempak', 'gempakmeta', 'gempakncdcupapgif'] if options['do_goes']: - task_names[run] += ['npoess_pgrb2_0p5deg'] - task_names[run] += ['gempakpgrb2spec'] + task_names[run] += ['npoess_pgrb2_0p5deg', 'gempakpgrb2spec'] if options['do_awips']: task_names[run] += ['awips_20km_1p0deg', 'fbwind'] diff --git a/workflow/applications/gfs_forecast_only.py b/workflow/applications/gfs_forecast_only.py index fffdab6ef9..5b397c105b 100644 --- a/workflow/applications/gfs_forecast_only.py +++ b/workflow/applications/gfs_forecast_only.py @@ -61,7 +61,7 @@ def _get_app_configs(self, run): configs += ['gempak'] if options['do_awips']: - configs += ['awips'] + configs += ['awips', 'fbwind'] if options['do_ocean'] or options['do_ice']: configs += ['oceanice_products'] @@ -136,7 +136,7 @@ def get_task_names(self): tasks += ['postsnd'] if options['do_gempak']: - tasks += ['gempak', 'gempakmeta', 'gempakncdcupapgif', 'gempakpgrb2spec'] + tasks += ['gempak', 'gempakmeta'] if options['do_awips']: tasks += ['awips_20km_1p0deg', 'fbwind'] diff --git a/workflow/hosts/hera.yaml b/workflow/hosts/hera.yaml index e9e749ad3c..b95d0abb8d 100644 --- a/workflow/hosts/hera.yaml +++ b/workflow/hosts/hera.yaml @@ -24,6 +24,7 @@ LOCALARCH: 'NO' ATARDIR: '/NCEPDEV/${HPSS_PROJECT}/1year/${USER}/${machine}/scratch/${PSLOT}' MAKE_NSSTBUFR: 'NO' MAKE_ACFTBUFR: 'NO' +DO_AWIPS: 'NO' SUPPORTED_RESOLUTIONS: ['C1152', 'C768', 'C384', 'C192', 'C96', 'C48'] COMINecmwf: /scratch1/NCEPDEV/global/glopara/data/external_gempak/ecmwf COMINnam: /scratch1/NCEPDEV/global/glopara/data/external_gempak/nam diff --git a/workflow/hosts/hercules.yaml b/workflow/hosts/hercules.yaml index f528761cf1..a2974377dd 100644 --- a/workflow/hosts/hercules.yaml +++ b/workflow/hosts/hercules.yaml @@ -26,6 +26,7 @@ MAKE_NSSTBUFR: 'NO' MAKE_ACFTBUFR: 'NO' DO_TRACKER: 'NO' DO_GENESIS: 'NO' +DO_AWIPS: 'NO' SUPPORTED_RESOLUTIONS: ['C1152', 'C768', 'C384', 'C192', 'C96', 'C48'] COMINecmwf: /work/noaa/global/glopara/data/external_gempak/ecmwf COMINnam: /work/noaa/global/glopara/data/external_gempak/nam diff --git a/workflow/hosts/orion.yaml b/workflow/hosts/orion.yaml index 985c24c6fb..9b1a908e2c 100644 --- a/workflow/hosts/orion.yaml +++ b/workflow/hosts/orion.yaml @@ -26,6 +26,7 @@ MAKE_NSSTBUFR: 'NO' MAKE_ACFTBUFR: 'NO' DO_TRACKER: 'NO' DO_GENESIS: 'NO' +DO_AWIPS: 'NO' SUPPORTED_RESOLUTIONS: ['C1152', 'C768', 'C384', 'C192', 'C96', 'C48'] COMINecmwf: /work/noaa/global/glopara/data/external_gempak/ecmwf COMINnam: /work/noaa/global/glopara/data/external_gempak/nam diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index d2a3e43719..6cbf6bdb1f 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1410,7 +1410,7 @@ def fbwind(self): deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') - resources = self.get_resource('awips') + resources = self.get_resource('fbwind') # TODO: It would be better to use task dependencies on the # individual post jobs rather than data dependencies to avoid # prematurely starting with partial files. Unfortunately, the @@ -2349,13 +2349,14 @@ def cleanup(self): elif self.run in ['gfs']: dep_dict = {'type': 'task', 'name': f'{self.run}_gempakmeta'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.run}_gempakncdcupapgif'} - deps.append(rocoto.add_dependency(dep_dict)) - if self.options['do_goes']: - dep_dict = {'type': 'metatask', 'name': f'{self.run}_gempakgrb2spec'} - deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.run}_npoess_pgrb2_0p5deg'} + if self.app_config.mode in ['cycled']: + dep_dict = {'type': 'task', 'name': f'{self.run}_gempakncdcupapgif'} deps.append(rocoto.add_dependency(dep_dict)) + if self.options['do_goes']: + dep_dict = {'type': 'task', 'name': f'{self.run}_npoess_pgrb2_0p5deg'} + deps.append(rocoto.add_dependency(dep_dict)) + dep_dict = {'type': 'metatask', 'name': f'{self.run}_gempakgrb2spec'} + deps.append(rocoto.add_dependency(dep_dict)) if self.options['do_metp'] and self.run in ['gfs']: deps2 = []