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

Hi all,
here are some tests we did regarding the NetCDF Subset Service for curvilinear
grid as point data issue and could be helpful:

If you sent this opendap request:

http://oos.soest.hawaii.edu/thredds/dodsC/hioos/roms_forec/hiog/runs/HI-ROMS_Forecast_Model_Run_Collection_RUN_2011-04-14T00:00:00Z.ascii?lon_rho[46][60],lat_rho[46][60]
Â



you qet these lon/lat values:-157.495325318087, 21.292617472685
if you use them in a NCSS request like that:
http://oos.soest.hawaii.edu/thredds/ncss/grid/hioos/roms_forec/hiog/runs/HI-ROMS_Forecast_Model_Run_Collection_RUN_2011-04-14T00:00:00Z?var=temp&latitude=21.292617472685&longitude=-157.495325318087&time_start=2011-04-14T00%3A00%3A00Z&time_end=2011-04-21T00%3A00%3A00Z&temporal=point&time=2011-04-14T00%3A00%3A00Z&vertCoord=-0.983333333333333&accept=xml&point=true

the lon/lat you get is: -157.622435719315, 21.1940855899557
so now, if we swap the lon_rho and lat_rho indices and send this request:
http://oos.soest.hawaii.edu/thredds/dodsC/hioos/roms_forec/hiog/runs/HI-ROMS_Forecast_Model_Run_Collection_RUN_2011-04-14T00:00:00Z.ascii?lon_rho[60][46],lat_rho[60][46]

we get...-157.622435719315, 21.1940855899557 (as in the NCSS request!!)Â
And the last one, eta_rho is a 170 length array and xi_rho is an 70 length
array, so let's choose a point with an index bigger than 69 for the eta_rho and
send a request:
http://oos.soest.hawaii.edu/thredds/dodsC/hioos/roms_forec/hiog/runs/HI-ROMS_Forecast_Model_Run_Collection_RUN_2011-04-14T00:00:00Z.ascii?lon_rho[70][60],lat_rho[70][60]

we get: -157.708182949237, 21.3033444376878 and once again if we put that on the
NCSS request:
http://oos.soest.hawaii.edu/thredds/ncss/grid/hioos/roms_forec/hiog/runs/HI-ROMS_Forecast_Model_Run_Collection_RUN_2011-04-14T00:00:00Z?var=temp&latitude=21.3033444376878&longitude=-157.708182949237&time_start=2011-04-14T00%3A00%3A00Z&time_end=2011-04-21T00%3A00%3A00Z&temporal=point&time=2011-04-14T00%3A00%3A00Z&vertCoord=-0.983333333333333&accept=xml&point=true
Â
what I get here is a 500 - Internal server error, and I guess there will be an
ArrayIndexOutOfBoundsException in the threddsServlet.log
So I think it only returns data for requests where the lat/lon matches points
where, in this case, we have both indices for eta_rho, and xi_rho lower than 70,
and it fails any other case.
Â
Cheers!