NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


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

20031102: Still looking for a NLDN GIF script example



Chris,

I have an example of a GEMPAK  NLDN script posted here:
http://my.unidata.ucar.edu/content/software/gempak/examples/lightning/lightning.html

I also have a sample of a script in the GEMPAK tutorial:
http://my.unidata.ucar.edu/content/software/gempak/tutorial/exam.html

And, one more example using the $GEMTBL/config/prmlst.tbl product
entry of "points" or "stid" to define a marker or +/- character 
respectively for the NLDN file alias and the SFCTIME program I provided
to list the available times in a surface file which can be used
to create output file names and TITLE lines with time string info such
as:


#!/bin/csh -f

source ~gempak/Gemenviron

# NLDN environmental variable set in Gemenviron
# data files stored in 30 minute files names YYYYMMDDHHNN_nldn.gem
# as provided in $NAWIPS/ldm/etc/templates/pqact.gempak_decoders.in
cd $NLDN
set FILES=`ls *_nldn.gem | tail -4`

# create a uniqueue working directory for gif file output
set WORKDIR=/tmp/nldn.$$
mkdir -p $WORKDIR
cd $WORKDIR

foreach FILE ($FILES)
   # loop for each of most recent data files
   
   set TIMES=`sfctime $NLDN/$FILE | grep -v '\['`
   foreach TIME ($TIMES)
      # run sfmap for each time in the data file
      # nldn data typically stored in 5 minute bins per dcnldn

      set YMDHN=`echo $TIME | cut -c1-6,8-11`
      set OUTFILE="nldn_${YMDHN}.gif"

      sfmap << EOF
          AREA     = dset
          GAREA    = uslcc
          SATFIL   =  
          RADFIL   =  
          SFPARM   = points
          DATTIM   = $TIME
          SFFILE   = nldn|${TIME}
          COLORS   =  
          MAP      = 6
          LATLON   = 0
          TITLE    = 6
          CLEAR    = y
          PANEL    = 0
          DEVICE   = gif|${OUTFILE}|900;700
          PROJ     = def
          FILTER   = 
          TEXT     = 
          LUTFIL   = 
          STNPLT   =  
          CLRBAR   =  
          IMBAR    = 
          run

          exit
EOF
      gpend
   end
end


# do something with our gif files, such as create an animaged gif
# using the Imagemagick program called convert, pause after last image

set LAST=`ls nldn_*.gif | tail -1`
convert -loop 0 -delay 20 nldn_*.gif -delay 300 $LAST /tmp/loop_nldn.gif
cd /tmp
rm -rf $WORKDIR



Steve Chiswell
Unidata User Support



On Sat, 2003-11-01 at 20:18, Chris Novy wrote:
> I'm still looking for a sample script I can reverse-engineer to produce GIF 
> images (non-XW) from NLDN files.  Does anyone have an example I can look 
> at?  I'm decoding the NLDN data into.gem files but still can't process them.
> 
> Thanks.
> 
> ..Chris..
>