The files listed below illustrate different forms in which netCDF metadata can be expressed. These are for a highly simplified netCDF that conforms to the CF (Climate and Forecast) conventions. All but the last item in the list are ascii text representations of the netCDF metadata and should be viewable in most recent browsers. The final item in the list is the actual binary form of the netCDF file. It's available for download but will not be viewable in a browser.
To get a sense of the differences among the different representations of netCDF metadata, the sections below have excerpts from the different forms showin in one place how each form represents time-coordinate, a CF conforming latitude coordinate and one of the range (dependent) variables. Because the GML representation is so explicite regarding domain (independent) coordinate variable specifications, it tends to be quite verbose in some instances. -- compared to the forms in which some of the information remains implicit.
netCDF CDL form:
variables: // variable types, names, shapes, attributes
short time(time);
time:standard_name = "time";
time:units = "hours since 1996-1-1";ncML form:
<variable name="time" shape="time" type="short">
<attribute name="standard_name" type="String" value="time" />
<attribute name="units" type="String" value="hours since 1996-1-1" /></variable>
ncML with explicit coordinate system extensions:
<coordinateAxis name="time" shape="time" type="short" units="hours since 1996-1-1" axisType="Time">
<attribute name="standard_name" type="String" value="time" />
<attribute name="units" type="String" value="hours since 1996-1-1" />
<attribute name="_CoordinateAxisType" type="String" value="Time" /></coordinateAxis>
ncML-GML form (temporal Coordinate Reference System (CRS):
<gml:TemporalCRS gml:id="customTemporalCRS">
<gml:srsName>hours since 1996-1-1</gml:srsName>
<gml:usesTemporalCS>
<gml:TemporalCS gml:id="NetCDF-CF_standard">
<gml:csName codeSpace="NetCDF-CF_v1.0">standard/gregorian calendar</gml:csName>
<gml:remarks>Mixed Gregorian/Julian calendar as defined by Udunits: Gregorian since 15 oct. 1582, Julian before</gml:remarks><gml:usesAxis>
<gml:CoordinateSystemAxis gml:id="time" gml:uom="http://www.unidata.ucar.edu/software/udunits/udunits.txt#hours">
<gml:name>Time</gml:name>
<gml:axisID><gml:name codeSpace="NcML-CS">time</gml:name>
</gml:axisID>
<gml:axisAbbrev>Time</gml:axisAbbrev>
<gml:axisDirection>up</gml:axisDirection></gml:CoordinateSystemAxis>
</gml:usesAxis>
</gml:TemporalCS>
</gml:usesTemporalCS>
<gml:usesTemporalDatum>
<gml:TemporalDatum gml:id="customTemporalOrigin">
<gml:datumName>January 1, 1996</gml:datumName>
<gml:origin>1996-01-01T00:00:00Z</gml:origin></gml:TemporalDatum>
</gml:usesTemporalDatum>
</gml:TemporalCRS>
netCDF CDL form:
int lat(lat), lon(lon), level(level);
lat:units = "degrees_north";
lat:standard_name = "latitude";ncML form:
<variable name="lat" shape="lat" type="int">
<attribute name="units" type="String" value="degrees_north" />
<attribute name="standard_name" type="String" value="latitude" /></variable>
ncML with explicit coordinate system extensions:
<coordinateAxis name="lat" shape="lat" type="int" units="degrees_north" axisType="Lat">
<attribute name="units" type="String" value="degrees_north" />
<attribute name="standard_name" type="String" value="latitude" />
<attribute name="_CoordinateAxisType" type="String" value="Lat" /></coordinateAxis>
ncML-GML form:
<ncco:spatialCRS>
<gml:GeographicCRS gml:id="EPSG4326">
<gml:srsName codeSpace="EPSG">WGS 84</gml:srsName>
<gml:srsID>
<gml:name codeSpace="EPSG">4326</gml:name>
<gml:version>6.7</gml:version>
</gml:srsID>
<gml:remarks>CRS kind: geographic 2D</gml:remarks>
<gml:validArea>
<gml:description>World</gml:description>
</gml:validArea>
<gml:scope>GPS satellite navigation and NATO military surveying</gml:scope>
<gml:usesEllipsoidalCS>
<gml:EllipsoidalCS gml:id="EPSG6422">
<gml:csName>Ellipsoidal 2D CS</gml:csName>
<gml:remarks>Axis order is by element order</gml:remarks>
<gml:usesAxis>
<gml:CoordinateSystemAxis gml:id="EPSG9901" gml:uom="urn:x-epsg:v0.1:uom:degree">
<gml:name>Geodetic latitude</gml:name>
<gml:axisID><gml:name codeSpace="NcML-CS">lat</gml:name>
</gml:axisID>
<gml:axisAbbrev>Lat</gml:axisAbbrev>
<gml:axisDirection>north</gml:axisDirection></gml:CoordinateSystemAxis>
</gml:usesAxis>
netCDF CDL form:
float temp(time, level, lat, lon);
:long_name = "temperature";
:standard_name = "air_temperature";
:units = "celsius";ncML form:
<variable name="temp" shape="time level lat lon" type="float">
<attribute name="long_name" type="String" value="temperature" />
<attribute name="standard_name" type="String" value="air_temperature" />
<attribute name="units" type="String" value="celsius" /></variable>
ncML with explicit coordinate system extensions:
<variable name="temp" shape="time level lat lon" type="float" coordinateSystems="time-level-lat-lon">
<attribute name="long_name" type="String" value="temperature" />
<attribute name="standard_name" type="String" value="air_temperature" />
<attribute name="units" type="String" value="celsius" /></variable>
ncML-GML form (given for relative humidity rather than temperature, includes data):
<variable coordinateSystem="time-lat-lon" name="rh" shape="time lat lon" type="float">
<attribute name="long_name" type="string" value="relative humidity"/>
<attribute name="valid_range" type="double" value="0.0 1.0"/></variable>
<ncco:scalarRangeSet>
<ncco:netcdfVariableRef referenceName="rh"/>
<ncco:asciiData><gml:QuantityList uom="http://www.unidata.ucar.edu/software/udunits/udunits.txt#deg_C">0.5 0.2 0.4 0.2 0.3 0.2 0.4 0.5 0.6 0.7 0.1 0.3 0.1 0.1 0.1 0.1 0.5 0.7 0.8 0.8 0.1 0.2 0.2 0.2 0.2 0.5 0.7 0.8 0.9 0.9 0.1 0.2 0.3 0.3 0.3 0.3 0.7 0.8 0.9 0.9 0.0 0.1 0.2 0.4 0.4 0.4 0.4 0.7 0.9 0.9 </gml:QuantityList>
</ncco:asciiData>
</ncco:scalarRangeSet>