source:
- https://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/build/ch05s06.html
- https://wiki.esipfed.org/Attribute_Convention_for_Data_Discovery_1-3
In this article, we will summarize few useful metadata standards (CF and ACDD) to describe coordinate reference systems and mapping for netcdf files. Additionally, few examples with projected data files will be presented.
CRS Descriptions
True latitude and longitude
When the positions of points on a grid are not in terms of latitude and longitude (e.g. xgrid, ygrid), true latitude and longitude coordinates must be defined in coordinates attribute.
Grid mapping
To describe mapping between the given coordinates (e.g xgrid, ygrid) and the true latitude and longitude coordinates, grid mapping attribute can be used, and the attribute is defined in a data variables so that variables with different mappings can be added in a single file.
One required grid mapping variables is grid_mapping_name that contains the mapping’s name, and valid values of grid_mapping_name can be found in grid mapping section of cf convention.
Few examples
Here we present few examples often used to describe sea ice remote sensing data in NetCDF files along with variable description. All can be found in grid mapping section of the cf convention site.
grid_mapping_name (string): grid mapping name (correct one must be used)
straight_vertical_longitude_from_pole (numeric): the lon to be oriented straight up from the North or South Pole (-180.0 <= and <180.0)
latitude_of_projection_origin (numeric): the latitude chosen as the origin of rectangular coordinates for a map projection (-90.0 <= and <=90.0)
longitude_of_projection_origin (numeric): the longitude chosen as the origin of rectangular coordinates for a map projection (-180 <= and <180.0)
standard_parallel (numeric): the line(s) of latitude at which the developable map project surface touch(es) the reference sphere or ellipsoid (-90.0 <= and <=90.0)
Or scale_factor_at_projection_origin
false_easting (numeric): the value added to projection_x_coordinate to eliminate negative numbers
false_northing (numeric): the value added to projection_y_coordinate to eliminate negative numbers
projection_x_coordinate (string): the variable that represent x coordinates
projection_y_coordinate (string): the variable that represent y coordinates
semi_major_axis (numeric): the length in meters of the semi-minor axis of the ellipsoidal figure associated with the geodetic datum to approximate the shape of the Earth
semi_minor_axis (numeric): the length in meters of the semi-major axis of the ellipsoidal figure
Polar stereographic
# required
grid_mapping_name = polar_stereographic
# map parameters
straight_vertical_longitude_from_pole = 180.0f
latitude_of_projection_origin = -90.0
standard_parallel = -70
false_easting = 0.0
false_northing = 0.0
# map coordinates
projection_x_coordinate
projection_y_coordinate
Stereographic
grid_mapping_name = stereographic
longitude_of_projection_origin
latitude_of_projection_origin
scale_factor_at_projection_origin
false_easting
false_northing
Lambert azimuthal equal area
grid_mapping_name = lambert_azimuthal_equal_area
longitude_of_projection_origin = 0.0f
latitude_of_projection_origin = -90.0f
false_easting = 0.0f
false_northing = 0.0f
Additional attributes
For grid_mapping_name = "polar_stereographic"
grid_boundary_top_projected_y = 4350000.0; // double
grid_boundary_bottom_projected_y = -3950000.0; // double
grid_boundary_right_projected_x = 3950000.0; // double
grid_boundary_left_projected_x = -3950000.0; // double
parent_grid_cell_row_subset_start = 0.0; // double
parent_grid_cell_row_subset_end = 332.0; // double
parent_grid_cell_column_subset_start = 0.0; // double
parent_grid_cell_column_subset_end = 316.0; // double
spatial_ref = "PROJCS[\"NSIDC Sea Ice Polar Stereographic South\",GEOGCS[\"Unspecified datum based upon the Hughes 1980 ellipsoid\",DATUM[\"Not_specified_based_on_Hughes_1980_ellipsoid\",SPHEROID[\"Hughes 1980\",6378273,298.279411123061,AUTHORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4054\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Polar_Stereographic\"],PARAMETER[\"latitude_of_origin\",-70],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],AUTHORITY[\"EPSG\",\"3412\"],AXIS[\"X\",UNKNOWN],AXIS[\"Y\",UNKNOWN]]";
proj4text = "+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs";
srid = "urn:ogc:def:crs:EPSG::3412";
GeoTransform = "-3950000.0 25000.0 0 4350000.0 0 -25000.0";
longitude_of_projection_origin = 0.0; // double
scaling_factor = 1.0; // double
semimajor_radius = 6378273.0; // double
semiminor_radius = 6356889.449; // double
units = "meters";