[ncl-talk] NetCDF Conventions

Dennis Shea shea at ucar.edu
Tue Sep 9 08:27:23 MDT 2014


As you know, typically for climate and forecast related files, the Climate
and Forecast convention is followed.

---
http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/cf-conventions-multi.html
---
[0] To my knowledge, there is no "higher standard"    ... except me!

[1] Though not CF specified, 'time' should  be double".  Time should always
be as precise as possible.
      Though not required, I suggest the calendar attribute be added.

        double time(time) ;
                time:long_name = "reference time" ;
                time:units = "hours since 1800-01-01 00:00:00" ;    < *any*
reference time
                time:calendar = "gregorian" ;
                time:bounds = "time_bnds" ;    <=== if averaging involved  .

     In addition, I suggest the inclusion of  human readable  auxiliary
time variables.
     This makes 'time' more friendly to people who do not like dealing with
those* nonsensical *time values.
     The CESM netCDF uses:

        int date(time) ;
                date:long_name = "current date (YYYYMMDD)" ;

        int datesec(time) ;
                datesec:long_name = "current seconds of current date" ;   ;
hours,minutes ... can be derived from this

   Note: there is no 'units' attribute associated with these auxiliary time
variables because the units would not be recognized by udunits

[2] time,lev,lat,lon ..... purely arbitrary .... they are short

[3] My personal rule, do not use _FillValue=0.0
     Always ... _FillValue should be the same type as the variable with
which it is associated.
     If the variable is type 'short', the _FillValue should be type short.

     If _FillValue is present, also include the missing_value attribute.
This allows assorted applications which recognize
     different conventions.


http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/ch02s05.html#missing-data

[4] Always include the convention being followed in the file attributes.

       Conventions = "CF-1.?"

[5]
https://climatedataguide.ucar.edu/climate-data-tools-and-analysis/netcdf-overview

      There is a link to a CF convention checker. It works well but can
take time.
      Maybe NCDC could get it and download on their machines.

HTH
D


On Tue, Sep 9, 2014 at 7:29 AM, Carl Schreck <cjschrec at ncsu.edu> wrote:

> Apologies for a slightly off-topic question, but I want to draw on the
> expertise on this list.
>
> I've noticed that many of the netCDF datasets I download, esp. those from
> ESRL, have similar attributes that go beyond just CF-compliance. A few
> examples:
>
> - time is always a double instead of a float
> - time is usually in units of days or hours since 1800
> - _FillValue isn't zero
> - The coordinate arrays are named time, level, lat, lon.
>
> Is there a higher standard that dictates these practices? I ask here
> because NCL seems to play a little nicer with these files (esp. time as a
> double). My goal is to provide feedback to the data producers here at NCDC
> so that they can produce netCDF files that are as easily accessible as
> possible.
>
>     Thanks!
>     Carl
>
> --
>
> <http://www.cicsnc.org/>
> <http://www.researcherid.com/rid/B-8711-2011>[image:
> http://www.researcherid.com/rid/B-8711-2011]
> <http://www.researcherid.com/rid/B-8711-2011>
> *Carl J. Schreck III, PhD*
> *Research Associate*
> Cooperative Institute for Climate and Satellites NC <http://cicsnc.org/>
> North Carolina State University <http://ncsu.edu/>
> NOAA's National Climatic Data Center <http://ncdc.noaa.gov/>
> 151 Patton Ave, Asheville, NC 28801
> e: cjschrec at ncsu.edu
> o: +1 828 257 3140
> CycloneCenter.org: Help analyze tropical cyclones
> <http://cyclonecenter.org/>
> monitor.cicsnc.org/mjo: See recent MJO diagnostics
> <http://monitor.cicsnc.org/mjo/>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140909/5bebd162/attachment.html 


More information about the ncl-talk mailing list