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

20000828: Satellite Precipitation Estimates



Stacy,

The bulletin you mention actually appears to have some null characters embedded
within the text. This is causing nwx not to recognize that a complete
bulletin exists.

You can verify this by filtering out the null characters:

cd $TEXT_DATA/fflood/satest
mv 00082820.satest 00082820.satest.old
cat 00082820.satest.old | tr -d '\000' > 00082820.satest

NWX should now find the complete bulletin.


To fix this, you can add a check to:
$NAWIPS/nprogs/nwx/source/srchb.c

At line 208, add the three lines:
                /* Chiz/Unidata check for nulls */
                for(i=0;i<srchinfo->file_info.file_len;i++)
                   if(_rep.text[i] == 0) _rep.text[i] = ' ';


This should be between the 2 sections "Read the contents of the
file into the TEXT string" and "Search the TEXT" as below:

                /*
                 * Read the contents of the file into the TEXT string.
                 */
                if ( fread( _rep.text, srchinfo->file_info.file_len,
                                1, srchinfo->file_info.fptr) != 1 ){
                    /*
                     * reading error
                     */
                    report[0] = '\0';
                    *iret = -1;
                    return;
                }

                /* Chiz/Unidata check for nulls */
                for(i=0;i<srchinfo->file_info.file_len;i++)
                   if(_rep.text[i] == 0) _rep.text[i] = ' ';

                /*
                 * Search the TEXT for the correct report.
                 */


After editing this routine, you can rebuild and install nwx with:

cd $NAWIPS/nprogs/nwx/source
make clean
make all
make install
make clean

If you have touble editing the file mentioned above, let me know and I 
will post the complete routine patched.

Steve Chiswell

>From: address@hidden
>Organization: UCAR/Unidata
>Keywords: 200008282138.e7SLcrN20621

>
>Hello, 
>
>My name is Stacy Wehmeyer and I am working with Pat Market at the
>University of Missouri-Columbia to set up the LDM and workable Gempak
>applications.  We've run across a problem when trying to get Satellite
>Precipitation Estimates into NWX for text display.  We are receiving the 
>data since changing pqact.conf to read:
>
># Satellite Precipitaion Estimates
>WMO     ^TXUS20 KWBC ([0-3][0-9])([0-2][0-9])
>        FILE    /asp/met/data/ldm/gempak/nwx/fflood/satest/(\1:yy)(\1:mm)\1\2.
> sa
>test
>#
>
>We are able to 'more' the files (like 00082820.satest) so we know what they
>contain, but when we try to pull them up via NWX (through NTL), the message
>"No data available for TXUS20 KWBC" appears.  Our tables for NWX products
>point as such:
>
>***guidata.tbl***
>        Satellite_Precip_Estimates|SAT_EST
>
>***master.tbl***
>SAT_EST      satest.bull  B $TEXT_DATA/fflood/satest                 satest
>
>***satest.bull***
>! SATEST.BULL
>!
>! This table contains the bulletin/station information to be used
>! with the Satellite Precipitation Estimates.
>!
>! The format for the file is given below, with the
>! number of characters in parentheses.
>!
>!BULL  KSTN     NAME                             ST CO   LAT    LON  ELEV
>!(6)   (8)      (32)                            (2)(2)   (5)    (6)   (5)
>!
>TXUS20 KWBC     NMC                              MD US  3885  -7693    50
>
>Is the error in pointing from the data file into NWX, or could it be more 
>complicated than that?  Any help would be appreciated.
>
>Stacy Wehmeyer
>Graduate Research Assistant
>Department of Atmospheric Science
>University of Missouri-Columbia
>