Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[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 support-netcdf-java@xxxxxxxxxxxxxxxx, 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)
bermudez@xxxxxxxx <mailto:bermudez@xxxxxxxx> - Office: (202) 408-8211
1201 New York Ave. NW Suite 430, Washington DC 20005


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690