Re: IDV - NetCDF format for xyz data grid mapping to transverse Mercator]

  • To: Stuart Wier <wier@xxxxxxxxxx>
  • Subject: Re: IDV - NetCDF format for xyz data grid mapping to transverse Mercator]
  • From: John Caron <caron@xxxxxxxxxxxxxxxx>
  • Date: Thu, 05 Jan 2006 11:58:04 -0500
Stuart Wier wrote:

John,

Please do not bother with this until after Christmas. I am sending it while I have the material in mind.

Tried your improvement but have same result. I tried a couple of different cdl headers (attached) but all gave same result: the x, y values are treated as lon lat values.

(Is this a real new feature? What version of NetCDF/ncgen do I need to use this? The online information I find about use of _Coordinate attributes is dated Mar 9 '05 (http://www.unidata.ucar.edu/software/netcdf-java/CoordinateAttributes2.html) I just downloaded netcdf-3.6.0-p1.tar.gz and installed it from the Unidata web site but that web site saysit is dated Feb 2005.)

I hope your Christmas time is good if not better. It can be pretty hard on Dads. How is your daughter doing? My kids are fine and home all at once this year, plus a mother in law.

Best wishes,

Stu



Caron wrote:

Hi Stu:

Its not correctly assigning the coordinate transform.
Add the following attributes to the TM variable:
   :_CoordinateTransformType = "Projection";
   :_CoordinateAxisTypes = "GeoX GeoY";

------------------------------------------------------------------------

netcdf Kanto_Pv_tomography_m8 {
dimensions:
        y = 86 ;
        x = 70 ;
        Depth = 101 ;
variables:
        float Pv(Depth, y, x) ;
                Pv:units = "km/s" ;
                Pv:long_name = "P wave velocity" ;
                Pv:missing_value = -9999. ;
                Pv:coordinates = "lat lon" ;
                Pv:grid_mapping = "TM" ;
        int TM ;
                TM:grid_mapping_name = "transverse_mercator" ;
                TM:scale_factor_at_central_meridian = 1. ;
                TM:longitude_of_central_meridian = 138.97 ;
                TM:latitude_of_projection_origin = 36.05 ;
                TM:_CoordinateTransformType = "Projection" ;
                TM:_CoordinateAxes = "GeoX GeoY" ;
        float y(y) ;
                y:units = "km" ;
                y:long_name = "y coordinate of projection" ;
                y:standard_name = "projection_y_coordinate" ;
        float x(x) ;
                x:units = "km" ;
                x:long_name = "x coordinate of projection" ;
                x:standard_name = "projection_x_coordinate" ;
        float Depth(Depth) ;
                Depth:units = "km" ;
                Depth:positive = "up" ;
        float lat(y, x) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude coordinate" ;
                lat:standard_name = "latitude" ;
        float lon(y, x) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude coordinate" ;
                lon:standard_name = "longitude" ;

// global attributes:
                :source = "Francis Wu" ;
                :converted = "Dec 21 2005, Stuart Wier, UNAVCO (Boulder CO)" ;
                :other = "  " ;
}
------------------------------------------------------------------------

netcdf Kanto_Pv_tomography_m8 {
dimensions:
        y = 86 ;
        x = 70 ;
        Depth = 101 ;
variables:
        float Pv(Depth, y, x) ;
                Pv:units = "km/s" ;
                Pv:long_name = "P wave velocity" ;
                Pv:missing_value = -9999. ;
                Pv:coordinates = "lat lon" ;
                Pv:grid_mapping = "TM" ;
        int TM ;
                TM:grid_mapping_name = "transverse_mercator" ;
                TM:scale_factor_at_central_meridian = 1. ;
                TM:longitude_of_central_meridian = 138.97 ;
                TM:latitude_of_projection_origin = 36.05 ;
                TM:_CoordinateTransformType = "Projection" ;
                TM:_CoordinateSystems = "ProjectionCoordinateSystem" ;
        char ProjectionCoordinateSystem ;
                ProjectionCoordinateSystem:_CoordinateAxes = "Depth y x" ;
                ProjectionCoordinateSystem:transform_name = 
"transverse_mercator" ;
                ProjectionCoordinateSystem:scale_factor_at_central_meridian = 
1. ;
                ProjectionCoordinateSystem:longitude_of_central_meridian = 
138.97 ;
                ProjectionCoordinateSystem:latitude_of_projection_origin = 
36.05 ;
        float y(y) ;
                y:units = "km" ;
                y:long_name = "y coordinate of projection" ;
                y:standard_name = "projection_y_coordinate" ;
        float x(x) ;
                x:units = "km" ;
                x:long_name = "x coordinate of projection" ;
                x:standard_name = "projection_x_coordinate" ;
        float Depth(Depth) ;
                Depth:units = "km" ;
                Depth:positive = "up" ;
        float lat(y, x) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude coordinate" ;
                lat:standard_name = "latitude" ;
        float lon(y, x) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude coordinate" ;
                lon:standard_name = "longitude" ;

// global attributes:
                :source = "Francis Wu" ;
                :converted = "Dec 21 2005, Stuart Wier, UNAVCO (Boulder CO)" ;
                :other = "  " ;
}
------------------------------------------------------------------------

netcdf Kanto_Pv_tomography_m8 {
dimensions:
        y = 86 ;
        x = 70 ;
        Depth = 101 ;
variables:
        float Pv(Depth, y, x) ;
                Pv:units = "km/s" ;
                Pv:long_name = "P wave velocity" ;
                Pv:missing_value = -9999. ;
                Pv:coordinates = "lat lon" ;
                Pv:grid_mapping = "TM" ;
        int TM ;
                TM:grid_mapping_name = "transverse_mercator" ;
                TM:scale_factor_at_central_meridian = 1. ;
                TM:longitude_of_central_meridian = 138.97 ;
                TM:latitude_of_projection_origin = 36.05 ;
                TM:_CoordinateTransformType = "Projection" ;
                TM:_CoordinateAxisTypes = "GeoX GeoY" ;
        float y(y) ;
                y:units = "km" ;
                y:long_name = "y coordinate of projection" ;
                y:standard_name = "projection_y_coordinate" ;
        float x(x) ;
                x:units = "km" ;
                x:long_name = "x coordinate of projection" ;
                x:standard_name = "projection_x_coordinate" ;
        float Depth(Depth) ;
                Depth:units = "km" ;
                Depth:positive = "up" ;
        float lat(y, x) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude coordinate" ;
                lat:standard_name = "latitude" ;
        float lon(y, x) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude coordinate" ;
                lon:standard_name = "longitude" ;

// global attributes:
                :source = "Francis Wu" ;
                :converted = "Dec 21 2005, Stuart Wier, UNAVCO (Boulder CO)" ;
                :other = "  " ;
}
try adding attributes

_CoordinateAxisType = "GeoX" ;
_CoordinateAxisType = "GeoY" ;

on the x, y variables, respectively

For all the dirty details, see:

http://www.unidata.ucar.edu/software/netcdf-java/CoordinateAttributes3.html




  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: