netCDF-LD

netCDF-LD is an approach for constructing Linked Data descriptions using the metadata and structures found in netCDF files. Linked Data is a method of publishing structured data on the web so that it can be interlinked and become more useful through semantic queries. It uses the W3 Resource Description Framework (RDF) standard to express the information and relationships.

netCDF-LD enhances netCDF metadata, enabling information found in netCDF files to be linked with published conventions and controlled vocabularies used to express the content.

View on Github repo Examples

Examples

CDL file: examples/avhrr-only-v2.19810901_a.txt

netcdf avhrr-only-v2.19810901_a {
dimensions:
	time = 1 ;
	zlev = 1 ;
	lat = 720 ;
	lon = 1440 ;
variables:
	float time(time) ;
		time:long_name = "Center time of the day" ;
		time:units = "days since 1978-01-01 00:00:00" ;
		time:standard_name = "time" ;
		time:axis = "T" ;
		time:calendar = "gregorian" ;
	float zlev(zlev) ;
		zlev:long_name = "Sea surface height" ;
		zlev:units = "meters" ;
		zlev:actual_range = "0, 0" ;
		zlev:standard_name = "height" ;
		zlev:axis = "Z" ;
	float lat(lat) ;
		lat:long_name = "Latitude" ;
		lat:units = "degrees_north" ;
		lat:grids = "Uniform grid from -89.875 to 89.875 by 0.25" ;
		lat:standard_name = "latitude" ;
		lat:axis = "Y" ;
	float lon(lon) ;
		lon:long_name = "Longitude" ;
		lon:units = "degrees_east" ;
		lon:grids = "Uniform grid from 0.125 to 359.875 by 0.25" ;
		lon:standard_name = "longitude" ;
		lon:axis = "X" ;
	short sst(time, zlev, lat, lon) ;
		sst:long_name = "Daily sea surface temperature" ;
		sst:units = "degrees_C" ;
		sst:_FillValue = -999s ;
		sst:add_offset = 0.f ;
		sst:scale_factor = 0.01f ;
		sst:valid_min = -300s ;
		sst:valid_max = 4500s ;
		sst:standard_name = "sea_surface_temperature" ;
	short anom(time, zlev, lat, lon) ;
		anom:long_name = "Daily sea surface temperature anomalies" ;
		anom:units = "degrees C" ;
		anom:_FillValue = -999s ;
		anom:add_offset = 0.f ;
		anom:scale_factor = 0.01f ;
		anom:valid_min = -1200s ;
		anom:valid_max = 1200s ;
	short err(time, zlev, lat, lon) ;
		err:long_name = "Estimated error standard deviation of analysed_sst" ;
		err:units = "degrees C" ;
		err:_FillValue = -999s ;
		err:add_offset = 0.f ;
		err:scale_factor = 0.01f ;
		err:valid_min = 0s ;
		err:valid_max = 1000s ;
	short ice(time, zlev, lat, lon) ;
		ice:long_name = "Sea ice concentration" ;
		ice:units = "percentage" ;
		ice:_FillValue = -999s ;
		ice:add_offset = 0.f ;
		ice:scale_factor = 0.01f ;
		ice:valid_min = 0s ;
		ice:valid_max = 100s ;

// global attributes:
		:Conventions = "CF-1.0" ;
		:title = "Daily-OI-V2, final, Data (Ship, Buoy, AVHRR, GSFC-ice)" ;
		:History = "Version 2.0" ;
		:creation_date = "2011-05-04" ;
		:Source = "NOAA/National Climatic Data Center" ;
		:Contact = "Dick Reynolds, email: Richard.W.Reynolds@noaa.gov & Chunying Liu, email: Chunying.liu@noaa.gov" ;
}

Rendered hotlinks from ncld-dump tool

ncLD HTML file: examples/avhrr-only-v2.19810901_a.html


netcdf avhrr-only-v2.19810901_a.nc {

}

RDF encoding (output of nc2rdf)

@prefix bald: <http://binary-array-ld.net/latest/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix this: <file:///tmp/tmpyt4n_hzw.nc/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<file:///tmp/tmpyt4n_hzw.nc> a bald:Container ;
    this:Contact "Dick Reynolds, email: Richard.W.Reynolds@noaa.gov & Chunying Liu, email: Chunying.liu@noaa.gov" ;
    this:Conventions "CF-1.0" ;
    this:History "Version 2.0" ;
    this:Source "NOAA/National Climatic Data Center" ;
    this:creation_date "2011-05-04" ;
    this:title "Daily-OI-V2, final, Data (Ship, Buoy, AVHRR, GSFC-ice)" ;
    bald:contains this:anom,
        this:anom_lat_ref,
        this:anom_time_ref,
        this:anom_zlev_ref,
        this:err,
        this:err_lat_ref,
        this:err_time_ref,
        this:err_zlev_ref,
        this:ice,
        this:ice_lat_ref,
        this:ice_time_ref,
        this:ice_zlev_ref,
        this:lat,
        this:lon,
        this:sst,
        this:sst_lat_ref,
        this:sst_time_ref,
        this:sst_zlev_ref,
        this:time,
        this:zlev .

