This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Oh my goodness. :) I'll try this out. That's exactly what is needed. I'm off to Atlanta, so I'll be getting to this as time permits. NCDC is finally submitting to using n-awips in "operations". (for the NWS legal data archive requirements). So, this will help. As you may know, I did a proposal to establish our NOAAPort feed here which works fine. (with much help from FSL). Anyway- since NOAAPort has no backup, they still ask for files from the NWSTG, and they (TG) concatenate the files like this. Thank you very much Steve- well done. Glenn Steve Chiswell wrote: > >From: "Glenn Rutledge" <address@hidden> > >Organization: NCDC > >Keywords: 200105031513.f43FDwp17256 > > > > > > Steve, > > Thanks much for the redbook soultions. It's now finally working. I've > > just been asked if I can plot the attached "redbook" graphic file NCDC > > receives form the NWS OSO servers (I think). I can't make any sense of > > the data just looking at it (don't know how the create these files, or > > wheter they even have headers- I think they concatenate many products > > into single files). > > > > My questions is, how would you try and run the redbook "decoder" on this > > file? Thx much Glenn > > > > > > > > Glenn, > > The GEMPAK redbook graphics library routines are not set up to look > for more than 1 product in a file. Also, as you suspected, the file > you sent doesn't contain a transmission header like the products on > the NOAAPORT broadcast do, so my dcredbook program isn't going > to solve your problem. > > The best solution I can offer you is a short program to dump out the > individual redbook graphics products from what I found by looking through > the file you sent me. Its an example- you might have to tweak later > depending on your data files since I only had a small sample of data to > look at. After you dump out the individual redbook graphics > to separate files, you can either use dcredbook on each individually > to create a separate vgf file, or use GPMAP to draw each graphic to a common > or > separate files. > > > The attatchment you sent me had 4 redbook products contained within it. > The products (not really a coherent set of products!) were: > 1) severe weather reports > 2) day2 convective outlook > 3) 96 hour 500mb heigh lables > 4) 72 hour 500mb heigh lables > > The separator between each product seemed to be: > #### some_numbers #### > So, I created the attatched parse.c program (compile with cc -o parse parse.c) > to take the pieces (keying on the 4 "#" characters) and wrap them with > a FOS header and trailer and dump out to separate files. > > Running "parse glenn.dat" (glenn.dat was your attatched file) gives me > 4 files: > 7408 May 15 12:43 redbook_0.dat > 1110 May 15 12:43 redbook_1.dat > 6652 May 15 12:43 redbook_2.dat > 6478 May 15 12:43 redbook_3.dat > > From here, I can run each through dcredbook to create vgf files: > > % set FILES=`ls redbook_*.dat` > % foreach FILE ($FILES) > % cat $FILE | dcredbook_vg -d - 'VG|%P-YYYYMMDDHH.vgf' > % end > > > Or, here is an example script for running GPMAP (set the DEVICE to xw, vg etc > depending on your needs!) > > #!/bin/csh -f > # > # Sample script to plot all files named redbook_*.dat using gpmap. > # Each redbook graphic file will be plotted in a separate color. > > set FILES=`ls redbook_*.dat` > > @ CNT = 0 > @ LINE_COLOR = 6 > > foreach FILE ($FILES) > > if($CNT == 0) then > set CLEAR=yes > else > set CLEAR=no > endif > > gpmap << EOF > MAP = 1 > GAREA = AFNA > PROJ = str/90;-105;0 > SATFIL = > RADFIL = > LATLON = 0 > PANEL = 0 > TITLE = 1 > TEXT = 1 > CLEAR = $CLEAR > DEVICE = XW > LUTFIL = > STNPLT = > VGFILE = > AFOSFL = > AWPSFL = $FILE > LINE = $LINE_COLOR > WATCH = > WARN = > HRCN = > ISIG = > LTNG = > ATCF = > AIRM = > NCON = > SVRL = > r > > e > EOF > > @ CNT = $CNT + 1 > @ LINE_COLOR = $LINE_COLOR - 1 > if($LINE_COLOR == 1) @ LINE_COLOR = 30 > > end > > ############### end of csh script ################## > > Hope this helps. > Steve Chiswell > Unidata User SUpport > > **************************************************************************** < > Unidata User Support UCAR Unidata Program < > (303)497-8644 P.O. Box 3000 < > address@hidden Boulder, CO 80307 < > ---------------------------------------------------------------------------- < > Unidata WWW Service http://www.unidata.ucar.edu/ < > **************************************************************************** < > > ------------------------------------------------------------------------ > Name: parse.c > parse.c Type: Plain Text (TEXT/PLAIN) > Encoding: BASE64 > Description: parse.c > > Name: glenn.dat > Type: unspecified type (APPLICATION/octet-stream) > glenn.dat Encoding: BASE64 > Description: glenn.dat > Download Status: Not downloaded with message