Re: [netcdf-java] netcdf-java selects wrong grid_mapping if several grid_mapping_name variables are present

Hi Heiko:

latest 4.1 release (4.1.20100430.2256) has a fix for this. thanks for reporting.

John

On 4/30/2010 8:24 AM, Heiko Klein wrote:
Hi,

netcdf-java seems to ignore the grid_mapping attribute if several
grid_mapping_name variables are present:

I'm currently reprojecting some data from

        int projection_1 ;
                projection_1:grid_mapping_name = "polar_stereographic" ;
                 ...

to

        int projection_stere ;
                projection_stere:grid_mapping_name = "polar_stereographic" ;
                 ...

The reprojected altitude has now the attributes:
         short altitude(time, y, x) ;
                 altitude:standard_name = "altitude" ;
                 altitude:units = "m" ;
                 altitude:coordinates = "lon lat" ;
                 altitude:grid_mapping = "projection_stere" ;


For reference, I still keep the original 'projection_1' variable in the
file. But whenever I try to view the altitude (idv (webstart),
netcdf-toolsUI (4.1)), the data is distorted because netcdf-java assumes
'projection_1' to be the correct projection for 'altitude'.

I can solve the problem by completely deleting the projection_1
variable, but since I use the 'altude:grid_mapping =
"projection_stere"', this shouldn't be neccessary.


An example-file with altitude around Greenland is attached.

Best regards,

Heiko



_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/

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