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

20020412: gempak ltg screening and gridding



Brian,

At present, the gdobscnt program does not look at any of the parameters
(such as sgnl). It merely looks for all reporting locations in the
file and counts those within the radius of the grid point.
The most likely course to change this is to add a parameter that
allows the stations to be selected based on the user criteria
like SFPARM=sgnl>xxxx etc, and change the output grid from "ODEN"
to a user specified name. Now that I have released 5.6.F, I can look
at that possibility if you like.

SGNL is read from the nldn data by the dcnldn decoder, and written to
the output file based on the $GEMTBL/pack/nldn.pack values where
I have the valid rage of values as -999999 to 99999. The valid range could
be modified to only allow strikes of certain values, but that would then
require that you run the decoder multiple times.

Since SFMOD really won't work with these ship files, because the station names
are all either "+" or "-", the only other way to subset the input surface file 
to gdobscnt is to use sflist like:

 SFFILE   = nldn|020418/1200
 AREA     = dset
 DATTIM   = 1200
 SFPARM   = slat;slon;sgnl<-100
 OUTPUT   = f/sgnl-100.dat
 IDNTYP   = stid
 GEMPAK-SFLIST>r

then create a surface file, and import the previous output file

 SFOUTF   = test.sfc
 SFPRMF   = nldn.pack
 STNFIL   =  
 SHIPFL   = y
 TIMSTN   = 1/9999
 SFFSRC   = ship
 GEMPAK-SFCFIL>


 SFEFIL   = sgnl-100.dat
 SFFILE   = test.sfc
 GEMPAK-SFEDIT>r

 SFEDIT PARAMETERS: 

 Edit file:           sgnl-100.dat                                              
                                                                      
 Output surface file: test.sfc 


Now, you have a file with just sgnl < 100. You coul repeat the process
with sgnl > 100 if you then wanted to run gdobscnt to count those
strikes with |SGNL|>=100.

Steve Chiswell
Unidata User Support




>From: Brian Colle <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200204121319.g3CDJTa23723

