[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #VXO-686729]: NcML documentation error



Hi Don:

Apologies for the errors in the docs, i will fix those.

The proper forms should be:

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
  <attribute name="valid_range" type="int" value="1 2" />
  <attribute name="more_valid_range" type="int" >1 2</attribute>
</netcdf>

Amazingly, the second form appears never to be implemented (!)
Anyway, I will fix that in the next version. Meanwhile, you are stuck with the 
first form.

John

> Hi-
> 
> I was trying to figure out how to add a valid_range attribute to a
> variable using NcML.  The documentation at:
> 
> http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/AnnotatedSchema4.html
> 
> appears to be in error.  Under the attribute Element section, it says
> that the following form is allowed:
> 
> <attribute name="valid_range" type="float">-99.0 110</values>
> 
> which is not valid xml (no closing attribute tag).  The only variant I
> could get to work was:
> 
> <attribute name="valid_range" type="float" value="-1E7 1E7"/>
> 
> These did not:
> 
> <attribute name="valid_range" type="float">1E7 1E7</attribute>
> 
> nor
> 
> <attribute name="valid_range" type="float"><value>-1E7
> 1E7</value></attribute>
> 
> nor
> 
> <attribute name="valid_range" type="float"><values>-1E7
> 1E7</values></attribute>
> 
> erring out with:
> 
> NcML had fatal errors:NcML new Attribute Exception:
> No value specified att=valid_range in=   float h(time=93504,
> lev=42, lat=144, lon=288);
> :_CoordinateAxes = "time lev lat lon ";
> :_FillValue = 9.9999999E14f; // float
> :missing_value = 9.9999999E14f; // float
> :long_name = "geopotential height ";
> :units = "m";
> 
> Also, in item #3 in the list, it says:
> 
> "Values can also be specified in the elemnt content."
> 
> that should be:
> 
> "Values can also be specified in the element content."
> 
> (add an e in element).  But I was unable to make that work.  If that is
> legal, I would appreciate a working example.
> 
> Thanks.
> 
> Don
> --
> Don Murray
> NOAA/ESRL/PSD and CIRES
> 303-497-3596
> http://www.esrl.noaa.gov/psd/people/don.murray/
> 
> 

Ticket Details
===================
Ticket ID: VXO-686729
Department: Support netCDF Java
Priority: Normal
Status: Open