iousprafa / nctoolbox

Automatically exported from code.google.com/p/nctoolbox
0 stars 0 forks source link

Strange longitudes from this grib file #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
loc2='dods://geoport.whoi.edu/thredds/dodsC/usgs/data2/sdalyander/nam_wind/nam_a
gg7.ncml'
ncNAM=ncgeodataset(loc2);
ncgrid=ncNAM{'u_wind'}(:).grid;
latNAM=ncgrid.lat;
lonNAM=ncgrid.lon;
pcolorjw(lonNAM,latNAM,double(lonNAM));colorbar

Produces a very strange map, because the longitude, instead of spanning the 
continental US ([-150 -50]), ranges from -520.66 to 330.7866.

I tried accessing this dataset in the toolsUI in NetCDF4.0, 4.1 and 4.2 and 
none of them work, so this seems to be a NetCDF-Java problem.  I will take this 
up with John Caron. 

Soupy Dalyander (sdalyander@usgs.gov) says this used to work with a previous 
version of Matlab and njTBX, which is strange, because I don't see how this 
could be if netcdf-java isn't doing it correctly.  Unless Sachin Bhate (the 
njTBX developer) introduced extra code as a workaround.

Original issue reported on code.google.com by rsignell on 27 Oct 2011 at 3:06

GoogleCodeExporter commented 8 years ago

Original comment by crosb...@gmail.com on 27 Oct 2011 at 3:59

GoogleCodeExporter commented 8 years ago
Mystery solved -- sort of.

I turns out that toolsUI-4.0.49.jar produces the *correct results*
while later toolsUI versions do not work.

I tried swapping out the latest toolsUI-4.2 for toolsUI-4.0.49.jar in
NCTOOLBOX, and NCTOOLBOX then works fine for this case.

I'll pursue this with John Carone.

-Rich

Original comment by crosb...@gmail.com on 27 Oct 2011 at 4:04

GoogleCodeExporter commented 8 years ago
Seems to work fine in my reference installation of nctoolbox. (Using separate 
jars including netcdf version 4.2) Appears to only affect previous versions of 
netcdf-java.

Current versions of nctoolbox should not have this problem.

-Alex

Original comment by crosb...@gmail.com on 27 Oct 2011 at 4:19

GoogleCodeExporter commented 8 years ago
Interesting.  I confirm this finding.  But the jars in the nctoolbox/java 
directory are apparently *not* the latest jar files from Unidata.  So while the 
latest NCTOOLBOX using the supplied jars works, the latest jars from Unidata do 
*not* work.  So I will still persue this with John Caron.

Original comment by rsignell on 27 Oct 2011 at 4:48