⇐ ⇒

[CF-metadata] CF-netcdf for Mercator projection - use lat/lon, or xc/yc plus lat/lon

From: Hedley, Mark <mark.hedley>
Date: Tue, 23 Oct 2012 16:41:06 +0100

Hello Mark

It looks a bit like your two examples are two different datasets.

In Example 1 you have a Wind_SFC value for each pair of projection coordinates; the data is 2D whilst the projection coordinates are 1D. To be CF compliant you must include latitude and longitude coordinates in your NetCDF file.

In Example two you have a Wind_SFC value for each pair of lat/lon coordinates; the data is 2D whilst the coordinates are 1D.

These datasets cannot be the same for any Mercator I know of, you must have re-sampled your data onto a different horizontal grid. If this is the case, this seems less preferable, I would preserve the data as much as possible in my files. I you have not re-sampled your data, then the data and coordinates will not match up correctly.

I think example two is explicitly wrong. I would prefer example one to encode this data.

all the best
mark


-----Original Message-----
From: CF-metadata on behalf of Mark Mathewson Consulting
Sent: Thu 11/10/2012 19:05
To: cf-metadata at cgd.ucar.edu
Subject: [CF-metadata] CF-netcdf for Mercator projection - use lat/lon,or xc/yc plus lat/lon
 
I have data that I'm putting into CF netcdf format (conventions 1.6)
that is in the Mercator projection. I'm trying to determine which
method is preferred for CF-compliance, in regard to the projection
information. The basic question is: Since the Mercator projection is
N-S-E-W, is there any need to provide projection coordinates (xc, yc)?
I can see the need to provide the projection coordinates for projections
such as Polar Stereographic.

Example 1: Use of x and y projection coordinates, with separate lat/lon
variables.
netcdf \1 {
dimensions:
     xc = 287 ;
     yc = 232 ;
     time = 1 ;
variables:
     char Mercator ;
         Mercator:longitude_of_projection_origin = 135.f ;
         Mercator:long_name = "projection information" ;
         Mercator:standard_parallel = 0.f ;
         Mercator:false_northing = 0.f ;
         Mercator:grid_mapping_name = "mercator" ;
         Mercator:false_easting = 0.f ;
     float yc(yc) ;
         yc:units = "m" ;
         yc:standard_name = "projection_y_coordinate" ;
     float xc(xc) ;
         xc:units = "m" ;
         xc:standard_name = "projection_x_coordinate" ;
     int time(time) ;
         time:units = "hours since 1970-01-01T00:00:00Z" ;
         time:long_name = "starting time for grids" ;
         time:standard_name = "time" ;
         time:calendar = "gregorian" ;
     float longitude(yc, xc) ;
         longitude:units = "degrees_east" ;
         longitude:standard_name = "longitude" ;
     float latitude(yc, xc) ;
         latitude:units = "degrees_north" ;
         latitude:standard_name = "latitude" ;
     float Wind_SFC(time, yc, xc) ;
         Wind_Mag_SFC:_FillValue = -30000.f ;
         Wind_Mag_SFC:grid_mapping = "Mercator" ;
         Wind_Mag_SFC:coordinates = "latitude longitude" ;
         Wind_Mag_SFC:valid_range = 0.f, 64.30556f ;
         Wind_Mag_SFC:standard_name = "wind_speed" ;
         Wind_Mag_SFC:cell_methods = "time: mode" ;
         Wind_Mag_SFC:units = "m sec**-1" ;

Example 2: Just using lat/lon coordinate variables, even though the
projection is not latlon.
netcdf \1 {
dimensions:
     longitude = 287 ;
     latitude = 232 ;
     time = 1 ;
variables:
     char Mercator ;
         Mercator:longitude_of_projection_origin = 135.f ;
         Mercator:long_name = "projection information" ;
         Mercator:standard_parallel = 0.f ;
         Mercator:false_northing = 0.f ;
         Mercator:grid_mapping_name = "mercator" ;
         Mercator:false_easting = 0.f ;
     int time(time) ;
         time:units = "hours since 1970-01-01T00:00:00Z" ;
         time:long_name = "starting time for grids" ;
         time:standard_name = "time" ;
         time:calendar = "gregorian" ;
     float longitude(longitude) ;
         longitude:units = "degrees_east" ;
         longitude:standard_name = "longitude" ;
     float latitude(latitude) ;
         latitude:units = "degrees_north" ;
         latitude:standard_name = "latitude" ;
     float Wind_SFC(time, latitude, longitude) ;
         Wind_Mag_SFC:_FillValue = -30000.f ;
         Wind_Mag_SFC:grid_mapping = "Mercator" ;
         Wind_Mag_SFC:valid_range = 0.f, 64.30556f ;
         Wind_Mag_SFC:standard_name = "wind_speed" ;
         Wind_Mag_SFC:cell_methods = "time: mode" ;
         Wind_Mag_SFC:units = "m sec**-1" ;


Which example is preferred? If example 2 is used, should the xy
coordinates be provided as:
float xc(longitude) ;
float yc(latitude);
and use the coordinate attribute for Wind pointing to xc and yc?

Thanks.

Regards,
Mark

-- 
Mark Mathewson Consulting
535 Swanson Mill Rd.
Tonasket, WA 98855
509-429-8635
_______________________________________________
CF-metadata mailing list
CF-metadata at cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Received on Tue Oct 23 2012 - 09:41:06 BST

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:41 BST

⇐ ⇒