200 likes | 366 Views
Coordinate Systems CF-1.0 Unidata’s Common Data Model. John Caron, Unidata Oct 16, 2006. Overview. Summarize netCDF coordinate system models, particularly CF and Unidata’s Common Data Model Show general coordinate systems for all kinds of data, not just unstructured grids. NetCDF.
E N D
Coordinate SystemsCF-1.0 Unidata’s Common Data Model John Caron, Unidata Oct 16, 2006
Overview Summarize netCDF coordinate system models, particularly CF and Unidata’s Common Data Model Show general coordinate systems for all kinds of data, not just unstructured grids
NetCDF • “Classic” NetCDF is: • An interface for array-oriented data access • Libraries that provide an implementation of the interface (with efficient subsetting) • A machine-independent file format • Data Structures: • Multidimensional (rectangular) arrays • Name/value attributes • Shared, named dimensions
No Coordinate Systems • NetCDF data model does not have integrated coordinate systems • no explicit support in the API • Conventions are needed to georeference • Neither do other general models like OPeNDAP, HDF • Contrast GRIB, HDF-EOS, other specialized formats
Coordinate Variables dimensions: lat = 64; lon = 128; variables: float lat(lat); float lon(lon); double temperature(lat,lon);
Coordinate Variables • One-dimension variable with same name as its dimension • Strictly monotonic values • No missing values • The coordinates of a point (i,j,k) is the tuple {cvar1(i),cvar2(j),cvar3(k)} • Used exclusively by many early Conventions, such as COARDS.
Limitations of 1D Coordinate Variables • Non lat/lon horizontal grids: float temperature(y,x) float lat(y, x); float lon(y, x); • Trajectory data: float NKoreaRadioactivity(pt); float lat(pt); float lon(pt); float altitude(pt); float time(pt)
General Coordinates in CF float P(y,x); P:coordinates = “lat lon”; float lat(y, x); float lon(y, x); float Sr90(pt); Sr90:coordinates = “lat lon altitude time”;
Coordinate Systems (abstract) • A Coordinate System for a data variable is a set of Coordinate Variables2 such that the coordinates of the (i,j,k) data point is the tuple {cvar1(i,j,k),cvar2(i,j,k),cvar3(i,j,k),…} • The dimensions of each Coordinate Variable must be a subset of the dimensions of the data variable.
Examples float gridData(t,z,y,x); float time(t); float y(y); float x(x); float lat(y,x); float lon(y,x); float height(t,z,y,x); float radialData(radial, gate) float distance(gate) float azimuth(radial) float elevation(radial) float time(radial)
Examples (2) float stationObs(pt); float lat(pt); float lon(pt); float z(pt); float time(pt); float trajectory(pt); float lat(pt); float lon(pt); float z(pt); float time(pt);
Coordinate Systems (2) • Specify Coordinate Variables • Specify Coordinate Types (e.g. lat, lon, time, cartesian x, y, polar coordinates etc.) • Specify connectivity (implicit or explicit) between data points • Implicit: Neighbors in index space are (connected) neighbors in coordinate space. Allows efficient searching.
Gridded Data • Cartesian coordinates • All dimensions are connected Connected means Neighbors in index space are neighbors in coordinate space float gridData(t,z,y,x); float time(t); float y(y); float x(x); float lat(y,x); float lon(y,x); float height(t,z,y,x);
Unstructured Grid • Node dimension not connected • Need to specify the connectivity float unstructGrid(node); float lat(node); float lon(node); float unstructGrid(t,z,node); float lat(node); float lon(node); float time(t); float height(z);
Representations of Connectivity • Assume need efficient rendering • Do you need efficient searching? • Given a coordinate, find surrounding points • “Persistence format” may not satisfy complex needs
CF Status • Encodes general Coordinate Systems • Encodes some (not all) Coordinate Types • Connectivity is not generally clear • No current standard for unstructured grids • Units, climate data conventions • Standard names: controlled vocabulary for physical quantities • Governance, active committees, new web site, actual $$ to continue work.
NetCDF-Java Library • 100% Java library • Prototype implementation of Common Data Model • decodes Conventions, presents Coordinate System API • Scientific Data Type APIs add specialized subsetting like “find data in bounding box” • File formats: • General: NetCDF, HDF5, OPeNDAP • Grids: GRIB1, GRIB2 • Radar: NEXRAD, NIDS, DORADE • Satellite: DMSP, GINI • Point: BUFR
Scientific Datatypes Point Trajectory Station Radial Grid Swath Common Data Model Unstructured Grid Coordinate Systems Data Access
Summary • Understanding of “Coordinate Systems” is still evolving • Connectivity needs to be described • CF is a good container for an unstructured grid convention • governance and support • NetCDF Java library/Common Data Model is Unidata’s prototyping platform • Possible transfer of functionality to cflib C library