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

[netCDF #GVV-491226]: Netcdf 4 classic file not readable with netcdf 3 ncdump



Hi James,

> We have a netcdf 4 classic file written by Matlab that ncdump from
> netcdf 3.6.3 cannot read. Is that a bug?

No, in order to read a netCDF-4 classic file, the ncdump would have to be linked
to a netCDF-4 library.  The behavior you see is the way it's supposed to work.

A netCDF-4 classic file is really an HDF5 file that has netCDF-4 artifacts to
indicate that it follows the classic data model.  It can be accessed by any
netCDF-3 program relinked to a netCDF-4 library, but a program linked to
a netCDF-3 library can't access anything in such a file.

--Russ

> wasabi:bes-testsuite jimg$ /Users/jimg/src/shrew/deps/netcdf-3.6.3/bin/ncdump 
> -h ~/Downloads/temperature_hycom_1m_Assim_20060601_0012_SST.nc
> /Users/jimg/src/shrew/deps/netcdf-3.6.3/bin/ncdump: 
> /Users/jimg/Downloads/temperature_hycom_1m_Assim_20060601_0012_SST.nc: 
> NetCDF: Unknown file format
> 
> [ the ncdump on my path is from netcdf 4.1.2 ]
> 
> wasabi:bes-testsuite jimg$ ncdump -k 
> ~/Downloads/temperature_hycom_1m_Assim_20060601_0012_SST.nc
> netCDF-4 classic model
> 
> wasabi:bes-testsuite jimg$ ncdump -h 
> ~/Downloads/temperature_hycom_1m_Assim_20060601_0012_SST.nc
> netcdf temperature_hycom_1m_Assim_20060601_0012_SST {
> dimensions:
> nx = 4608 ;
> ny = 3296 ;
> variables:
> short sst(ny, nx) ;
> sst:long_name = "sst" ;
> sst:standard_name = "hycom_generated_sea_water_temperature" ;
> sst:units = "K" ;
> sst:add_offset = 267.15f ;
> sst:scale_factor = 0.01f ;
> sst:valid_min = 0s ;
> sst:valid_max = 4600s ;
> sst:_FillValue = -32768s ;
> sst:source = "HYCOM Assimilated Model VERSION?" ;
> double DateTime ;
> DateTime:standard_name = "time" ;
> DateTime:long_name = "time since 1970-01-01 00:00:00.0" ;
> DateTime:units = "seconds since 1970-01-01 00:00:00.0" ;
> 
> // global attributes:
> :title = "Conditioned Assimilated HYCOM Sea-Water Temperature" ;
> :summary = "This netCDF-4 file contains Sea-Water Temperature information 
> from the top meter of the ocean.  Data is acquired from the global HYCOM 
> model and then further conditioned to meet CF-1.5 and to make it usable in 
> future steps of the SST Fronts process.  Acceptable temperature values range 
> from -267.15K to 313.15K.  These data were created with the sponsorship of 
> the National Science Foundation (NSF) and the State of Rhode Island.  Data 
> was processed at the University of Rhode Island Graduate School of 
> Oceanography (URI-GSO)." ;
> :standard_name_vocabulary = "CF-1.5" ;
> :Conventions = "CF-1.5" ;
> :Metadata_Conventions = "Unidata Dataset Discovery v1.0" ;
> :uuid = "685461a4-da29-461e-b415-f754d95d8294" ;
> :date_created = "20110907 101129.2407" ;
> :history = "{20110907 101129.2407 : 1.0 : 
> 685461a4-da29-461e-b415-f754d95d8294}" ;
> :creator_name = "Dan Iwanski" ;
> :creator_url = "http://www.sstfronts.org"; ;
> :creator_email = "address@hidden" ;
> :institution = "University of Rhode Island - Graduate School of Oceanography" 
> ;
> :project = "SST Fronts" ;
> :reference = "Chassignet EP, Hurlburt HE, Metzger EJ, Smedstad OM, Cummings 
> J, Halliwell GR, Bleck R, Baraille R, Wallcraft AJ, Lozano C, Tolman HL, 
> Srinivasan A, Hankin S, Cornillon P, Weisberg R, Barth A, He R, Werner F, 
> Wilkin J (2009) U.S. GODAE: Global ocean prediction with the HYbrid 
> Coordinate Ocean Model (HYCOM). Oceanography 22(2):64-75" ;
> :acknowledgement = "The Graduate School of Oceanography generated this data 
> file with support from NSF (OCD-1060397). Please acknowledge the use of these 
> data with the following: {These data were acquired from University of Rhode 
> Island - Graduate School of Oceanography (URI-GSO) on [date] from 
> http://www.sstfronts.org.} See the license attribute for information 
> regarding use and re-distribution of these data." ;
> :license = "These data are openly available to the public.  Please 
> acknowledge the use of these data with the text given in the acknowledgement 
> attribute." ;
> :contributor_name = "Center for Ocean-Atmosphereic Prediction Studies 
> (COAPS), National Ocean Partnership Program (NOPP)" ;
> :contributor_role = "Generated original data using HYCOM model" ;
> :publisher_name = "SST Fronts" ;
> :publish
> --
> James Gallagher
> jgallagher at opendap.org
> 406.723.8663
> 
> 

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



Ticket Details
===================
Ticket ID: GVV-491226
Department: Support netCDF
Priority: Normal
Status: Closed