this:anom a bald:Array ;
    this:_FillValue "-999" ;
    this:add_offset "0.0" ;
    this:long_name "Daily sea surface temperature anomalies" ;
    this:scale_factor "0.01" ;
    this:units "degrees C" ;
    this:valid_max "1200" ;
    this:valid_min "-1200" ;
    bald:references this:anom_lat_ref,
        this:anom_time_ref,
        this:anom_zlev_ref,
        this:lon ;
    bald:shape "(1, 1, 720, 1440)" .

this:err a bald:Array ;
    this:_FillValue "-999" ;
    this:add_offset "0.0" ;
    this:long_name "Estimated error standard deviation of analysed_sst" ;
    this:scale_factor "0.01" ;
    this:units "degrees C" ;
    this:valid_max "1000" ;
    this:valid_min "0" ;
    bald:references this:err_lat_ref,
        this:err_time_ref,
        this:err_zlev_ref,
        this:lon ;
    bald:shape "(1, 1, 720, 1440)" .

this:ice a bald:Array ;
    this:_FillValue "-999" ;
    this:add_offset "0.0" ;
    this:long_name "Sea ice concentration" ;
    this:scale_factor "0.01" ;
    this:units "percentage" ;
    this:valid_max "100" ;
    this:valid_min "0" ;
    bald:references this:ice_lat_ref,
        this:ice_time_ref,
        this:ice_zlev_ref,
        this:lon ;
    bald:shape "(1, 1, 720, 1440)" .

this:sst a bald:Array ;
    this:_FillValue "-999" ;
    this:add_offset "0.0" ;
    this:long_name "Daily sea surface temperature" ;
    this:scale_factor "0.01" ;
    this:standard_name "sea_surface_temperature" ;
    this:units "degrees_C" ;
    this:valid_max "4500" ;
    this:valid_min "-300" ;
    bald:references this:lon,
        this:sst_lat_ref,
        this:sst_time_ref,
        this:sst_zlev_ref ;
    bald:shape "(1, 1, 720, 1440)" .

this:anom_lat_ref a bald:Reference,
        bald:Subject ;
    bald:array this:lat ;
    bald:childBroadcast "(1, 1, 720, 1)" .

this:anom_time_ref a bald:Reference,
        bald:Subject ;
    bald:array this:time ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:anom_zlev_ref a bald:Reference,
        bald:Subject ;
    bald:array this:zlev ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:err_lat_ref a bald:Reference,
        bald:Subject ;
    bald:array this:lat ;
    bald:childBroadcast "(1, 1, 720, 1)" .

this:err_time_ref a bald:Reference,
        bald:Subject ;
    bald:array this:time ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:err_zlev_ref a bald:Reference,
        bald:Subject ;
    bald:array this:zlev ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:ice_lat_ref a bald:Reference,
        bald:Subject ;
    bald:array this:lat ;
    bald:childBroadcast "(1, 1, 720, 1)" .

this:ice_time_ref a bald:Reference,
        bald:Subject ;
    bald:array this:time ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:ice_zlev_ref a bald:Reference,
        bald:Subject ;
    bald:array this:zlev ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:sst_lat_ref a bald:Reference,
        bald:Subject ;
    bald:array this:lat ;
    bald:childBroadcast "(1, 1, 720, 1)" .

this:sst_time_ref a bald:Reference,
        bald:Subject ;
    bald:array this:time ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:sst_zlev_ref a bald:Reference,
        bald:Subject ;
    bald:array this:zlev ;
    bald:childBroadcast "(1, 1, 1, 1)" .

this:lat a bald:Array,
        bald:Reference ;
    this:axis "Y" ;
    this:grids "Uniform grid from -89.875 to 89.875 by 0.25" ;
    this:long_name "Latitude" ;
    this:standard_name "latitude" ;
    this:units "degrees_north" ;
    bald:array this:lat ;
    bald:first_value 9.969209968386869e+36 ;
    bald:last_value 9.969209968386869e+36 ;
    bald:shape "(720,)" .

