[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20021203: metar2nc stopped working
- Subject: Re: 20021203: metar2nc stopped working
- Date: Tue, 3 Dec 2002 13:27:12 -0700 (MST)
On Tue, 3 Dec 2002, Unidata Support wrote:
>
> ------- Forwarded Message
>
> >To: address@hidden
> >From: John C Nordlie <address@hidden>
> >Subject: metar2nc stopped working
> >Organization: UCAR/Unidata
> >Keywords: 200212031714.gB3HEA411039
>
> My metar2nc has stopped working. Here's a log snippet:
>
> -------
> ncopen: filename "data/newton/surface/sao/02120315_metar.nc": No such file
> or directory
> Opening data/newton/surface/sao/02120315_metar.nc with ncid -1
> ncrecinq: ncid -1: Not a netCDF id
> NetCDF::recput result = -1
> data/newton/surface/sao/02120315_metar.nc
John,
The problem is that the netcdf file is not being created. Since you
stated that the permissions are ok, it's probably that the utility ncgen
is not being found by metar2nc decoder. metar2nc looks in these dirs:
if( -e "util/ncgen" ) {
$ncgen = "util/ncgen" ;
} elsif( -e "/usr/local/ldm/util/ncgen" ) {
$ncgen = "/usr/local/ldm/util/ncgen" ;
} elsif( -e "/upc/netcdf/bin/ncgen" ) {
$ncgen = "/upc/netcdf/bin/ncgen" ;
} elsif( -e "./ncgen" ) {
$ncgen = "./ncgen" ;
} else {
# looks for the ncgen utility in the LDM $PATH variable
open( NCGEN, "which ncgen |" ) ;
$ncgen = <NCGEN> ;
close( NCGEN ) ;
if( $ncgen =~ /no ncgen/ ) {
die "Can't find NetCDF utility 'ncgen' in PATH, util/ncgen
/usr/local/ldm/util/ncgen, /upc/netcdf/bin/ncgen, or ./ncgen : $!\n" ;
} else {
$ncgen = "ncgen" ;
}
}
If ncgen is not the problem, I would run the metar2nc from the command
line as user ldm, in the home dir. ie,
% metar2nc etc/metar.cdl . 0212 < <metaRawFile>
This will output the problem also.
Robb...
> KHLD 031515Z AUTO 09004G05KT M01/M01
> AO1 RH 99
> ncrecinq: ncid -1: Not a netCDF id
> NetCDF::recput result = -1
> data/newton/surface/sao/02120315_metar.nc
> KMTR 031515Z AUTO 36007G09KT M03/M03
> AO1 RH 99 PCPNY
> -------
>
> data/newton/surface/sao exists, has room, and ldm has write permissions
> to it. The log containing the snippet above was written in that
> directory.
>
> metar2nc exists in $HOME/decoders, metar.cdl is in $HOME/etc. Here's
> the entry from pqact.conf that triggers it:
>
> -------
> DDS|IDS ^S(A....|P....|XUS8.) .... ([0-3][0-9])
> PIPE decoders/metar2nc
> etc/metar.cdl
> data/newton/surface/sao
> (\2:yy)(\2:mm)
> -------
>
> Help!
>
>
> =========================================================================
> ==)---------- | ----------(==
> John Nordlie N0RNB | Regional Weather Information Center
> address@hidden | University of North Dakota
> 701-777-6112 / 701-777-3888 fax | PO Box 9007, Grand Forks, ND 58202-9007
> http://blizzard.rwic.und.edu/~nordlie/
> |
> C Program. | "If you ask me, most sports would
> C Program Run. | benefit from an infusion of rocketry."
> Run, Dammit, Run! | -- Jason Fox, 'Foxtrot'
> ==)---------- #include <std.disclaimer.h> ----------(==
> =========================================================================
>
>
> ------- End of Forwarded Message
>
>
===============================================================================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
address@hidden WWW: http://www.unidata.ucar.edu/
===============================================================================