-----Original Message-----
From: Robb Kambic [mailto:address@hidden]
Sent: 20. november 2008 00:44
To: Tor Christian Bekkvik
Subject: Re: [Fwd: [netcdf-java] FW: Adding a new projection
to GRIB netcdf decoder] (fwd)
Tor,
An image of the result would be appreciated.
Thanks,
Robb...
On Wed, 19 Nov 2008, Robb Kambic wrote:
Tor,
I've been working on this problem but the sample file you
sent has all
the data values equal to 0. could you make available
another sample
file with a description so I can tell if I am displaying correctly.
Robb...
-------- Original Message --------
Subject: [netcdf-java] FW: Adding a new projection to GRIB netcdf
decoder
Date: Wed, 29 Oct 2008 09:35:55 +0100
From: Tor Christian Bekkvik <address@hidden>
To: netcdf-java <address@hidden>
-----Original Message-----
From: Tor Christian Bekkvik
Sent: 27. oktober 2008 14:48
To: 'address@hidden'
Cc: Kjell Rĝang
Subject: Adding a new projection to GRIB netcdf decoder
Hi,
We would like to add support for Rotated LatLon projection when
reading GRIB files. (using netcdf decoders)
To open the gribfile, we have used class NetcdfDataset:
NetcdfDataset.openDataset(gribFile,...)
But this fails for with rotated latlong projection, as it
is not supported:
ucar.grib.NoValidGribException: GDS: Unknown Grid Type :
10) is not
supported.
at
ucar.grib.grib1.Grib1GridDefinitionSection.<init>(Grib1GridDef
initionSection.java:401)
at ucar.grib.grib1.Grib1Input.scan(Grib1Input.java:155)
at
ucar.grib.grib1.Grib1Indexer.writeFileIndex(Grib1Indexer.java:90)
at
ucar.nc2.iosp.grib.GribServiceProvider.writeIndex(GribServiceP
rovider.java:163)
at
ucar.nc2.iosp.grib.GribServiceProvider.getIndex(GribServicePro
vider.java:139)
at
ucar.nc2.iosp.grib.GribServiceProvider.open(GribServiceProvide
r.java:75)
at ucar.nc2.NetcdfFile.<init>(NetcdfFile.java:1092)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:485)
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:278)
at
ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:341)
at
ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:175)
at
ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:161)
To add this new projection, it seems that at least the
following code
needs
update:
1) ProjectionImpl (I can implement RotLatLonProjection extends
ProjectionImpl)
2) Grib1GridDefinitionSection (to fix
NoValidGribException, listed above)
3) GribHorizCoordSys.makeProjection (read necessary
parameters from Grib
GDS section and return RotLatLonProjection):
private void makeProjection(NetcdfFile ncfile) {
switch (lookup.getProjectionType(gdsIndex)) {
case TableLookup.PolarStereographic:
makePS();
break;
case TableLookup.LambertConformal:
makeLC();
break;
case TableLookup.Mercator:
makeMercator();
break;
case TableLookup.Orthographic:
makeSpaceViewOrOthographic();
break;
default:
throw new UnsupportedOperationException("unknown
projection = "
+ gdsIndex.grid_type);
}
Currently, I don't have sufficient GRIB/NetCDF knowledge (or source
code) to do this.
But I have already added Rotated LatLon projection for the JGRIB
project (http://jgrib.sourceforge.net/), and we would like
to do the
same with NetCDF/GRIB.
- Any comments how to best do this ?
Thanks,
Tor Chr Bekkvik
_______________________________________________
netcdf-java mailing list
address@hidden
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/
==============================================================
=================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for
Atmospheric Research
address@hidden WWW:
http://www.unidata.ucar.edu/
==============================================================
=================