Re: [netcdf-java] Curious effect from attributes semi_major/minor_axis on southern hemisphere images created by ncWMS

Hello Heiko,

I've been looking at this issue for a couple of days with the two files provided by Egil Storen (iceconc.nc and iceconc_1.nc). I'm not sure what is going on with Godiva, but I couldn't see much. Using the IDV, I can see the issue of right/left reversal when mapping on the south pole stereographic projection. However, when I use ToolsUI and plot a grid FeatureType, I don't see the issue. The only difference between the two figures given by ToolsUI is the scaling of the map, which I would expect given that one of the files has more information than the other. I do notice, however, that plotting iceconce.nc results in a figure without continental outlines, while iceconc_1.nc does have continental outlines.

I then incorporated your version of StereographicAzimuthalProjection.java into my thredds build, and ran a local catalog serving up the two files. Unfortunately, I saw exactly the same issue when using the IDV to plot the data - right/left reversal and a missing continental outline. ToolsUI was unaffected, and still gave consistent plots of the two files.

Did you observe different behavior when plotting the data in the two files after modifying StereographicAzimuthalProjection.java? If so, do you have a server up that I can inspect? I'm at a little bit of a loss for the moment.

Thanks,
  Lansing Madry
  Unidata
  Boulder, Colorado

On 1/28/2013 11:55 AM, Heiko Klein wrote:
Hi,

I moved this request to the netcdf-java list, since I can see the problems also in the latest toolsUI. In newer versions (4.3.14) it looks even worth with a different scale (km -> m):

in https://github.com/Unidata/thredds/blob/master/cdm/src/main/java/ucar/unidata/geoloc/projection/proj4/StereographicAzimuthalProjection.java



Please find attached a replacement for above file, fixing both south-pole x-flipping and scale.

Heiko






On 2013-01-25 16:28, Egil Støren wrote:
Dear all,

We have a netCDF file containing ice concentrations around antarctica
that is available at
http://thredds.met.no/thredds/catalog/egiltest/ES/data/catalog.html?dataset=egiltest/ES/data/iceconc.nc.
Using the Godiva2 viewer, it is obvious that the data is displayed
inverted along a vertical line centred on the map. This is most easily
seen using the south polar stereographic projection.

The netCDF file has a variable containing projection info:

     int Polar_Stereographic_Grid ;
         Polar_Stereographic_Grid:grid_mapping_name =
"polar_stereographic" ;
Polar_Stereographic_Grid:straight_vertical_longitude_from_pole
= 0.f ;
Polar_Stereographic_Grid:latitude_of_projection_origin = -90.f ;
         Polar_Stereographic_Grid:standard_parallel = -70.f ;
         Polar_Stereographic_Grid:false_easting = 0.f ;
         Polar_Stereographic_Grid:false_northing = 0.f ;
         Polar_Stereographic_Grid:semi_major_axis = 6378273.f ;
         Polar_Stereographic_Grid:semi_minor_axis = 6356890.f ;
         Polar_Stereographic_Grid:proj4_string = "+proj=stere +a=6378273
+b=6356889.44891 +lat_0=-90 +lat_ts=-70 +lon_0=0" ;

When I removed the following attributes from this variable, the data
suddenly displayed correctly in Godiva2:

         Polar_Stereographic_Grid:semi_major_axis = 6378273.f ;
         Polar_Stereographic_Grid:semi_minor_axis = 6356890.f ;

The modified version can be seen at
http://thredds.met.no/thredds/catalog/egiltest/ES/data/catalog.html?dataset=egiltest/ES/data/iceconc_1.nc.


Since these attributes only gives a more exact description of the shape
of the earth (compared to not having them), I think there must be a bug
somewhere. Have anybody experienced this behaviour? Is this a known bug?

We are using thredds version 4.2.9.

Best regards,

   Egil Støren
   Norwegian Meteorological Institute



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

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