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

20050421: 20050421:GEMPAK via BGSU



Patrick,

To call a script from pqact when a product arrives, you can use the EXEC action,
and pass the name of the file you want to proceess to the script. 
You can also sed the geerated product to your other servers using the pqinsert
command from ldm to place in the local queue for distribution to downstream 
sites.

To modify your script, you would reove the code that finds the cursat, tie etc,
and instead have the script use the input from command line
as called by pqact via the EXEC line.

When generating X based displays using gf or xw, remember that your display has 
to
be large enough to allow the image to be drawn. If you are using a virtual X 
server
on display :1.0, make sure you are running Xvfb with screen size (eg memory)
large enough for your 5000x5786 image.

SteveChiswell
Unidata User Support

>
>Reply-to: Patrick L. Francis <address@hidden>
>
><message one>
>
>thought...
>
>i make one LARGE gif sat via gempak via cron every hour, then
>send it to image magick, clean it up, compress, turn into jpeg,
>crop out sections etc... the way i do it now is...
>
>unidata.bgsu.edu = make gempak sat gif
>unidata2.bgsu.edu = via perl script grab sat gif, crop, clean up etc...
>weather.bgsu.edu = receive jpeg sat from unidata2 via ncftp for httpd
>serving
>
>now
>
>since i cron the stuff quite often i miss one of the intervals that I
>need... so the question is can we setup pqact.gempak to run the gif sat
>whenever new stuff comes in? if so i can call other procedures from the
>shell to be automated when sat gif is run.
>
>
>
><message two>
>
>incidentally, if you try to make a sat larger than this
>in gempak i.e. original gif it hangs
>
>http://weather.bgsu.edu/sats/monster/westvis.jpg
>
>when i try 7000 width it dies... does ok here.
>
>
><message three>
>
>ok pls forward both to him, or i will rewrite
>if necessary... i did not explain myself very well
>the qctual script i was using used the GF
>device to make the original image.
>
>#!/bin/csh -f
># Make
>source /home/gempak/NAWIPS/Gemenviron
>setenv DISPLAY :1.0
>rehash
>#   set gempak parameters
>#
>#  enhancement tables, list of which are located in $GEMTBL
>#   current satellite image
>set cursat = `ls -t /home/ldm/data/gempak/images/sat/WEST-CONUS/1km/VIS/*
>|head -1`
>#  get the hour/minute that the sat file is valid
>set curtim = `ls -t /home/ldm/data/gempak/images/sat/WEST-CONUS/1km/VIS/*
>|head -1 | cut -d_ -f3`
>#  get the current hour from the filename
>set curhour = `ls -t /home/ldm/data/gempak/images/sat/WEST-CONUS/1km/VIS/*
>|head -1 | cut -d_ -f3 | cut -c1-2`
>set doh = 'expr $curhour "-" 1'
>set cursao =  `ls -t /home/ldm/data/gempak/surface/* | head -1`
>echo "$cursat"
>echo "$curtim"
>cd /home/ldm/data/web/sats/conus/
>rm -r -f *.nts
>#  get from system current year,month, and day
>set curyear   = `date -u +%Y`
>set curmon    = `date -u +%h`
>set curday    = `date -u +%d`
>set day=`date -u +"%Y%m%d"`
>set time=`date -u +"%Y%m%d%H%M"`
>set lyear=`date -u +"%Y"`
>set lmonth=`date -u +"%b"`
>set lday=`date -u +"%d"`
>set lhr=`date +"%I"`
>set lmin=`date +"%M"`
>set lap=`date +"%p"`
>set lzone=`date +"%Z"`
>set lgmt=`date -u +"%H%M"`
>set plotlabel2 = "${lgmt}z ${lday} ${lmonth} ${lyear} (${lhr}:${lmin}
>${lzone})"
>#
>gpmap << eof
>\$mapfil = base + rdis.uni
>  AREA     = DSET
>  GAREA    = DSET
>  SATFIL   = $cursat
>  SFFILE   = $cursao
>  LATLON   = 0
>  RADFIL   =
>  DATTIM   = $curday/$curhour
>  MAP      = 4/1/0.5 + 32/1/0.5
>  MARKER   = 0
>  TITLE    = 17/-1/$plotlabel2 weather.bgsu.edu
>  CLEAR    = yes
>  PANEL    = 0
>  IMCBAR   = 32/V/LC//.88;.05/1
>  DEVICE   = gf | westvis.gif |5000;5786
>  PROJ     = SAT
>  FILTER   = 999
>  TEXT     = 1/1/1
>  LUTFIL   = DEFAULT
>  SKPMIS   = NO
>list
>run
>exit
>eof
>gpend
>
>----
>
>
>
>
>
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.