[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19991130: dcnldn
- Subject: 19991130: dcnldn
- Date: Tue, 30 Nov 1999 13:04:37 -0700
Scott,
I have posted a tar file of the dcnldn decoder in the gbuddy
ftp area (ftp.unidata.ucar.edu) login gbuddy, password XXXXXX
as:
nawips-5.4/contrib/dcnldn-5.4.3.tar.gz
By default, I allow 25000 strikes in a file, but this can be controlled
with the -m decoder flag. I built version 5.4.3v here with MMHDRS = 30000,
LLSTFL = 29700, and LLMXTM = 300. The main considerations I have in number
of times in a files is 5 minute profiler data which optimally could be stored
in a daily file with 288 times. Aside from NLDN data here, SHEF data and
ACARS data are better handled with larger file sizes. I allow a @@ template
in the dcnldn file name which gets incremented if the number of strikes
exceeds the number of station entries. With hourly files, summertime
data will exceed 25,000 strikes in an hour. If @@ isn't used, I still
tack on a _%% template to the file name which would be used if an additional
file need sto be opened (which shouldn't be needed if 5 minute bins are used
with the NN template).
I use Makefiles for the building, but here are the basic steps for a few OS's:
HP:
fort77 +E4 +E6 -c *.f
cc -Aa -D_HPUX_SOURCE -DHPUX -I${GEMPAKHOME}/include \
-I${GEMPAKHOME}/source/ldmlog -c *.c
fort77 -Wl,+n *.o $GEMLIB/bridge.a $GEMLIB/ldmlog.a \
$GEMLIB/cgemlib.a $GEMLIB/gemlib.a -lm -o dcnldn
IRIX64:
f77 -o32 -O -c *.f
cc -DUNDERSCORE -DIRIX -o32 -O -I${GEMPAKHOME}/include \
-I${GEMPAKHOME}/source/ldmlog -c *.c
f77 -o32 -O *.o $GEMLIB/bridge.a $GEMLIB/ldmlog.a \
$GEMLIB/cgemlib.a $GEMLIB/gemlib.a -o dcnldn
Linux:
gcc -DUNDERSCORE -DLinux -I${GEMPAKHOME}/include \
-I${GEMPAKHOME}/source/ldmlog -c *.c
g77 -fno-second-underscore -c *.f
g77 -fno-second-underscore *.o $GEMLIB/bridge.a $GEMLIB/ldmlog.a \
$GEMLIB/cgemlib.a $GEMLIB/gemlib.a -o dcnldn
You can test the decoder with:
cat 9933416.ingest | \
dcnldn -v 1 -d - -m 1000 -s minute05 -p nldn.pack YYMMDDHHNN_nldn.gem
The only real deviation from the standard dc decoder convention is that
since nldn data doesn't use a station table, I have used the -s flag
to define how the data will be binned in the output file. Using
minute05 defines the DATTIM gempak to 5 minute bins (ihhmm maintains
the actual flash time in the DM_ storage call).
The main routine for extracting the nldn bulletins from input is
dc_gnldn which is just a rewrite of dc_gbul. dcnldn_input
calls dc_gnldn to get a buletin, then extracts the flash
info for each record and calls the write routine. The write_nldn
subroutine just handles the file opening/closing etc., and
the sfnldn, dmnldn routines are just some streamlining
of gemlib routines that Peggy created years ago- I've
cleaned up and fixed the buffering since. The nldn.pack is the
packing file I use for my data. The nldn.pack.full contains all the
possible parameters.
Our pqact.conf entry looks like:
NLDN ^([0-9][0-9])([0-3][0-9][0-9])([0-2][0-9])([0-5][0-9])([0-5][0-9])
PIPE dcnldn -m 25000 -s minute05
-d gempak/logs/dcnldn.log -v 1 -p gempak/tables/pack/nldn.pack
data/gempak/nldn/YYYYMMDDHHNN_nldn.gem
The data in ship files looks like:
SFFILE = 9911301630_nldn.gem
AREA = dset
DATTIM = all
SFPARM = dset;slat;slon
OUTPUT = T
IDNTYP = STID
GEMPAK-SFLIST>r
PARM = SGNL;MULT;SLAT;SLON
STN YYMMDD/HHMM SGNL MULT SLAT SLON
+ 991130/1630 620.00 1.00 38.13 -67.68
- 991130/1630 -130.00 1.00 26.27 -79.91
+ 991130/1630 580.00 1.00 39.67 -65.79
- 991130/1630 -230.00 1.00 39.55 -65.69
+ 991130/1630 550.00 1.00 33.29 -71.83
- 991130/1630 -80.00 2.00 26.63 -79.77
+ 991130/1630 800.00 1.00 35.98 -73.00
+ 991130/1630 330.00 1.00 39.75 -65.83
+ 991130/1630 200.00 1.00 32.26 -73.34
- 991130/1630 -110.00 2.00 26.25 -79.93
+ 991130/1630 200.00 1.00 39.66 -65.80
I give the STID +/- for plotting convenience. I've also used SGNL in gpmap
scripts for toggling the markers like sfparm=sgnl<0.
In nmap, I have a simple STID parameter for plotting the data +/- in OBS
as the default.
By the way, I have commented out the immediate return for numerr=0 in er_lmsg.
Steve