|
|
|
|
Software Requirements for the NetCDF CF
Library The NetCDF CF Library supports the
creation of scientific data files conforming to the CF
conventions, using the netCDF API. This page lists the
software requirements for version 1.0 of the
library.
|
|
|
|
|
Important Note
|
|
These requirements represent a snapshot of our
understanding of the NetCDF CF library. They are
subject to change without notice. This document does
not represent a promise that the NetCDF CF Library
will meet these requirements, though that is our
ultimate goal.
Requirements for libcf are determined by the libcf
Requirements Committee.
Comments are welcome, and should be sent to the
libcf mailing list: libcf@unidata.ucar.edu
|
|
General Requirements
|
libcf allows manipulation of higher
order data objects, defined using the CF
conventions (plus suggested extensions). The intent
is to allow Earth science researchers to write
files in conformance with the CF metadata standards,
to promote inter-operability between scientific
groups and tools.
libcf layer is implemented on top of
the netCDF-3 API.
libcf reads and writes attributes
from and to the data file. If users change these
attributes externally without care, they can expect
problems.
libcf handles simple rectilinear,
nested, structured and unstructured grids. Where
current CF standards do not support these features,
proposed standards are used. Close contact with the
CF governance body will ensure that libcf
continues to represent the CF standard as it
evolves.
When recognizing attribute names,
libcf always does so in a case-insensitive manner
(except _FillValue), but always creates such
attributes in lower-case, following the lead of the
CF/Unidata documentation.
In the requirements below, when an
attribute is said to be "supported" we mean that it
may be set and read though the libcf
API. Attributes which are mentioned in the same
requirement will be set and read as a group.
|
|
Description of File Contents
|
libcf supports the appending of
"CF-1.0" to the Conventions global attribute,
and can scan for "CF-1.0" in an existing
file.
libcf supports the title and
history global attributes. Setting the
history causes a string to be appended,
including generation of CF-recommended
time stamp.
libcf supports the
institution, source, references,
and comment attributes, as global or variable
attributes.
|
|
Description of Variables
|
libcf supports the following
attributes for variables: _FillValue,
valid_min, valid_max, valid_range,
units, long_name,
standard_name.
libcf supports looking up the
standard name in a copy of the standard name table
distributed with libcf, and checking the
compatibility of the units.
libcf supports reading or appending
the ancillary_variables attribute.
libcf supports the flag_values
and flag_meanings attributes.
|
|
Coordinate Variables
|
libcf uses COARDS conventions to
identify the following special coordinate types:
latitude, longitude, vertical, and time.
The latitude, longitude, and time
dimensions always have a units
attribute.
libcf supports the
standard_name and formula_terms
attributes on coordinate variables. However, libcf
does not attempt to construct the formula indicated by
the formula_terms attribute.
libcf supports the axis
attribute on coordinate variables, which, when
present, will have one of these values: "X", "Y",
"Z", or "T". In the event that the units and
the axis don't agree, libcf will return an
error and throw up its hands in disgust.
libcf identifies the latitude with a
units value of degrees_north (but also accepts
degree_north, degree_N, degrees_N, degreeN and
degreesN. When writing, libcf adds the
standard_name (set to "latitude") and
axis (set to "Y").
libcf identifies the longitude with a
units value of degrees_east (but also accepts
degree_east, degree_E, degrees_E, degreeE and
degreesE, all case-insensitive). When writing,
libcf adds the standard_name (set to
"longitude") and axis (set to "X").
All coordinate variables must have a
units attribute.
libcf supports the positive
attribute to indicate the direction of the vertical
coordinate.
libcf recognizes the following values
for the units attribute as indicating a
vertical coordinate variable: bar, millibar, decibar,
atmosphere, atm, pascal, Pa, hPa, meter, metre, m,
kilometer, km. Other units listed in the file
udunits.dat that may under certain circumstances
reference vertical position such as units of density
or temperature. (Which ones?) (Plural forms are also
acceptable.)
libcf recognizes a time coordinate
variable by a units attribute with the value
since , where
is one of day, d, hour, hr, h, minute, min, second,
sec, and s, and is of the form
YYYY-MM-DD [HH:MM:SS.S [+|- HH[:MM]]].
libcf supports the calendar
attribute, which may be set to gregorian, standard,
proleptic_gregorian, noleap, 365_day, all_leap,
366_day, 360_day, julian, or none.
libcf supports the
months_lengths, leap_year,
leap_month attributes. If these attributes are
used the calendar can be any text
value.
libcf supports scalar coordinate
variables, either as a dimension of length one and
accompanying coordinate variable, or as a scalar
variable (and no dimension) which is listed in the
variable's coordinates attribute.
|
|
Coordinate Systems
|
libcf supports the coordinates
attribute, which is an unordered, space-separated
list of names of auxiliary coordinate variables.
libcf an NC_CHAR label variable which
contains labels that apply to a coordinate
variable. In this case the name of the label variable
will be listed in the coordinates attribute of
the variable that uses the labeled axis as one of
it's dimensions.
libcf also supports the region
attribute.
libcf also supports Common Data Model
Coordinate Systems.
|
|
Grid Mapping and Projections
|
libcf supports the
grid_mapping attribute. Setting this attribute
causes an NC_CHAR variable to be created in order to
hold the grid mapping attributes.
All grid_mapping variables have a
grid_mapping_name attribute. The presence of
other attributes is determined by the
grid_mapping_name, in accordance with appendix F of
the CF 1.0 conventions.
libcf supports the following grids:
albers_conical_equal_area, azimuthal_equidistant,
lambert_azimuthal_equal_area,
lambert_conformal_conic, polar_stereographic,
rotated_latitude_longitude, stereographic,
and transverse_mercator.
|
|
Nested Grids
|
libcf supports nested grids.
|
|
Unstructured Grids
|
libcf supports unstructured grids.
|
|
Observational Data
|
libcf supports observational data.
|
|
Distribution, Build, and Installation
|
Libcf is distributed in source and
binary form via Unidata's FTP and web sites.
Libcf can be installed with the usual
configure/make invocations, with the usual options
supported, including "make check", "make install",
"make distcheck", "make dist", "make clean", and
"make distclean". Configure options include
--disable-shared, --with-netcdf=, --prefix=. Shared
libraries are built on platforms that support
them.
Libcf is a C library and one or more
sets of fortran wrapper libraries. (Each fortran
compiler requires its own set of wrapper
functions). Programs which use libcf must link to a
netCDF 3.x library, plus the libcf library, plus a
fortran wrapper library, if they are using
fortran.
|
|
Documentation
|
A libcf website serves as the central
repository for libcf documentation.
Libcf C and Fortran APIs are fully
documentated, and the documentation is available from
the libcf website in the following formats: pdf,
HTML, ASCII, postscript.
The documentation is included with the
libcf distribution in the following formats: pdf,
HTML, ASCII, postscript.
|
|
Testing
|
libcf can be tested with "make
check", which will run automatic tests covering all
API functions.
libcf is tested on Linux, SunOS, AIX,
HP-UX, Irix, and Macintosh OS/X.
libcf is tested with the following
fortran compilers: gfortran, g95, SunOS f90, Portland
Group, Lahey.
|
|
|
|
|