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

Re: metarnc problems



On Thu, 13 Jan 2000, Bryan G. White wrote:

> Robb,
> 
> I don't know much at all about netcdf but.....
> 
> I'm having problems with the metarnc decoder.
> 
> I can't get out the data of the most current hour.  When I do a ncdump on the 
> .nc file, I get the dimensions and variable headers, but the data part only
> gives:
>   // global attributes:
>                 :title = "METAR definition" ;
>                 :version = 1.1 ;
> data:
> }
> 
> It then has nothing after that point.
> Under the dimensions sections, recNum is strange:
>    recNum = UNLIMITED ; // (0 currently)
>  

Bryan,

This is a file system type problem, since the data is in the file after
1-2 hours. The metar2nc is keeping the file open so the NetCDF header and
data might not be written completely yet.  So when you open the file, you
only get the original template. At this time, I don't have a good solution
for you. The only thing that comes to mind is to modify the time the file
is kept open from 20 minutes to 10 minutes.  Once the file is closed, then
the data will be available. The con of this solution is the extra overhead
of opening and closing the file more often.  I'm at the AMS and I can't
remember the name of the routine to open/create file names but if you
search for 20, you probably find the line to change.  Let me know next
week if you found the line to change.

Robb...



> After the most current hour has past (sometimes it takes two hours), I can get
> to the data.  The recnum says:
>   recNum = UNLIMITED ; // (1312 currently)
> 
> There is data in the most current hours data file.  The file size grows.  
> Sometimes I can get the most current hours data out.
> 
> I use a perl program with netcdf-perl routines to retrieve the data from the
> .nc files.
> 
> I'm stumped.
> 
> 
> I have the following in the ldm pqact file:
>   DDS|IDS        ^S(A....|P....|XUS8.) .... ([0-3][0-9])
>        PIPE    metar2nc
>         /usr/local/etc/metar.cdl
>         /home/atmos/v/data/ddplus/metarnc (\2:yy)(\2:mm)
> 
> 
> Thanks
> 
> Bryan White
> 

===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================