This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Tor,There is a problem with the sample file coordinate pamameters or the projection equation.
Using your equations: Location of pole of rotated grid as seen in non-rotated grid: Lon=0.0, Lat=-25.0 Additional axial rotation about pole of rotated grid:0.0 Location of chosen point in non-rotated grid: Lon=-46.5, Lat=-36.5 Location of chosen point as seen in rotated grid: Lon=-117.63130026466261, Lat=-48.84029857829332 I believe the rotated point should be near lon 46W lat 28N Location of chosen point in non-rotated grid: Lon=46.9, Lat=38.9 Location of chosen point as seen in rotated grid: Lon=35.59515325886277, Lat=-12.506087977741661 The makes the image show south of the equator.Also, it seems that Dx and Dy might be wrong. If I use 46W, 28N as the lower left corner, then the upper right corner is off the earth, lat > 90.
Can you check? Robb... On Thu, 20 Nov 2008, Tor Christian Bekkvik wrote:
Hi, I have been a little busy; Sorry for the bad example file I sent first, the attached file should have more meaningful values. Some file info, logged from a java-application using JGRIB (JGRIB supports rotated latlon for GRIB-1) : Gribfile: rotatedlatlon.grb Records: 1 Grid: GDS section: Rotated LatLon Grid (468x378) lon: -46.5 to 46.9 (dx 9.99990041077413E24) lat: -36.5 to 38.9 (dy 9.99990041077413E24) south pole: lon 0.0 lat -25.0 rot angle: 0.0 mode(17):0x88 type(6) :0xa scan(28):0x40 PDS cent tab proc: 96 1 1 -> 96 -1 1 ncep_opn.tab Z type(105): fixed height above ground Z #levels: 1 Dates(1): min Mon Dec 15 19:00:00 CET 2003 max Mon Dec 15 19:00:00 CET 2003 Param: 7 HGT [gpm] Geopotential height [-275.23438 4048.7656] PS. Hoping that rotated latlon projection could be supported for GRIB-2 Thanks, Tor C-----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 yousent has allthe data values equal to 0. could you make availableanother samplefile 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 itis not supported:ucar.grib.NoValidGribException: GDS: Unknown Grid Type :10) is notsupported. atucar.grib.grib1.Grib1GridDefinitionSection.<init>(Grib1GridDef initionSection.java:401)at ucar.grib.grib1.Grib1Input.scan(Grib1Input.java:155) atucar.grib.grib1.Grib1Indexer.writeFileIndex(Grib1Indexer.java:90)atucar.nc2.iosp.grib.GribServiceProvider.writeIndex(GribServiceP rovider.java:163)atucar.nc2.iosp.grib.GribServiceProvider.getIndex(GribServicePro vider.java:139)atucar.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) atucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:341)atucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:175)atucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:161)To add this new projection, it seems that at least thefollowing codeneeds update: 1) ProjectionImpl (I can implement RotLatLonProjection extends ProjectionImpl) 2) Grib1GridDefinitionSection (to fixNoValidGribException, listed above)3) GribHorizCoordSys.makeProjection (read necessaryparameters from GribGDS 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("unknownprojection = "+ 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 liketo do thesame 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/ ============================================================== =================
=============================================================================== Robb Kambic Unidata Program Center Software Engineer III Univ. Corp for Atmospheric Research address@hidden WWW: http://www.unidata.ucar.edu/ ===============================================================================