this:lon a bald:Array,
        bald:Reference ;
    this:axis "X" ;
    this:grids "Uniform grid from 0.125 to 359.875 by 0.25" ;
    this:long_name "Longitude" ;
    this:standard_name "longitude" ;
    this:units "degrees_east" ;
    bald:array this:lon ;
    bald:first_value 9.969209968386869e+36 ;
    bald:last_value 9.969209968386869e+36 ;
    bald:shape "(1440,)" .

this:zlev a bald:Array,
        bald:Reference ;
    this:actual_range "0, 0" ;
    this:axis "Z" ;
    this:long_name "Sea surface height" ;
    this:standard_name "height" ;
    this:units "meters" ;
    bald:array this:zlev ;
    bald:first_value 9.969209968386869e+36 ;
    bald:shape "(1,)" .

this:time a bald:Array,
        bald:Reference ;
    this:axis "T" ;
    this:calendar "gregorian" ;
    this:long_name "Center time of the day" ;
    this:standard_name this:time ;
    this:units "days since 1978-01-01 00:00:00" ;
    bald:array this:time ;
    bald:first_value 9.969209968386869e+36 ;
    bald:shape "(1,)" .

JSON-LD encoding (draft status)

{
  "@context": {
    "dc": "http://purl.org/dc/elements/1.1/",
    "ex": "http://example.org/vocab#",
    "xsd": "http://www.w3.org/2001/XMLSchema#",
    "ncld": "http://binary-array-ld.net/latest/",
    "cf": "http://cf-conventions.org/def/1.6.0/",
    "acdd": "http://www.unidata.ucar.edu/netcdf/def/acdd/1.0/"
  },
  "@graph": [
    {
      "@type": "ncld:Container",
      "ncld:contains": [
        {
          "@id": "_:sst"
        },
        {
          "@id": "_:anom"
        },
        {
          "@id": "_:err"
        },
        {
          "@id": "_:ice"
        }
      ],
      "acdd:Conventions": "CF-1.0",
      "acdd:title": "Daily-OI-V2, final, Data (Ship, Buoy, AVHRR, GSFC-ice)"
    },
    {
      "@id": "_:sst",
      "@type": "ncld:Array",
      "cf:long_name": "Daily sea surface temperature",
      "cf:standard_name": {
        "@id": "http://mmisw.org/ont/cf/parameter/sea_surface_temperature"
      },
      "cf:units": "degrees_C",
      "cf:valid_max": "4500s",
      "cf:valid_min": "-300s",
      "http://www.w3.org/2000/01/rdf-schema#label": "Daily sea surface temperature"
    },
    {
      "@id": "_:anom",
      "@type": "ncld:Array",
      "cf:long_name": "Daily sea surface temperature anomalies",
      "cf:units": "degrees C",
      "cf:valid_max": "1200s",
      "cf:valid_min": "-1200s"
    },
    {
      "@id": "_:err",
      "@type": "ncld:Array",
      "cf:long_name": "Estimated error standard deviation of analysed_sst",
      "cf:units": "degrees C",
      "cf:valid_max": "1000s",
      "cf:valid_min": "0s"
    },
    {
      "@id": "_:ice",
      "@type": "ncld:Array",
      "cf:long_name": "Sea ice concentration",
      "cf:units": "percentage",
      "cf:valid_max": "100s",
      "cf:valid_min": "0s"
    }
  ]
}

Getting help / Collaborating

netCDF-LD is being developed by the a working group consisting of members of CSIRO, UK Met Office, NOAA, NCI, Geoscience Australia and others. The working group is contributing to a stream of activity under the Advancing netCDF-CF for the Geoscience Community. Participation is open to the public. There is a set of relevant Github repositories and is the main collaboration site for this work.



Binary-array Linked Data tools

Github repository for Binary-array Linked Data tools. The code hosted on this repository intends to feature Linked Data tools and libraries for interacting with netCDF and HDF formats.

View on Github repo

OGC netCDF-Classic-LD specs (draft)

Github repository for NetCDF Classic Standard for Encoding RDF Graphs netCDF-Classic-LD netCDF-LD.

View on Github repo OGC netCDF SWG

Credits

(Alphabetical order) Jim Biard (NOAA), Nicholas Car (GA), Simon Cox (CSIRO), Ethan Davis (UCAR), Kelsey Druken (NCI), Mark Hedley (UK Met. Office), Alex Ip (GA), Adam Leadbetter (Marine Inst.), Jonathan Yu (CSIRO)

Acknowledgements to those who contributed: Stefano Nativi, and Aaron Sweeney.