From ead449d9d764fe0824db27bbb9b82c34b1d32a8b Mon Sep 17 00:00:00 2001 From: Boi Vuong Date: Tue, 7 Jan 2020 15:21:05 +0000 Subject: [PATCH] GitHub Issue #1 Updated gempak files --- gempak/fix/nagrib.tbl | 122 +++++++++++++ scripts/exgfs_grib_awips_g2.sh.ecf | 275 ----------------------------- scripts/exgoes_nawips.sh.ecf | 2 +- scripts/exnawips.sh.ecf | 2 +- 4 files changed, 124 insertions(+), 277 deletions(-) create mode 100755 gempak/fix/nagrib.tbl delete mode 100755 scripts/exgfs_grib_awips_g2.sh.ecf diff --git a/gempak/fix/nagrib.tbl b/gempak/fix/nagrib.tbl new file mode 100755 index 0000000000..8056ff7267 --- /dev/null +++ b/gempak/fix/nagrib.tbl @@ -0,0 +1,122 @@ +######################################################################## +# +# Filename: nagrib.tbl +# +# Used by: NA_format +# +# Description: This table is used by the NA_format script to get +# parameters for the different models that are to be +# GEMPAK grid formatted. The parameters are used as +# model specific settings to the NAWIPS nagrib program. +# +######################################################################## +# +# The format of the table entries is as follows: +# +# MODEL|CPYFIL|GAREA|GBTBLS|MAXGRD|KXKY|GRDAREA|PROJ|OUTPUT +# +# NOTES: 1. Lines with a pound (#) sign in the first column +# are treated as comments. +# 2. Valid entries cannot have leading whitespace. +# 3. Valid entries are pipe (|) delimited. +# 4. Blank lines are ignored. +# +######################################################################## +# +#MODEL |CPYFIL|GAREA|GBTBLS |MAXGRD|KXKY |GRDAREA |PROJ |OUTPUT +#----------|------|-----|------------|------|------|--------------|---------|------ +gfs |gds |dset | |4999 | | | |T +gfshd |gds |dset | |4999 | | | |T +gfs_asbkup |gds |dset | |4999 | | | |T +gfs_special|gds |dset | |4999 | | | |T +nam |#104 |dset | |4999 | | | |T +nam20 |gds |dset | |4999 | | | |T +nam44 |gds |dset | |4999 | | | |T +nam40 |gds |dset | |4999 | | | |T +dgex |gds |dset | |4999 | | | |T +threats |gds |dset | |4999 | | | |T +hiresw |gds |dset | |4999 | | | |T +fw |gds |dset | |4999 | | | |T +fwfull |gds |dset | |4999 | | | |T +gdas |gds |dset | |4999 | | | |T +ice |gds |40;130;75;10 |wmogrib2.tbl|10 | |40;130;75;10 | |T +ecmwf_glob | |dset | |4999 |144;73|-90;0;90;-2.5 |ced/0;0;0|T +ecmwf_trop | |dset | |4999 |144;29|-35;0;35;357.5|ced/0;0;0|T +ecmwf_hr |gds |dset | |4999 | | | |T +ecmwf_wave |gds |dset |ecmwf_wave_grib.tbl|4999 | | | |T +ghm |gds |dset | |4999 | | | |T +ghmc |gds |dset | |4999 | | | |T +fog |gds |dset | |4999 | | | |T +sice |gds |dset | |4999 | | | |T +mrf |gds |dset | |4999 | | | |T +mrfx |gds |dset | |4999 | | | |T +ngm |#104 |dset | |4999 | | | |T +ofs |gds |dset | wmogrib2.tbl;ncepgrib2.tbl;vcrdgrib1.tbl |10 | | dset | |T +nww3 |gds |dset | |4999 | | | |T +mww3 |gds |dset | |4999 | | | |T +akw |gds |dset | |4999 | | | |T +wna |gds |dset | |4999 | | | |T +nah |gds |dset | |4999 | | | |T +nph |gds |dset | |4999 | | | |T +enp |gds |dset | |4999 | | | |T +rucs |#87 |dset | |20 | | | |T +ruc2 |gds |dset | |4999 | | | |T +ruc20 |gds |dset | |4999 | | | |T +ukmet |gds |dset | |200 | | | |T +ukmet2 |gds |dset | |200 | | | |T +vaftad |gds |dset | |500 | | | |T +hysplit |gds |dset | |500 | | | |T +# +ensgfs |gds |dset | |3500 | | | |T +enscnt |gds |dset | |3500 | | | |T +ensmrf |gds |dset | |3500 | | | |T +ensn1 |gds |dset | |3500 | | | |T +ensn2 |gds |dset | |3500 | | | |T +ensn3 |gds |dset | |3500 | | | |T +ensn4 |gds |dset | |3500 | | | |T +ensn5 |gds |dset | |3500 | | | |T +ensp1 |gds |dset | |3500 | | | |T +ensp2 |gds |dset | |3500 | | | |T +ensp3 |gds |dset | |3500 | | | |T +ensp4 |gds |dset | |3500 | | | |T +ensp5 |gds |dset | |3500 | | | |T +# +gep01 |gds |dset | |3500 | | | |T +gep02 |gds |dset | |3500 | | | |T +gep03 |gds |dset | |3500 | | | |T +gep04 |gds |dset | |3500 | | | |T +gep05 |gds |dset | |3500 | | | |T +gep06 |gds |dset | |3500 | | | |T +gep07 |gds |dset | |3500 | | | |T +gep08 |gds |dset | |3500 | | | |T +gep09 |gds |dset | |3500 | | | |T +gep10 |gds |dset | |3500 | | | |T +gep11 |gds |dset | |3500 | | | |T +gep12 |gds |dset | |3500 | | | |T +gep13 |gds |dset | |3500 | | | |T +gep14 |gds |dset | |3500 | | | |T +gep15 |gds |dset | |3500 | | | |T +gep16 |gds |dset | |3500 | | | |T +gep17 |gds |dset | |3500 | | | |T +gep18 |gds |dset | |3500 | | | |T +gep19 |gds |dset | |3500 | | | |T +gep20 |gds |dset | |3500 | | | |T +geavg |gds |dset | |3500 | | | |T +gespr |gds |dset | |3500 | | | |T +# +sref |gds |dset | |6000 | | | |T +spcsref |gds |dset | |6000 | | | |T +# +mdlgfs |gds |dset | |3500 | | | |T +mdlmrf |gds |dset | |3500 | | | |T +mdlngm |gds |dset | |3500 | | | |T +mdlngmsvr |#212 |dset | |3500 | | | |T +mdlngmfltwx|gds |dset | |3500 | | | |T +mdlmrfplt |gds |dset | |3500 | | | |T +mdlens |gds |dset | |3500 | | | |T +mdlgfssvr |gds |dset | |3500 | | | |T +mdlnamsvr |gds |dset | |3500 | | | |T +mdlnamcns |gds |dset | |3500 | | | |T +mdlmrfsvr |gds |dset | |3500 | | | |T +# +rtma |gds |dset | |3500 | | | |T diff --git a/scripts/exgfs_grib_awips_g2.sh.ecf b/scripts/exgfs_grib_awips_g2.sh.ecf deleted file mode 100755 index 37de35cada..0000000000 --- a/scripts/exgfs_grib_awips_g2.sh.ecf +++ /dev/null @@ -1,275 +0,0 @@ -#!/bin/ksh -###################################################################### -# UTILITY SCRIPT NAME : exgfs_grib_awips_g2.sh.sm -# DATE WRITTEN : 06/05/2014 -# -# Abstract: This utility script produces the GFS AWIPS GRIB2 -# -# Input: 1 arguments are passed to this script. -# 1st argument - Forecast Hour - format of 3I (3 digits) -# -##################################################################### -name=`basename $0` -export PS4='$name:$SECONDS + ' -echo "------------------------------------------------" -echo "JGFS_AWIPS_00/06/12/18 GFS postprocessing" -echo "------------------------------------------------" -echo "History: JUNE 2014 - First implementation of this new script" -echo " to process GFS AWIPS products in GRIB2 " -echo " " -##################################################################### -fcsthrs="$1" -typeset -Z3 fcsthrs -num=$# -job_name=`echo $job|sed 's/[jpt]gfs/gfs/'` - -export PS4='gfs_grib_awips_g2:f$fcsthrs:$SECONDS + ' - -# Set type of Interpolation for WGRIB2 -export opt1=' -set_grib_type same -new_grid_winds earth ' -export opt1uv=' -set_grib_type same -new_grid_winds grid ' -export opt21=' -new_grid_interpolation bilinear -if ' -export opt22=":(CSNOW|CRAIN|CFRZR|CICEP|ICSEV):" -export opt23=' -new_grid_interpolation neighbor -fi ' -export opt24=' -set_bitmap 1 -set_grib_max_bits 16 -if ' -export opt25=":(APCP|ACPCP|PRATE|CPRAT):" -export opt26=' -set_grib_max_bits 25 -fi -if ' -export opt27=":(APCP|ACPCP|PRATE|CPRAT|DZDT):" -export opt28=' -new_grid_interpolation budget -fi ' -export TRIMRH=${TRIMRH:-$USHgfs/trim_rh.sh} - -if test "$num" -ge 1 -then - echo "" - echo " Appropriate number of arguments were passed" - echo "" -else - echo "" - echo " Number of arguments were not passed " - echo "" - echo "" - echo "Usage: $0 \$fcsthrs (3 digits) " - echo "" - exit 16 -fi - -cd $DATA/awips_g2 - -set -x - -############################################### -# Wait for the availability of the pgrb file -############################################### -icnt=1 -while [ $icnt -lt 1000 ] -do - if [ -s $COMIN/${RUN}.${cycle}.pgrb2b.0p25.f$fcsthrs.idx ] - then - break - fi - - sleep 10 - icnt=$((icnt + 1)) - if [ $icnt -ge 180 ] - then - msg="ABORTING after 30 min of waiting for the GFS pgrb2 file!" - err_exit $msg - fi -done - -######################################## -msg="HAS BEGUN!" -postmsg "$jlogfile" "$msg" -######################################## - -echo " ------------------------------------------" -echo " BEGIN MAKING GFS AWIPS PRODUCTS" -echo " ------------------------------------------" - -set +x -echo " " -echo "#######################################" -echo " Process GRIB AWIP GRIB2 PRODUCTS " -echo "#######################################" -echo " " -set -x - -############################################################### -# Process GFS GRIB AWIP PRODUCTS IN GRIB2 # -############################################################### - -cp $COMIN/gfs.t${cyc}z.pgrb2.0p25.f${fcsthrs} tmpfile2 -cp $COMIN/gfs.t${cyc}z.pgrb2b.0p25.f${fcsthrs} tmpfile2b -cat tmpfile2 tmpfile2b > tmpfile -$WGRIB2 tmpfile | grep -F -f $PARMproduct/gfs_awips_parmlist_g2 | $WGRIB2 -i -grib masterfile tmpfile - -# JY for GRID in 160 161 201 212 213 254 -for GRID in 160 161 213 254 -do - case $GRID in - 160) - # Grid 160 - 47.5 km North Polar Stereographic grid for Alaska - # export g160="20 6 0 0 0 0 0 0 180 156 19132000 174163000 8 60000000 210000000 47625000 47625000 0 64" - # $COPYGB2 -g "${g160}" -i0 -x masterfile awps_file_f${fcsthrs}_${GRID} - - export grid160="nps:210:60.0 174.163:180:47625 19.132:156:47625" - $WGRIB2 masterfile $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid160 awps_file_f${fcsthrs}_${GRID} - ;; - 161) - # Grid 161 - 0.5 degree Lat/Lon grid for Puerto Rico - # export g161="0 6 0 0 0 0 0 0 137 102 0 0 50750000 271750000 8 -250000 340250000 65535000 65535000 0" - # NEW export g161="0 6 0 0 0 0 0 0 137 103 0 0 50750000 271750000 8 -250000 340250000 65535000 65535000 0" - # $COPYGB2 -g "${g161}" -i0 -x masterfile awps_file_f${fcsthrs}_${GRID} - - export grid161="latlon 271.75:137:0.5 50.75:103:-0.5" - $WGRIB2 masterfile $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid161 awps_file_f${fcsthrs}_${GRID} - ;; - 213) - # Grid 213 - National - CONUS - Double Resolution (Polar Stereographic) 95km - # export g213="20 6 0 0 0 0 0 0 129 85 7838000 218972000 8 60000000 255000000 95250000 95250000 0 64" - # $COPYGB2 -g "${g213}" -i0 -x masterfile awps_file_f${fcsthrs}_${GRID} - - export grid213="nps:255:60.0 218.972:129:95250 7.838:85:95250" - $WGRIB2 masterfile $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid213 awps_file_f${fcsthrs}_${GRID} - ;; - 254) - # Grid 254 - 40 km Mercator grid for Pacific Region - # export g254="10 6 0 0 0 0 0 0 369 300 -35000000 110000000 48 20000000 60789000 250871000 64 0 40000000 40000000" - # $COPYGB2 -g "${g254}" -i0 -x masterfile awps_file_f${fcsthrs}_${GRID} - - export grid254="mercator:20.0 110.0:369:40000:250.871 -35.0:300:40000:60.789" - $WGRIB2 masterfile $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid254 awps_file_f${fcsthrs}_${GRID} - ;; - esac - $TRIMRH awps_file_f${fcsthrs}_${GRID} - $GRB2INDEX awps_file_f${fcsthrs}_${GRID} awps_file_fi${fcsthrs}_${GRID} - -# Processing AWIPS GRIB2 grids with WMO headers - - export pgm=tocgrib2 - prep_step - startmsg - - export FORT11=awps_file_f${fcsthrs}_${GRID} - export FORT31=awps_file_fi${fcsthrs}_${GRID} - export FORT51=grib2.awpgfs${fcsthrs}.${GRID} - - $TOCGRIB2 < $PARMwmo/grib2_awpgfs${fcsthrs}.${GRID} >> $pgmout 2> errfile - export err=$? ;err_chk - echo " error from tocgrib2=",$err - - if [ $SENDCOM = "YES" ] ; then - - ############################## - # Post Files to ${COMOUTwmo} - ############################## - - mv grib2.awpgfs${fcsthrs}.${GRID} ${COMOUTwmo}/grib2.awpgfs${fcsthrs}.${GRID}.$job_name - - ############################## - # Distribute Data - ############################## - - if [ "$SENDDBN" = 'YES' -o "$SENDAWIP" = 'YES' ] ; then - $DBNROOT/bin/dbn_alert NTC_LOW $NET $job ${COMOUTwmo}/grib2.awpgfs${fcsthrs}.${GRID}.$job_name - else - msg="File ${COMOUTwmo}/grib2.awpgfs${fcsthrs}.${GRID}.$job_name not posted to db_net." - postmsg "$jlogfile" "$msg" - fi - fi - - msg="Awip Processing ${fcsthrs} hour completed normally" - postmsg "$jlogfile" "$msg" - - rm awps_file_${fcsthrs}_${GRID} awps_file_fi${fcsthrs}_${GRID} - -done - -if test $fcsthrs -eq 120 -then - for fcsthrs in 00 03 06 09 12 15 18 21 24 27 30 33 36 39 \ - 42 45 48 51 54 57 60 63 66 69 72 75 78 81 \ - 84 87 90 93 96 99 102 105 108 111 114 117 120 - do - set +x - echo " " - echo " ###################################################" - echo " Process PGRIB files from GFS products to create " - echo " grid 211 which contain surface fields. (00-120) " - echo " ###################################################" - echo " " - set -x - - cp $COMIN/gfs.t${cyc}z.pgrb2.0p25.f${fcsthrs} tmpfile2 - cp $COMIN/gfs.t${cyc}z.pgrb2b.0p25.f${fcsthrs} tmpfile2b - cat tmpfile2 tmpfile2b > tmpfile - - ################################################################# - # List of fields that need to extract from the GFS products - ################################################################# - -cat << EOF > wgrib2_parmlist_grb211 -:APCP:surface: -:RH:2 m above ground: -:TCDC:entire atmosphere: -:TMP:2 m above ground: -:UGRD:10 m above ground: -:VGRD:10 m above ground: -EOF - - $WGRIB2 tmpfile | grep -F -f wgrib2_parmlist_grb211 | $WGRIB2 -i -grib tmpfile_211 tmpfile - # Grid 211 - Regional - CONUS (Lambert Conformal) 81km - # export g211="30 6 0 0 0 0 0 0 93 65 12190000 226541000 8 25000000 265000000 81271000 81271000 0 64 25000000 25000000 0 0" - # $COPYGB2 -g "${g211}" -i0 -x tmpfile_211 gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 - - export grid211="lambert:265.0:25.0:25.0 226.541:93:81271 12.19:65:81271" - $WGRIB2 tmpfile_211 $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid211 gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 - - $TRIMRH gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 - $WGRIB2 -s gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 > gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2.idx - - ############################## - # Convert to grib1 format - ############################## - - $CNVGRIB -g21 gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 gfs_grb211.${cycle}.pgrbf${fcsthrs} - $GRBINDEX gfs_grb211.${cycle}.pgrbf${fcsthrs} gfs_grb211.${cycle}.pgrbif${fcsthrs} - - ############################## - # Post Files to COM - ############################## - cp gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 $COMOUT/. - cp gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2.idx $COMOUT/. - cp gfs_grb211.${cycle}.pgrbf${fcsthrs} $COMOUT/. - cp gfs_grb211.${cycle}.pgrbif${fcsthrs} $COMOUT/. - - if [ "$SENDCOM" = "YES" ] - then - if [ "$SENDDBN" = "YES" ] - then - $DBNROOT/bin/dbn_alert MODEL GFS_GRB211 $job $COMOUT/gfs_grb211.${cycle}.pgrbf${fcsthrs} - $DBNROOT/bin/dbn_alert MODEL GFS_GRBI211 $job $COMOUT/gfs_grb211.${cycle}.pgrbif${fcsthrs} - $DBNROOT/bin/dbn_alert MODEL GFS_GRB211_GB2 $job $COMOUT/gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2 - $DBNROOT/bin/dbn_alert MODEL GFS_GRB211_GB2_WIDX $job $COMOUT/gfs_grb211.${cycle}.pgrbf${fcsthrs}.grib2.idx - fi - fi - done -fi - -if [ -e "$pgmout" ] ; then - cat $pgmout -fi - -################################################################################### -# GOOD RUN -set +x -echo "**************JOB EXGFS_GRIB_AWIPS_G2.SH.ECF COMPLETED NORMALLY ON THE WCOSS" -echo "**************JOB EXGFS_GRIB_AWIPS_G2.SH.ECF COMPLETED NORMALLY ON THE WCOSS" -echo "**************JOB EXGFS_GRIB_AWIPS_G2.SH.ECF COMPLETED NORMALLY ON THE WCOSS" -set -x -################################################################################### - -msg="HAS COMPLETED NORMALLY!" -postmsg "$jlogfile" "$msg" - -############## END OF SCRIPT ####################### diff --git a/scripts/exgoes_nawips.sh.ecf b/scripts/exgoes_nawips.sh.ecf index 57104abad9..57d9587953 100755 --- a/scripts/exgoes_nawips.sh.ecf +++ b/scripts/exgoes_nawips.sh.ecf @@ -23,7 +23,7 @@ msg="Begin job for $job" postmsg "$jlogfile" "$msg" # -NAGRIB_TABLE=${NAGRIB_TABLE:-$NWROOTp1/gempak/fix/nagrib.tbl} +NAGRIB_TABLE=$FIXgempak/nagrib.tbl NAGRIB=$GEMEXE/nagrib2 # diff --git a/scripts/exnawips.sh.ecf b/scripts/exnawips.sh.ecf index 1824132846..f02aaec643 100755 --- a/scripts/exnawips.sh.ecf +++ b/scripts/exnawips.sh.ecf @@ -30,7 +30,7 @@ msg="Begin job for $job" postmsg "$jlogfile" "$msg" # -NAGRIB_TABLE=${NWROOTp1}/gempak/fix/nagrib.tbl +NAGRIB_TABLE=$FIXgempak/nagrib.tbl utilfix_nam=$FIXshared NAGRIB=$GEMEXE/nagrib_nc #