Re: [thredds] NetCDF Subset Service for curvilinear grid as point data: unexpected ArrayIndexOutOfBoundsException

Hi,

 

I have submitted a bug report couple weeks ago regarding to this problem. It
only happens on point source subset.

 

Guan

 

  _____  

From: thredds-bounces@xxxxxxxxxxxxxxxx
[mailto:thredds-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Marcos Hermida
Sent: Friday, April 15, 2011 2:19 AM
To: THREDDS Users; John Maurer
Subject: Re: [thredds] NetCDF Subset Service for curvilinear grid as point
data: unexpected ArrayIndexOutOfBoundsException

 

Hi John, all,

I also reported the same issue few weeks ago, but without any answer:

http://www.unidata.ucar.edu/mailing_lists/archives/thredds/2010/msg00346.htm
l 

urls provided in that link don't work yet, and updated datasets can be found
here:

http://mandeo.meteogalicia.es/thredds/catalogos/SWAN/swan_catalog.html

but the problem is still the same.

We also developed a tool that allows users request data through NCSS (as
point dataset) by clicking on a map and there you can see a bit of the
problem:

http://sor.meteogalicia.es:8080/mg-web-raia/visor/raia/html/visorRAIA.html?r
equest_locale=en

In the SWAN layers, which have two-dimensional lat/lon, sometimes you don't
get any data because of the server error you mentioned and when you get data
the lat/lon in the NCSS response showed in the popup doesn't match with the
lat/lon on the map.

And regarding netCDFSubset I'm also wondering if there is some underway
solution to the problem with multiple variables with different vertical
coordinates in requests as point dataset.

 

Cheers!     


On April 15, 2011 at 2:37 AM John Maurer <jmaurer@xxxxxxxxxx> wrote:




Aloha TDS Folks,
I've run into a problem trying to download data for several of our
curvilinear grids as point data using the NetCDF Subset Service (NCSS). Not
only are the latitude and longitude returned different from the latitude and
longitude I request (even though I'm supposedly using grid center points
reported via ncWMS), it sometimes produces the following error for latitudes
and longitudes that I know are within bounds and contain valid data (see
error below from threddsServlet.log). It would seem that there is a bug in
how TDS is trying to convert the specified latitude and longitude to grid
coordinates?, which may perhaps be related to these grids being curvlinear
(two-dimensional lat/lon variables)? I was hoping to deploy this soon as a
method for users to download recent data (from our TDS) at a clicked
location within our Google Maps interface. Any help would be greatly
appreciated!
Mahalo,
John Maurer
Pacific Islands Ocean Observing System (PacIOOS)

The full URL for the example request failure would be:

http://oos.soest.hawaii.edu/thredds/ncss/grid/hioos/roms_forec/hiog/HI-ROMS_
Forecast_Model_Run_Collection_best.ncd?accept=csv
<http://oos.soest.hawaii.edu/thredds/ncss/grid/hioos/roms_forec/hiog/HI-ROMS
_Forecast_Model_Run_Collection_best.ncd?accept=csv&var=temp&time_end=2011-04
-15T00:00:00Z&time_duration=PT24H&vertCoord=-0.016666666666666666&point=true
&latitude=21.177492141723633&longitude=-158.25900268554688>
&var=temp&time_end=2011-04-15T00:00:00Z&time_duration=PT24H&vertCoord=-0.016
666666666666666&point=true&latitude=21.177492141723633&longitude=-158.259002
68554688

An example request that succeeds for a nearby location would be:

http://oos.soest.hawaii.edu/thredds/ncss/grid/hioos/roms_forec/hiog/HI-ROMS_
Forecast_Model_Run_Collection_best.ncd?accept=csv
<http://oos.soest.hawaii.edu/thredds/ncss/grid/hioos/roms_forec/hiog/HI-ROMS
_Forecast_Model_Run_Collection_best.ncd?accept=csv&var=temp&time_end=2011-04
-15T00:00:00Z&time_duration=PT24H&vertCoord=-0.016666666666666666&point=true
&latitude=21.087862014770508&longitude=-157.67779541015625>
&var=temp&time_end=2011-04-15T00:00:00Z&time_duration=PT24H&vertCoord=-0.016
666666666666666&point=true&latitude=21.087862014770508&longitude=-157.677795
41015625

threddsServlet.log:

2011-04-14T14:24:57.907 -1000 [  25941269][    5155] INFO  -
thredds.server.ncSubset.GridServlet - doGet(): Remote host: 128.171.151.240
- Request: "GET
/thredds/ncss/grid/hioos/roms_forec/hiog/HI-ROMS_Forecast_Model_Run_Collecti
on_best.ncd?accept=csv&var=temp&time_end=2011-04-15T00:00:00Z&time_duration=
PT24H&vertCoord=-0.016666666666666666&point=true&latitude=21.177492141723633
&longitude=-158.25900268554688 HTTP/1.1"
2011-04-14T14:24:57.928 -1000 [  25941290][    5155] ERROR -
thredds.server.ncSubset.GridServlet - GridServlet.processGridAsPoint
java.lang.ArrayIndexOutOfBoundsException
        at ucar.ma2.Index2D.setDirect(Index2D.java:137)
        at ucar.ma2.ArrayDouble$D2.get(ArrayDouble.java:295)
        at
ucar.nc2.dataset.CoordinateAxis2D.getCoordValue(CoordinateAxis2D.java:76)
        at ucar.nc2.dt.grid.GridCoordSys.getLatLon(GridCoordSys.java:1065)
        at
ucar.nc2.dt.grid.GridAsPointDataset.readData(GridAsPointDataset.java:130)
        at
thredds.server.ncSubset.GridPointWriter.write(GridPointWriter.java:233)
        at
thredds.server.ncSubset.GridServlet.processGridAsPoint(GridServlet.java:298)
        at thredds.server.ncSubset.GridServlet.doGet(GridServlet.java:210)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
thredds.servlet.filter.RequestQueryFilter.doFilter(RequestQueryFilter.java:1
21)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
thredds.servlet.filter.RequestPathFilter.doFilter(RequestPathFilter.java:105
)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:433)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
2011-04-14T14:24:57.929 -1000 [  25941291][    5155] INFO  -
thredds.server.ncSubset.GridServlet - Request Completed - 500 - 0 - 22