[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #SYI-729713]: Problem modifying readgeneral.F to read a data set
- Subject: [netCDF #SYI-729713]: Problem modifying readgeneral.F to read a data set
- Date: Tue, 20 Dec 2011 13:04:28 -0700
Hi Steve,
> I am trying to read a data set in netcdf on a SUN with Fortran.
> Finally got netcdf and udunits installed and got readgeneral.F to
> compile.
Sorry, I don't know what readgeneral.F is, but it's not part of our
supported netCDF software.
> Then modified readgeneral.F to read the new data set by doing ncdump -h
> to get the info needed.
> >
> >
> > when I run it I get this error message:
> >
> > ncattinq: ncid 65536; varid 2; attname "units": NetCDF: Attribute not
> > found
It sounds like readgeneral.F expects each variable to have a "units"
attribute, as expected by many netCDF programs that require data compliant
with the CF conventions, or other similar metadata standards.
This is not a netCDF error, but a symptom of a file with missing metadata.
--Russ
> > And here is the ncdump of the data set
> >
> >
> > $ ncdump -h pdsisc.monthly.maps.1850-2010.fawc=1.r2.5x2.5.ipe=2.nc
> > netcdf pdsisc.monthly.maps.1850-2010.fawc\=1.r2.5x2.5.ipe\=2 {
> > dimensions:
> > time = UNLIMITED ; // (1932 currently)
> > lat = 55 ;
> > lon = 144 ;
> > variables:
> > float lat(lat) ;
> > lat:long_name = "latitute in degrees, negative for
> > the Southern Hemisphere" ;
> > float lon(lon) ;
> > lon:long_name = "longitude in degrees, negative for
> > the Western Hemisphere" ;
> > float time(time) ;
> >
> ...
>
> > time:long_name = "time in years for mid-point of the
> > month" ;
> > time:_FillValue = -99999.f ;
> > float sc_PDSI_pm(time, lat, lon) ;
> > sc_PDSI_pm:scale = 1.f ;
> > sc_PDSI_pm:long_name = "Monthly Self-calibrated
> > Palmer Drought Severity Index using Penman-Monteith PE" ;
> > sc_PDSI_pm:missing_value = -99999.f ;
> > sc_PDSI_pm:_FillValue = -99999.f ;
> >
> > // global attributes:
> > :creation_time = "Wed Oct 26 10:25:40 MDT 2011" ;
> > :Conventions = "NCAR" ;
> > :source_file = "tmp2/pdsisc.monthly.maps.
> > 1850-2010.fawc=1.r2.5x2.5.ipe=2" ;
> > :description = "\n",
> > "Monthly Self-calibrated Palmer Drought
> > Severity Index (scPDSI) \n",
> > "calculated using observed surface air
> > temperature (HadCRUT3 from \n",
> > "http://www.cru.uea.ac.uk/cru/data/
> > temperature/ ) and \n",
> > "precipitation (from Dai et al. (1997,
> > J.Clim: for 1870-1947) + \n",
> > "Chen et al. (2002, J. Hydromet.: for
> > 1948-1978 + GPCP v2.2 for \n",
> > "1979-present. The Dai and Chen P data were
> > adjusted to have the \n",
> > "same mean as the GPCP data over the
> > 1979-1996 period). \n",
> > "Calibration (or reference) period is
> > 1950-1979. Documention: \n",
> > "Dai, A., 2011a: Characteristics and trends
> > in various forms of the \n",
> > "Palmer Drought Severity Index (PDSI) during
> > 1900-2008. J. Geophys. \n",
> > "Res., 116, D12115, doi:
> > 10.1029/2010JD015541.\t\t\t \n",
> > "Dai, A., K. E. Trenberth, and T. Qian, 2004:
> > A global data set of \n",
> > "Palmer Drought Severity Index for 1870-2002:
> > Relationship with soil\n",
> > "moisture and effects of surface warming. J.
> > Hydrometeorology, 5, \n",
> > "1117-1130. Data source: Dr. A. Dai/NCAR (address@hidden
> > ). See \n",
> > "http://www.cgd.ucar.edu/cas/catalog/climind/pdsi.html
> > for updates. \n",
> > "WARNING: PDSI and scPDSI over the higher
> > latitudes (e.g., >50deg.) \n",
> > "may not be a good proxy of soil moisutre
> > content. Also, PDSI and \n",
> > "scPDSI are highly autocorrelated indices not
> > good at resolving \n",
> > "sub-seasonal variations. Please use with
> > caution! " ;
>
>
>
> Thanks,
> Steve
>
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: SYI-729713
Department: Support netCDF
Priority: Normal
Status: Closed