Skip to content

Reading *.nc4 data

3 messages · John Wasige, jim holtman, Roy Mendelssohn - NOAA Federal

#
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
#
The message seems to be clear in that either the directory or file is not
where you think it is.  Use 'choose.files()' to navigate to the file and
see what it prints out as the location.


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Mon, Jan 26, 2015 at 1:59 PM, John Wasige <johnwasige at gmail.com> wrote:

            

  
  
#
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:

            
**********************
"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.