[R] Reading *.nc4 data

Roy Mendelssohn - NOAA Federal roy.mendelssohn at noaa.gov
Mon Jan 26 21:52:48 CET 2015


I don’t think the ncdf library open netcdf4 files, which your file would seem to be.  You need the library ncdf4 for that.  For variety of reasons perhaps others can explain, ncdf4 for Windows is not on CRAN.  You can download it from:

http://cirrus.ucsd.edu/~pierce/ncdf

-Roy

On Jan 26, 2015, at 10:59 AM, John Wasige <johnwasige at gmail.com> wrote:

> Dear all,
> 
> i get the following error when reading *.nc4 data:
> 
> Error in R_nc_open: No such file or directoryError in
> open.ncdf("D:/Ag/rst_1980_prate.nc4") :
>  Error in open.ncdf trying to open file D:/Ag/rst_1980_prate.nc4
> 
> 
> library("ncdf")
> prec <- open.ncdf("D:/Ag/rst_1980_prate.nc4")
> lons <- get.var.ncdf(prec,"lon")
> lats <- get.var.ncdf(prec,"lat")
> time <- get.var.ncdf(prec,"time")
> 
> What could be the problem
> 
> thanks for your help
> -- 
> John
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new address and phone***
110 Shaffer Road
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.



More information about the R-help mailing list