[Thread Prev][Thread Next][Index]

[ferret_users] Ferret can't read netcdf file on Mac OS X (...without ncdump then ncgen)

Hi all,

The "I have a netcdf file that Ferret refuses to read" on the FAQ page does not currently have an answer and I am having this problem. I am using ferret v5.70 for Mac OS X, and it seems that I do not get the same problem with ferret v6.1 on linux, logging into computers from my previous job (i.e. this is not a solution for me!).

When reading netcdf output from my model (NCAR CAM ), ferret gives the message:

yes? use cam_output.nc
** netCDF error: Not a netcdf file
  is this a CDF file ?

However, it *is* a netcdf file and can be read as such by netcdf operators, IDL and others. An "ncdump" of the output file followed by syntax checking with "ncgen" reveals a small error in one of global attributes (an empty title field). Even after correcting the file with "ncatted", ferret refuses to read the file. But, an "ncdump" of the corrected file, followed by "ncgen" does produce a file that can be read by ferret. In summary, here's my current recipe:

ncatted -a title,global,a,c,"Some title string" cam_output.nc 
ncdump cam_output.nc > cam_ouput.cdl

# File that can be read by ferret
ncgen -o cam_output_ferret.nc cam_output.cdl

#for checking
ncdump cam_output_ferret.nc > cam_output_ferret.cdl

A "diff" of cam_output.cdl and cam_output_ferret.cdl reveals no differences (except the file name), so I am stumped. My "recipe" is ok for small files, but it takes a long time when dealing with larger files.

So, the question is, am I stuck with using NCO to get something that can be read by ferret, or is there a quicker solution? 

Thanks for any help!


p.s. Apologies if this email comes through twice

Paul Young

Chemistry and Climate Processes
Chemical Sciences Division
NOAA Earth System Research Laboratory
325 Broadway R/CSD8
Boulder CO 80305-3328

Tel:   +1 303-497-4943
Fax:   +1 303-497-5686

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement