[thredds] Overriding attributes in new-style FMRC aggregations

Hi,

I have an FMRC dataset, whose variables don't follow the UDUNITS spec,
so I'd like to use NcML (or something) to override the relevant
attributes.  Looking at the instructions at the bottom of
http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/reference/colle
ctions/FeatureCollections.html, it seems that I have to use the
<protoDataset> tag.  Based on these instructions, I tried the following:

   <featureCollection name="POLCOMS-Irish-Sea" featureType="FMRC"
path="NCOF/POLCOMS/IRISH_SEA">

    <metadata inherited="true">
      <serviceName>all</serviceName>
      <dataType>Grid</dataType>
    </metadata>
    <collection
spec="/path/to/POLCOMS_IRISH/polcoms_irish_hourly_#yyyyMMdd#.nc$"/>
  
      <protoDataset>
      <netcdf
xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
      <variable name="sst">
       <attribute name="units" value="celsius"/>
      </variable>
     </netcdf>
   </protoDataset>

  </featureCollection>

But this gave me a NullPointerException, recorded in catalogInit.log:

java.lang.NullPointerException: Name is null
        at java.lang.Enum.valueOf(Enum.java:195)
        at
thredds.inventory.FeatureCollectionConfig$ProtoChoice.valueOf(FeatureCol
lectionConfig.java:47)
        at
thredds.inventory.FeatureCollectionConfig$ProtoConfig.<init>(FeatureColl
ectionConfig.java:140)
        at
thredds.catalog.parser.jdom.InvCatalogFactory10.readFeatureCollection(In
vCatalogFactory10.java:378)
        at
thredds.catalog.parser.jdom.InvCatalogFactory10.readCatalog(InvCatalogFa
ctory10.java:199)
        at
thredds.catalog.parser.jdom.InvCatalogFactory10.parseXML(InvCatalogFacto
ry10.java:129)
        at
thredds.catalog.InvCatalogFactory.readXML(InvCatalogFactory.java:450)
        at
thredds.catalog.InvCatalogFactory.readXML(InvCatalogFactory.java:420)
        at
thredds.servlet.DataRootHandler.readCatalog(DataRootHandler.java:510)
        at
thredds.servlet.DataRootHandler.initCatalog(DataRootHandler.java:441)
        at
thredds.servlet.DataRootHandler.initFollowCatrefs(DataRootHandler.java:6
32)
        at
thredds.servlet.DataRootHandler.initCatalog(DataRootHandler.java:475)
        at
thredds.servlet.DataRootHandler.initCatalog(DataRootHandler.java:413)
        at
thredds.servlet.DataRootHandler.initCatalogs(DataRootHandler.java:391)
        at
thredds.servlet.DataRootHandler.initCatalogs(DataRootHandler.java:309)
        at
thredds.servlet.DataRootHandler.init(DataRootHandler.java:286)


I read the same web page through and noticed that the "choice" attribute
on the <protoDataset> tag is compulsory so I modified my catalog
accordingly:

<protoDataset choice="Penultimate">

This time the NullPointerException didn't appear, but the anticipated
change to the units attribute of the variable in question didn't happen
either - the units were unchanged.  Looking in catalogInit.log, I see
the following warning:

*** XML parser error (28:19)= cvc-complex-type.2.1: Element
'protoDataset' must have no character or element information item
[children], because the type's content type is empty.

(I see the same error with choice="First".)  Have I got the XML
specification of the protoDataset wrong?


Thanks,
Jon


--
Dr Jon Blower
Technical Director, Reading e-Science Centre
Environmental Systems Science Centre
University of Reading
Harry Pitt Building, 3 Earley Gate
Reading RG6 6AL. UK
Tel: +44 (0)118 378 5213
Fax: +44 (0)118 378 6413
j.d.blower@xxxxxxxxxxxxx
http://www.nerc-essc.ac.uk/People/Staff/Blower_J.htm




  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: