[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: openig dods url with java library



Luis Bermudez wrote:
Hi John,

One quick question.. what is the best way to open a dods url using the NetCDF java 4 library. For example:

http://www.smast.umassd.edu:8080/thredds/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM2_FORECAST.nc.dods?lon[26559],lat[26559],Times[0:1:72],zeta[0:1:72][26559] <http://www.smast.umassd.edu:8080/thredds/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM2_FORECAST.nc.ascii?lon%5B26559%5D,lat%5B26559%5D,Times%5B0:1:72%5D,zeta%5B0:1:72%5D%5B26559%5D>

Hi Luis:

NetcdfDataset.openDataset(" http://www.smast.umassd.edu:8080/thredds/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM2_FORECAST.nc";); <http://www.smast.umassd.edu:8080/thredds/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM2_FORECAST.nc.ascii?lon%5B26559%5D,lat%5B26559%5D,Times%5B0:1:72%5D,zeta%5B0:1:72%5D%5B26559%5D>

then you have to read each variable separately using

Variable.read(section);

BTW, send email to address@hidden, as it will get answered faster. thanks



I have tried all the combinations ( adding dods prefix, removing dods before ? etc..) but I always get

Exception in thread "main" java.lang.IllegalArgumentException: Invalid uri ...

I am using
NetcdfDataset netcdfdataset = NetcdfDataset.openDataset(url);
thanks for your help !

-luis

--
Luis Bermudez Ph.D.
Coastal Research Technical Manager
Southeastern Universities Research Association (SURA)
address@hidden <mailto:address@hidden> - Office: (202) 408-8211
1201 New York Ave. NW Suite 430, Washington DC 20005