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

Re: 20020613: NIDS data (fwd)



Peter,

In GEMPAK 5.6.A I added the ability for the im library and
gn library to recognize whether a NIDS image was uncompressed
or was compressed with the zlib compression as they are distributed
in noaaport. These routines im and gn library routines are completely different
than 5.4 and of course require that the software be linked against libz.a.

Your RAP people have been using a standalone ucnids.c program written
by Dan Vietor to uncompress the nids so that they could use
old plotting programs that didn't know how to read zlib compressed images.

The problem that people using ucnids are having is that the program
that Dan wrote had a hardcoded zlib check (which changed when the CCB block
changed this week). So, you could update your ucnids program (see the
ldm-users email archives for Dan's new update which will break again
if the CCB is ever changed). All they need to do is link the program against
libz.a. They may have to download and build the zlib distribution  that if its
not on their system. libz.a is part of RH linux, Irix etc, but not Solaris.

The other possibility is for RAP to download the binary distribution of
GEMPAK and grab the radmap_sw program out that is the hardcoded radmap routine
linked against the gif driver that doesn't require the X server.

Steve Chiswell
Unidata User SUpport


On Sat, 15 Jun 2002, Peter Neilley wrote:

> Steve,
> 
>   As you may know, I've moved on from NCAR/RAP.  However, I'm trying
> to give them a hand fixing an application I wrote they still use.
> The app was a standalone NIDS-to-GIF plotter that was based on
> GEMPAK 5.4.1.  I ripped out from GEMPAK everything not needed to
> plot NIDS products, and linked it directly with a non X-Server based
> GIF driver from Texas A&M.
> 
> Anyway, that app has been failing since Thursday, presumably because
> of the change in compression.  The relevant routine looks to be
> a driver routine called xrnids.c .  RAP has not been keeping up with
> GEMPAK distributions, so rather than grab a whole new distribution
> could you send me a recent copy of xrnids.c that works on the new NIDS
> compression format?  Presumably I can diff it with the one I
> have now and figure out what needs fixing.
> 
> I suspect that one of these snipits from xrnids.c needs adjusting:
> 
>         fread ( numrc, 2, 1, fp );
>         numr = ((unsigned short)numrc[0] << 8 ) + numrc[1];
>         fread ( rawData, lendat, 1, fp ) ;
> or:
>            length = ((unsigned short)rawdptr[0] << 8) + rawdptr[1];
>            rstart_angle = ((unsigned short)rawdptr[2] << 8) + rawdptr[3];
>            rdelta_angle = ((unsigned short)rawdptr[4] << 8) + rawdptr[5];
>            rawdptr += 6 ;
> or:
>            for ( run = 0; run < run_length ; run++ ) {
>                drun = (unsigned int)rawdptr[0] >> 4;
>                dcode = (unsigned int)rawdptr[0] & 0xf ;
>                for (i = 0; i < drun; i++) { radial[ib++] = dcode; }
>                rawdptr++ ;
>            }
> 
> 
> 
> or all 3 need updating.
> 
> Thanks.
> 
> Peter Neilley.
> 
>