Hi Ros, This has prompted me to mention a CF compliance issue that I spotted last week in connection with the netCDF files we're producing for the CMIP5 project using the latest CMOR-2 library. When I validated one of these files against the latest online version of the CF-checker utility (using version CF-1.4 which is the value that CMOR assigns to the conventions attribute), the validation fails with the following error message: CHECKING NetCDF FILE: /tmp/22294.nc ===================== Using CF Checker Version 2.0.2 Using Standard Name Table Version 16 (2010-10-11T12:16:51Z) Using Area Type Table Version 1 (5 December 2008) [snip] ------------------ Checking variable: height ------------------ ERROR (4): Axis attribute is not allowed for auxillary coordinate variables. [snip] ERRORS detected: 1 WARNINGS given: 0 INFORMATION messages: 0 ======================
The relevant bits of CDL from the netCDF header of my test file are shown at the end of this message. In essence, it's objecting to the axis = "Z" attribute on the height scalar coordinate variable. For some reason I'd had it in my head that use of the 'axis' attribute was to be permitted for auxiliary/scalar coordinate variables as of CF-1.4. CF ticket 62 refers to the discussion (https://cf-pcmdi.llnl.gov/trac/ticket/62), though I can't now see specific mention of a CF version at which this proposed revision would apply. Perhaps I'm looking in the wrong place! I was wondering, therefore, if you were planning to retro-fit support for the axis attribute at version CF-1.4 ? (If not then we may have a wee bit of a problem, as there are now many thousands of CMIP5 netCDF files in circulation which are not strictly speaking CF compliant. Though I'm fairly confident that most netcdf apps will still read them okay.) Regards, Phil And here's the fragment of my netCDF header (with lots of CMOR attributes removed): dimensions: lat = 145 ; bnds = 2 ; lon = 192 ; time = UNLIMITED ; // (12 currently) variables: double height ; height:units = "m" ; height:positive = "up" ; height:long_name = "height" ; height:standard_name = "height" ; height:axis = "Z" ; *** THIS ATTRIBUTE IS THE CULPRIT *** double lat(lat) ; lat:bounds = "lat_bnds" ; lat:units = "degrees_north" ; lat:axis = "Y" ; lat:standard_name = "latitude" ; double lat_bnds(lat, bnds) ; double lon(lon) ; lon:bounds = "lon_bnds" ; lon:units = "degrees_east" ; lon:axis = "X" ; lon:standard_name = "longitude" ; double lon_bnds(lon, bnds) ; float tas(time, lat, lon) ; tas:standard_name = "air_temperature" ; tas:long_name = "Near-Surface Air Temperature" ; tas:comment = "near-surface (usually, 2 meter) air temperature." ; tas:units = "K" ; tas:cell_methods = "time: mean" ; tas:coordinates = "height" ; double time(time) ; time:bounds = "time_bnds" ; time:units = "days since 1859-12-01" ; time:calendar = "360_day" ; time:axis = "T" ; time:standard_name = "time" ; double time_bnds(time, bnds) ; // global attributes: :Conventions = "CF-1.4" ; :cmor_version = "2.5.0" ; ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Rosalyn Hatcher Sent: 24 February 2011 10:40 To: Brian Eaton Cc: aparna Radhakrishnan; [email protected]; Kyle Olivo; Doutriaux,Charles; Jonathan Gregory; Karl Taylor Subject: Re: [CF-metadata] CF Standards Hi All, I have recently made some changes to the checker (which I haven't released yet) that fix a few issues with the checks on presence of the unit attribute. Kyle - if you could send me the netcdf file header (ncdump -c) I'll run it through my development version of the checker and see if the issues raised on this thread have been fixed and if not will look at doing so. Regards, Ros. On 24/02/11 02:32, Brian Eaton wrote: Hi Karl, I agree with all your comments on this thread. In particular, the checker shouldn't complain that a, b, a_bnds, and b_bnds don't have units when it doesn't have any information that indicates they are dimensional quantities. As an aside though, I do think there would be value in having the CF checker be made to recognize when variables are part of the definition of a dimensionless vertical coordinate via the formula_terms attribute. In the example below, there are two variables called out by formula_terms, p0 and ps, which do need to have units in order for the formula to be evaluated correctly. The checker could make that check. Best, Brian
_______________________________________________ CF-metadata mailing list [email protected] http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
