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

Re: 20050301:netCDF Fortran (77 + 90) - RE: ncgen error



>To: address@hidden
>From: "Bryan Duncan" <address@hidden>
>Subject: netCDF Fortran (77 + 90) - RE: ncgen error
>Organization: NASA
>Keywords: 200503012108.j21L8L8n018995

Hi Bryan,

> Institution: NASA
> Package Version: netcdf-3.6.0-p1
> Operating System: LINUX OS
> Hardware Information: Niveus 400 Workstation from Penguin, Dul Intel Xeon 
> Processors
> 
> I just installed your latest netcdf release and have found a problem
> with ncgen.  When I generate a netcdf file from the attached cdl
> file, gridfile.cdl, it produces a netcdf file that I can use ncdump
> on without problem.  However, the file cannot be \"seen\" by older
> versions of netcdf.  I simply get the error \"Not a netCDF file\".
> This error has been verified by other people to whom I have sent the
> file.
> 
> I suspect that there is a bug with ncgen in the latest release of
> netcdf.  Can you please look into this.

I just used ncgen from the 3.6.0-p1 distribution to generate the
corresponding netCDF file from the gridfile.cdl you sent and the
netCDF file it produces works fine with ncdump versions as far back as
3.4 from 1998, so I can't reproduce the problem.

However, the file you sent as an attachment, out_grid_dao_jan.nc,
was much larger than the netCDF file I generated from your CDL:

  $ ls -l gridfile.nc out_grid_dao_jan.nc
  -rw-r--r--   1 russ     ustaff     14908 Mar  1 14:48 gridfile.nc
  -rw-r--r--   1 russ     ustaff     72331 Mar  1 14:49 out_grid_dao_jan.nc

and its first 4 bytes are 

  $ od -An -c -N4 out_grid_dao_jan.nc 
           016 003 023 001

which if you use the "control-A" type notation '^A' for the 001 byte
correspond to the "control characters":

  '^N' '^C' '^S' '^A'

These happen to be the initials "NCSA" for the National Center for
Supercomputing Applications, where HDF was developed.  I suspect if
you check your PATH you may be getting "ncgen" from some directory
that includes HDF4 applications, because HDF4 included an optional
implementation of the netCDF-2 interface and corresponding
ncgen/ncdump utilities that actually produced HDF4 files.  This is
just a guess, because I can't locate an HDF4 file right now to compare
the first 4 bytes with.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden          http://www.unidata.ucar.edu/staff/russ