[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [netcdf-java] ncWMS and ellipsoid-support in CF-1.2

Hi all:

we found a serious defect in the GRIB reader that returns potentially wrong data, so we now dont expect a stable release until september (i am on vacation right now). the current snapshot / release fixes GRIB but hasnt yet propagated the fix to FMRC. if you are not using GRIB FMRC feature, testing with the current release would be most welcome.


TDS 4.2 will include CDM 4.2.

Heiko Klein wrote:
Hi John, hi Jonathan,

I just had a look at the latest netcdf-java 4.2beta and I don't see any problems with respect to the ellipsoid-support for transverse_mercator and stereographic files.

To reduce the number of required updates to our operational thredds-servers, I would like to ask some question about your roadmap:

When will thredds-4.2 be declared stable (approx.)?
Will thredds-4.2 include netcdf-java 4.2?

The myOcean project/Jonathan asks us to install the current thredds-4.2 soon (August/September?). Can we wait for an official stable version of thredds-4.x with the ellipsoid support, or should we just follow the myOcean-requested updates?

Best regards,


On 2010-08-12 17:39, Unidata netCDF Java Support wrote:
these should be in the latest 4.2 (beta) cdm. please let me know if you see any problems. thanks again.


Hi Heiko:

These look great, i will integrate into 4.2 asap. thanks a lot!


Hi John,

I found some time to include jhlabs code for Stereographic and
Transverse Mercator into ncSrc-4.2.zip . The Stereographic code had some
bugs, as you expected, and the TransverseMercator code worked well. The
files in unidataCommon include a main method with some smaller tests.

I tested the code with toolsUI and the topography-files in
(those files will be automatically deleted in 14days)

The stereograhpic files have a difference of approx. 5km in southern
Norway, while the UTM files have a difference of more than 10km there
comparing the spherical vs the ellipsoid version.

I made a least effort approach when converting the code, so it's far
from well tested or beautiful. But I hope this code can make it to the
netcdf-java, if just as intermediate solution until the one or other
geo-api has been added.

Best regards,


On 2010-06-09 23:47, John Caron wrote:

Hi Heiko:

Im not sure how fast i can get to that. Do you have real datasets with
those projections?

The proj4 code is from the jhlabs partial port at


The ones that ive already done are at


I should warn you that I have seen bugs in the Java, which i think is
some automatic C/Java translater. I have been checking against the
original C code. Also, theres a lot of modifications to be made to make
it compatible with our Projection class. Thats why the Geotools API may
be a better idea.

BTW, Transverse Mercator on the ellipsoid i think is UTM, which we have.
So perhaps you only need Stereographic ?


On 6/9/2010 7:08 AM, Heiko Klein wrote:
Hi John,

when we discussed the issue of ellipsoid-support in netcdf-java back in
March in the mailing-list it went very fast to: use one or another

This sounded to me like a lot of work for you. If you don't plan to do
this work in the near future (i.e. 2010), could you please send me the
proj4j source. Maybe I can try then to add ellipsoid support of
Stereographic and Transverse Mercator to netcdf-java (4.2) during summer.

Best regards,


On 2010-03-24 17:46, John Caron wrote:

Heiko Klein wrote:

Hi Jon,

I just found some time to look at the source of netcdf-java 4.1. As far
as I can see, only some projections (LambertConformalConicEllipse,
AlbersEqualAreaEllipse, UTM) support ellipsoids, while the others use a
constant spherical earth with EARTH_RADIUS = 6371.229km

In particular, Stereographic projection doesn't support ellipsoids, so
this explains the offset in my maps.

Would be nice to have this assured by one of the unidata-developpers. I
mainly checked the ucar/unidata/geoloc/projection sources.

Best regards,


Yes, correct. We are slowly adding ellipsoid support, but only after we
have a sample dataset that uses them. We are porting code from proj4,
its rather time-consuming to get it right.
if you have sample data where the ellipsoidal earth matters, send it
along, we'll get to it when we can. or, if you have resources and
expertise to port the proj4j code, i could send that to you and get you


On 2010-03-10 14:38, Jonathan Blower wrote:

Hi Heiko,

This is a good question. ncWMS relies on netcdf-java for converting
coords to wgs84 lat lon, so I'm copying this to the mailing list in
the hope that someone can enlighten me about ellipsoid support in the

Cheers, Jon

-----Original Message-----
From: Heiko Klein<address@hidden>
Sent: 09 March 2010 08:54
To: Jonathan Blower<address@hidden>
Subject: ncWMS and ellipsoid-support in CF-1.2

Hi Jon,

I currently try to visualize some satellite ice-maps over the
with ncWMS, but the data seems to be displaced by some 10-30km
with the land-maps (generated by mapserver).

While geo-tools and therefore ncWMS support lots of coordinate
systems for the presented maps, the support for ellipsoids was only
added to CF-1.2. Do you know if ncWMS already supports the CF-1.2
features like semi_major_axis/semi_minor_axis for input-files, or does
it assume the CF-1.0 spherical earth with 6371km radius?

Best regards,


netcdf-java mailing list
For list information or to unsubscribe, visit:

-- Dr. Heiko Klein Tel. + 47 22 96 30 00 Development Section / IT Department Fax. + 47 22 69 63 55 Norwegian Meteorological Institute http://www.met.no P.O. Box 43 Blindern 0313 Oslo NORWAY

Ticket Details
Ticket ID: UMF-635548
Department: Support netCDF Java
Priority: Critical
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.