[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #EHS-794328]: Example Script request



Mike,

The context of the image was that the redbook graphics could be converted to 
VGF and modified
using the NMAP2 product generation pallete.

My LDM entry for converting redbook graphics to VGF is from the 
$NAWIPS/ldm/etc/templates/pqact.gempak_upc:
# REDBOOK graphics processing
#
HRS     ^P..... (K[^WK]|KW[^A]|KWA[^L]|KK[^C]|KKC[^I])
        PIPE    -close  util/dcredbook_vg.csh

The ~ldm/util/dcredbook_vg.csh is a shell script wrapper for the dcredbook 
program
similar to the postscript example on the web page. I use the wrapper so that I 
can ensure that the
Gemenviron variables are sourced and the program is run from the desired output 
directory:

#!/bin/csh -f
#
# Filename: dcredbook_vg.csh
#
# This scripts may be used as a pqact.conf action to automatically
# generate VG (vector graphics) from REDBOOK graphics found on NOAAPORT.
#
# pqact.conf usage:
# 
# send all NOAAPORT graphic products (except those from KWAL and KKCI) to this 
script
#HRS     ^P..... (K[^WK]|KW[^A]|KWA[^L]|KK[^C]|KKC[^I])
#       PIPE    -close  util/dcredbook_vg.csh
#
#
# source the GEMPAK environment so that table, mapfiles etc. are found
#
source /home/gempak/NAWIPS/Gemenviron

# Set a work directory and change directory to it
setenv OUTDIR $GEMDATA/images/vg

if(! -e $OUTDIR) mkdir -p $OUTDIR
cd $OUTDIR

cat | dcredbook_vg -v 1 -d $GEMDATA/logs/dcredbook_vg.log 
'vg|%P/YYYYMMDD_HHNN.vgf'
exit 0
###################################################################################


The NMAP2 display is created from the PG pallette selecting the "multi-select" 
of
all lines, where I changed the line width to about 4 and the color to red.
You can of course modify the lines annotations etc (you could even group
the lines and label annotations as contour values and generate a grid from
the graph to grid). The radar mosaic is the image from the FNEXRAD data feed.

I don't have an automated proceedure for changing specific attributes of the 
redbook
to different colors, widths automatically.

The VG directory can be browsed from the pq pallette, or you can add the 
location
to the $GEMTBL/nmap/vgf.nmap file for selection from the VGF data type menu
(Caveat: the VGF data type does not have a time configuration for file names).

Steve Chiswell
Unidata User Support


> Chiz,
> 
> If you have a minute could you email the script you wrote that overlays the
> redbook graphic on the national mosaic radar?
> 
> http://www.unidata.ucar.edu/software/gempak/examples/redbook/product_annotation
> s.png
> 
> Also, what does your pqact.conf entry look like that stores the redbook
> graphics that you use this script with? I like how you are able to set the
> colors of the redbook
> contours and labels etc.
> 
> Thanks in advance!
> 
> 
> Mike Dross
> 
> 


Ticket Details
===================
Ticket ID: EHS-794328
Department: Support GEMPAK
Priority: Urgent
Status: Closed