[R] Problem downloading and opening netcdf file

D Kelly O'Day koday at processtrends.com
Wed Nov 17 15:54:37 CET 2010


I am trying to download and open an on-line netcdf file. 

I'm using Windows XP and R 2.11.1

Here's my script

  library(ncdf)
  link <-
"http://ibis.grdl.noaa.gov/SAT/SeaLevelRise/slr/slr_sla_gbl_free_all_66.nc"
  dest <-  "C:/temp/slr_sla_gbl_free_all_66.nc"
  download.file(url=link,destfile=dest) 
  nc1 <- open.ncdf(dest)

The file appears in my C:/temp directory, however I can not open() it, I get
this error message:

>   nc1 <- open.ncdf(dest)
Error in open.ncdf(dest) : 
  Error in open.ncdf trying to open file C:/temp/slr_sla_gbl_free_all_66.nc
> 

I can manually download and save the netcdf file and then open it. I'd like
to be able to automate the download and open process within my script.

Any suggestions?



-- 
View this message in context: http://r.789695.n4.nabble.com/Problem-downloading-and-opening-netcdf-file-tp3046897p3046897.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list