>
>Hi,
>
>I appologize for the loaded question below which did not yield a response.
>Let me see if I can focus my question. Basically, I want to learn where in
>the gempak code does the lightning data get read in and the sgnl data get
>interpretated? Since programs like sfmap use sgnl in user parameters like
>sfparm, I was hoping to pass this info or use the same logic in other
>programs such as gdobscnt.f, so I can count only a certain sgnl strength.
>
>I have searched through this huge code endlessly trying to find clues on
>how obs are read in and how the data parameters interpretated. I still
>can't find where sgnl is used.
>
>Please let me know if you have any ideas.
>
>Thanks for your time...
>
>Brian
>
>____________________________________________________________
>Prof. Brian Colle         INTERNET: address@hidden
>(631)632-3174
>Institute for Terrestrial and Planetary Atmospheres
>Marine Sciences Research Center
>State University of New York at Stony Brook
>Stony Brook, NY 11794-5000
>
>
>On Wed, 13 Mar 2002, Brian Colle wrote:
>
>> 
>> Hi,
>> 
>> I want to do some counting of lightning strikes based on the programs
>> below, but I only want to count certain sgnl strengths (ie., sgnl> 0 or
>> < 0). How difficult would it be to get gempak5.6 to screen for sgnl before
>> passing the obs to the counting program gdobscnt below?
>> 
>> Thanks for your help...
>> 
>> Brian
>> 
>> On Wed, 24 Oct 2001, Unidata Support wrote:
>> 
>> > 
>> > Brian,
>> > 
>> > I have created a program called GDOBSCNT that will find the
>> > number of observations within a specified radius of each grid
>> > point and store the grid as parameter ODEN@0%none for each 
>> > time specified from the input surface file.
>> > 
>> > You can download the tarfile from:
>> > http://www.unidata.ucar.edu/packages/gempak/contrib/gdobscnt.tar.Z
>> > 
>> > In your GEMPAK 5.6 $NAWIPS directory, unpack the tarfile with:
>> > 
>> > zcat gdobscnt.tar.Z | tar xvf -
>> > 
>> > Then build and install with:
>> > 
>> > cd $NAWIPS/unidata/programs/gdobscnt
>> > make clean
>> > make all
>> > make install
>> > make clean
>> > 
>> > 
>> > To use the program, you should first create your grid file with your 
>> > required grid spacing using GDCFIL. 
>> > 
>> > The program uses 4 parameters. SFFILE, DATTIM, GDFILE, RADIUS.
>> > SFFILE is your input surface (NLDN) file. GDFILE is the
>> > file for the grids to be stored. DATTIM is the times
>> > (a list, range, single, or all) from the surface file
>> > to process. RADIUS is the range, in meters, from the
>> > each grid point that stations will be counted.
>> > 
>> > The result is a grid called ODEN for each time specified
>> > by DATTIM.
>> > 
>> > For example, using today's 1630Z NLDN file (which contains
>> > nldn bins at 5 minute intervals from 1630Z to 1655Z), and a grid 
>> > file I have already created called test.grd specifying a 50KM
>> > radius (50000m):
>> > 
>> > % gdobscnt
>> >  SFFILE    Surface data file                 nldn|011024/1630
>> >  DATTIM    Date/time                         all
>> >  GDFILE    Grid file                         test.grd
>> >  RADIUS    Radius (in meters) to search      50000
>> >  Parameters requested: SFFILE,DATTIM,GDFILE,RADIUS.
>> >  GEMPAK-GDOBSCNT>r
>> >  Processing 011024/1630    
>> >  Processing 011024/1635    
>> >  Processing 011024/1640    
>> >  Processing 011024/1645    
>> >  Processing 011024/1650    
>> >  Processing 011024/1655    
>> >  Parameters requested: SFFILE,DATTIM,GDFILE,RADIUS.
>> >  GEMPAK-GDOBSCNT>e
>> > 
>> > I can then plot the data, with grid point values and contous in GDPLOT2
>> > with:
>> >  GDFILE   = test.grd
>> >  GDATTIM  = 1630-1655
>> >  GLEVEL   = 0
>> >  GVCORD   = none
>> >  PANEL    = 0
>> >  SKIP     = 0
>> >  SCALE    = 0
>> >  GDPFUN   = ODEN
>> >  TYPE     = cm
>> >  CONTUR   = 0
>> >  CINT     = 0
>> >  LINE     = 3
>> >  FINT     = 
>> >  FLINE    = 
>> >  HILO     =  
>> >  HLSYM    =  
>> >  CLRBAR   = 1
>> >  WIND     = 
>> >  REFVEC   =  
>> >  TITLE    = 1
>> >  TEXT     = 1
>> >  CLEAR    = y
>> >  GAREA    = 34.0;-95.2;43.7;-79.2
>> >  PROJ     = LCC/25.0;-90.0;25.0
>> >  MAP      = 1
>> >  LATLON   = 0
>> >  DEVICE   = XW
>> >  STNPLT   =  
>> >  SATFIL   =  
>> >  RADFIL   =  
>> >  LUTFIL   =  
>> >  STREAM   =  
>> >  POSN     = 0
>> >  COLORS   = 5
>> >  MARKER   = 0
>> >  GRDLBL   = 0
>> >  FILTER   = 0
>> >  GEMPAK-GDPLOT2>r
>> > Creating process: xw for queue 12551
>> >  [TG 0] 1630-1655
>> >  Number of times =            6
>> >             1 011024/1630
>> >             2 011024/1635
>> >             3 011024/1640
>> >             4 011024/1645
>> >             5 011024/1650
>> >             6 011024/1655
>> > <etc...>
>> > 
>> > The TYPE=cm in gdplot2 will plot both the contours of the data as well as
>> > the data values at the grid point locations (marker=0).
>> > 
>> > Let me know if you have questions/problems/etc.
>> > 
>> > Steve Chiswell
>> > Unidata User Support
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > >From: Unidata Support <address@hidden>
>> > >Organization: UCAR/Unidata
>> > 
>> > >
>> > >Brian,
>> > >
>> > >The ltgmap program was the same program as sfmap. It just allowed a 
>> > >greater number of times/observations. In GEMPAK 5.6, I increased
>> > >the number of times/observations in sfmap so that a separate ltgmap progr
> am
>> > >wasn't needed.
>> > >
>> > >The lat/lon locations are the station locations (each lightning strike
>> > >is treated as a "ship" report).
>> > >
>> > >I can create a program in the next few days that will read the surface fi
> le 
>> > >and create the grid of "reports within a DELTA radius".
>> > >
>> > >Steve Chiswell
>> > >Unidata User SUpport
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >>From: Brian Colle <address@hidden>
>> > >>Organization: UCAR/Unidata
>> > >>Keywords: 200110222134.f9MLY8102451
>> > >
>> > >>
>> > >>Steve,
>> > >>
>> > >>> 
>> > >>> Brian,
>> > >>> 
>> > >>> At this point in time, there is nothing within GEMPAK
>> > >>> to make this type of computation as you require.
>> > >>> 
>> > >>> I would be possible to write a program to accumulate the number
>> > >>> of strikes within a given radius of a grid point.
>> > >>>
>> > >>
>> > >>In order to write another program I need to know how to open and
>> > >>read the ltg sfc file to extract the lat/longs for each lightning strike
> ,
>> > >>assuming that they are stored that way. Just to clarify, is there a gemp
> ak
>> > >>fortran subroutine that will read the file and extract this information?
>> > >>For example, I used to use ltgmap, which plotted the individual lightnin
> g
>> > >>strikes. I was hoping that I could take advantage of the way ltgmap read
> s
>> > >>in the data, but only use the lat/long info. I notice that the latest
>> > >>version of gempak doesn't even use ltgmap anymore?
>> > >> 
>> > >>> The other limitation you would have is that a 3km grid is going
>> > >>> to be a very large grid if you are attempting to cover the
>> > >>> entire country with a single grid. At present time, the default
>> > >>> maximum number of grid points in a file is 400,000.
>> > >>> A 4km national grid is approximately 1,200,000 points.
>> > >>> 
>> > >>> If you are doing a regional (or series of regional) grids
>> > >>> then that won't be a problem.
>> > >>> 
>> > >>
>> > >>Yes, I only want the regional NE US.
>> > >>
>> > >>Thanks again,
>> > >>
>> > >>Brian
>> > >>
>> > >>> >
>> > >>> >Hi,
>> > >>> >
>> > >>> >I have some gempak lightning data (surface files of sgnl strength) th
> at I
>> > >>> >want to interpolate to a uniformly spaced 3-km gempak grid such that 
> each
>> > >>> >grid point has the number of nearby strikes. With this gridded file I
>  can
>> > >>> >then contour the number density up in gempak. 
>> > >>> >
>> > >>> >Do you have any ideas or sample code how I can do this interpolation 
>> > >>> >of lightning data within gempak or interfacing gempak with f77? 
>> > >>> >
>> > >>> >I appologize in advance for the loaded question, but I am looking
>> > >>> >for ideas at this point.
>> > >>> >
>> > >>> >Thanks for your time...
>> > >>> >
>> > >>> >Brian
>> > >>> >____________________________________________________________
>> > >>> >Prof. Brian Colle         INTERNET: address@hidden
>> > >>> >(631)632-3174
>> > >>> >Institute for Terrestrial and Planetary Atmospheres
>> > >>> >Marine Sciences Research Center
>> > >>> >State University of New York at Stony Brook
>> > >>> >Stony Brook, NY 11794-5000
>> > >>> >
>> > >>> 
>> > >>> **********************************************************************
> *****
>> > > *
>> > >>> Unidata User Support                                    UCAR Unidata P
> rogra
>> > > m
>> > >>> (303)497-8644                                                  P.O. Bo
> x 300
>> > > 0
>> > >>> address@hidden                                   Boulder, CO
>  8030
>> > > 7
>> > >>> ----------------------------------------------------------------------
> -----
>> > > -
>> > >>> Unidata WWW Service                        http://www.unidata.ucar.edu
> /    
>> > >  
>> > >>> **********************************************************************
> *****
>> > > *
>> > >>> 
>> > >>
>> > >
>> > >
>> > 
>> > **************************************************************************
>> > Unidata User Support                                    UCAR Unidata Progr
>> > (303)497-8644                                                  P.O. Box 30
>> > address@hidden                                   Boulder, CO 803
>> > --------------------------------------------------------------------------
>> > Unidata WWW Service                        http://www.unidata.ucar.edu/   
>> > **************************************************************************
>> > 
>> 
>> 
>