© Crown Copyright Met Office Towards improved netCDF-GIS interoperability: Potential utility of the “Well-Known Model” concept Phil Bentley, Met Office Hadley Centre
© Crown Copyright Met Office Key Topics This presentation visits the following topics: Problem: The netCDF-GIS disconnect Partial Solution: Use of the WKM concept Examples of WKM usage Conclusions & Further Work
© Crown Copyright Met Office Problem: The netCDF-GIS disconnect
© Crown Copyright Met Office The Scenario
© Crown Copyright Met Office The view from ncdump netcdf tasmean { dimensions: time = UNLIMITED; // (1 currently) height = 1; latitude = 73; longitude = 96; bound = 2; variables: float time(time); float bounds_time(time, bound); float height(height); float bounds_height(height, bound); float latitude(latitude); float bounds_latitude(latitude, bound); float longitude(longitude); float bounds_longitude(longitude, bound); float air_temperature1(time, height, latitude, longitude); air_temperature1:standard_name = "surface_temperature"; air_temperature1:long_name = "Temperature at 1.5M"; air_temperature1:units = "K"; air_temperature1:cell_methods = "time: mean within years..."; air_temperature1:_FillValue = -1.e+30f; }
© Crown Copyright Met Office The view from CF Checker CHECKING NetCDF FILE: tasmean ll.nc ===================== Using Standard Name Table Version 7 ( T02:00:00Z) Checking variable: time Checking variable: bounds_time Checking variable: height Checking variable: bounds_height Checking variable: latitude Checking variable: bounds_latitude Checking variable: longitude Checking variable: bounds_longitude Checking variable: air_temperature ERRORS detected: 0 WARNINGS given: 0
© Crown Copyright Met Office The view from Panoply
© Crown Copyright Met Office The view from CDAT
© Crown Copyright Met Office The view from ESRI ArcGIS
© Crown Copyright Met Office The view from ESRI Tech Support Quote paraphrased from ESRI Technical Support “Shift your longitude coordinates half a grid cell to the east”
© Crown Copyright Met Office So what's going on? CF convention lacks an attribute for specifying explicitly and unambiguously the spatial data model used by a variable in a netCDF file. Is it (the data model) a regular, structured grid? Is it an unordered collection of point locations? Is it a series of vertical profiles or trajectories? Hence, GIS software developers & applications are forced to make inferences from esoteric combinations of CF/netCDF variables and attributes. Why do we make this so complicated?!
© Crown Copyright Met Office Partial Solution: Use of the "well-known model" (WKM) concept?
© Crown Copyright Met Office Potential Utility of the Well-Known Model (WKM) Concept Mirrors the Well-Known Text (WKT) and Well-Known Binary (WKB) concepts used in e.g. OGC specifications Provides a hint to client applications as to how to interpret the spatial data model(s) encoded in a netCDF file. WKM values would be based on de facto and de jure geospatial data standards such as… OGC/ISO (spatial schema - aka feature geometry) OGC/ISO (schema for coverage geometry) Gridspec (Balaji’s schema for climate model grids)
© Crown Copyright Met Office Proposed WKM Syntax New CF metadata attribute called, say, data_model or spatial_data_model Used as a global-scope attribute: defines the default spatial data model for a netCDF file, e.g. :data_model = "continuous coverage: rectified grid" Used as a variable-scope attribute: defines the spatial data model for that variable, e.g. variables: float temp(time, regions); temp:data_model = "feature_collection: polygons"; Attribute values would be drawn from a controlled vocabulary, as per CF standard names.
© Crown Copyright Met Office Vector Data Models Based on OGC/ISO standard for spatial schema (aka feature geometry). Example values of data_model attribute: feature_collection: points feature_collection: multipoints feature_collection: curves/lines feature_collection: multicurves/lines feature_collection: polygons feature_collection: multipolygons
© Crown Copyright Met Office Coverage/Grid Data Models Based upon combination of OGC/ISO (coverage geometry) and Gridspec standards Example values of data_model attribute: // from OGC/ISO discrete coverage: points discrete coverage: curves discrete coverage: surfaces continuous coverage: thiessen polygon network continuous coverage: hexagonal grid continuous coverage: quadrilateral grid continuous coverage: rectified grid continuous coverage: georectified grid // from GFDL Gridspec... continuous coverage: logically rectangular continuous coverage: structured triangular continuous coverage: unstructured polygonal
© Crown Copyright Met Office Examples of WKM Usage
© Crown Copyright Met Office Ex 1: Time-series of station data // default data model for this netCDF file :data_model = "feature_collection: points"; dimensions: stations = 100; time = UNLIMITED;... variables: float lat(stations); float lon(stations); float time(time); float temp(time, stations); temp:standard_name = "surface_temperature"; temp:coordinates = "lat lon"; // following attribute is optional temp:data_model = "feature_collection: points";...
© Crown Copyright Met Office Ex 2: Time-series of max wind speed within geographic regions // default data model for this netCDF file :data_model = "feature_collection: points"; dimensions: regions = 10; verts = 1000; time = UNLIMITED;... variables: char region_names(regions, 80); int nverts(regions); // num vertices making up each region float lat(verts); float lon(verts); float time(time); float windspeed(time, regions); windspeed:standard_name = "wind_speed"; windspeed:coordinates = "lat lon"; windspeed:cell_methods = "lat: lon: maximum"; // specific data model for this variable windspeed:data_model = "feature_collection: polygons";...
© Crown Copyright Met Office Ex 3: 4D Global Model Grid dimensions: lat = 96; lon = 73; level = 38; time = UNLIMITED;... variables: float lat(lat); float lon(lon); float level(level); float time(time); float humidity(time, level, lat, lon); humidity:standard_name = "specific_humidity"; // data model based on OGC/ISO humidity:data_model = "discrete coverage: grid points"; //...or based on Gridspec. humidity:data_model = "discrete coverage: logically rectangular";...
© Crown Copyright Met Office Conclusions The Well-Known Model concept... …exploits existing geospatial standards …is intended to act as a simple hint to client applications (and humans too) regarding the spatial data model(s) encoded in a netCDF file …is aimed particularly at GIS software community where CF metadata conventions appear to be less familiar / understood …should hopefully facilitate better manipulation of netCDF data within GIS applications …shouldn't conflict with existing CF attributes and usage
© Crown Copyright Met Office Further Work? If WKM seen as a Good Thing then… Undertake further analysis of current geospatial data model standards Elicit input/feedback from GIS community Synthesise ideas from existing geometry models (OGC/ISO, Gridspec, netCDF, CDM) Identify/refine an initial list of data_model definitions. Firm up syntax. Compile usage examples for commonly encountered netCDF data models Submit proposal to CF community
© Crown Copyright Met Office That’s all folks! Q&A