Attribute Convention for Data Discovery Precedence

From Earth Science Information Partners (ESIP)
Revision as of 23:41, February 6, 2014 by Graybeal (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Determining an Order of Precedence

There can be conflicting information available from different sources within the THREDDS and CDM data models. The diagram below seeks to determine an order of precedence for what is recorded in the ncISO metadata when those attributes conflict. Metadataprecedence.png

A key part of this discussion is the ability to see identify potentially conflicting metdata between the differenc sources within THREDDS and NetCDF. Below we propose using groups to identify in the NCML what sources contain the relevant metadata that will be used in the ISO translation.

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2 ../XSD/ncml-2.2.xsd"
 xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
 location="http://localhost:8080/thredds/dodsC/test/crm_v1.nc">
    
    <!-- Metadata from the netCDF or NCML file global attributes -->    
    <attribute name="Conventions" value="CF-1.4" />
    <attribute name="title" value="crm_v1.grd" />
    <attribute name="history" value="xyz2grd -R-80/-64/40/48 -I3c -Gcrm_v1.grd" />
    <attribute name="GMT_version" value="4.5.1 [64-bit]" />
    <attribute name="creator_name" value="David Neufeld"/>
    <attribute name="creator_email" value="David.Neufeld@noaa.gov"/>    
    <attribute name="geospatial_lon_units" value="degrees_east" />
    <attribute name="geospatial_lat_units" value="degrees_north" />
    <attribute name="geospatial_lon_min" type="float" value="-80.0" />
    <attribute name="geospatial_lon_max" type="float" value="-64.0" />    
    <attribute name="geospatial_lat_max" type="float" value="48.0" />
    <attribute name="geospatial_lat_min" type="float" value="40.0" />
    <attribute name="geospatial_lon_resolution" type="double" value="8.33E-4" />
    <attribute name="geospatial_lat_resolution" type="double" value="8.33E-4" />
    
    <!-- Metadata calculated from the netCDF file axes based on CF conventions -->
    <group name="CFMetadata">
      <attribute name="geospatial_lon_min" value="-80.0" type="float" />
      <attribute name="geospatial_lat_min" value="40.0" type="float" />
      <attribute name="geospatial_lon_max" value="-64.0" type="float" />
      <attribute name="geospatial_lat_max" value="48.0" type="float" />
      <attribute name="geospatial_lon_units" value="degrees_east" />    
      <attribute name="geospatial_lat_units" value="degrees_north" />
      <attribute name="geospatial_lon_resolution" value="8.332899328159992E-4" />
      <attribute name="geospatial_lat_resolution" value="8.332465368190813E-4" />
    </group>
    
    <!-- Metadata from the THREDDS catalog dataset -->
    <group name="THREDDSMetadata">
        <attribute name="id" value="crm_v1" />
        <attribute name="creator_name" value="David Neufeld"/>
        <attribute name="creator_email" value="David.Neufeld@noaa.gov"/>    
        <attribute name="data_distribution" value="http://localhost:8080/thredds/dodsC/test/crm_v1.nc" />
        <attribute name="wms_service" value="http://localhost:8080//thredds/wms/crm/crm_vol9.nc" />
        <attribute name="wcs_service" value="http://localhost:8080//thredds/wcs/crm/crm_vol9.nc" />
    </group>    
        
    <!-- Metadata from the ncISO service -->
    <group name="NCISOMetadata">
      <attribute name="metadata_creation" value="2011-04-19" />
    </group>
    
    <dimension name="x" length="19201" />
    <dimension name="y" length="9601" />
    
    <variable name="z" shape="y x" type="float">
        <attribute name="long_name" value="z" />
        
        <attribute name="_FillValue" type="float" value="NaN" />
        <attribute name="actual_range" type="double" value="-2754.39990234375 1903.0" />
        <attribute name="units" value="meters" />
        <attribute name="positive" value="up" />
    </variable>
    <variable name="x" shape="x" type="double">
        <attribute name="long_name" value="x" />
        <attribute name="actual_range" type="double" value="-80.0 -64.0" />
        <attribute name="units" value="degrees_east" />
        
        <attribute name="_CoordinateAxisType" value="Lon" />
    </variable>
    <variable name="y" shape="y" type="double">
        <attribute name="long_name" value="y" />
        <attribute name="actual_range" type="double" value="40.0 48.0" />
        <attribute name="units" value="degrees_north" />
        <attribute name="_CoordinateAxisType" value="Lat" />
    </variable>
</netcdf>