Re: [R] Request for help about running a loop and reading .NC files

2020-03-24 Thread David Pierce via R-help
Hey Bhaskar, Dave Pierce here, the author and maintainer of the ncdf4 package. What platform are you working on? If you work on Linux, I'd be happy to send you a new source tar version of the ncdf4 package I've made that handles this case. It now has a settable parameter in nc_open called "return

Re: [R] Lat Lon NetCDF subset

2011-03-21 Thread David Pierce
hgreatrex wrote: > Hi, > > ... > I've managed to extract the lat / lon variables, so I know that I could > work > out manually which pixels correspond to which location. However, it's easy > to make a mistake in such a calculation, so I thought I would check here > before reinventing the wheel. Hi

Re: [R] RNetCDF: retrieving variable names and units

2011-01-12 Thread David Pierce
Hi Jannis, although I don't know how you'd do that with RNetCDF, with the ncdf package it's pretty easy: ncid = open.ncdf( 'file.nc' ) nvars = ncid$nvars for( ivar in 1:nvars ) print(paste("var number",ivar,"is named", ncid$var[[ivar]]$name, "and has units", ncid$var[[ivar]]$units )) Regards

Re: [R] ncdf4 for Windows/R-2.12.0

2010-11-17 Thread David Pierce
David Winsemius wrote: > >> Windows binary: not available, see ReadMe > > Sorry. Then in answer to your second question: > > http://cran.r-project.org/doc/manuals/R-admin.html > > Especially: > http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset > > (At least as I read the t

Re: [R] "non-numeric argument to binary operator" error while reading ncdf file

2010-11-03 Thread David Pierce
Charles Novaes de Santana wrote: > Thank you everybody for the help! The solution of my problem is here: > > http://climateaudit.org/2009/10/10/unthreaded-23/ > > "The mv variable is the designated NA for the variable and it appears that > somebody screwed that up in the file. This workaround worke

Re: [R] ncdf4 package installation in R

2010-10-26 Thread David Pierce
shaticus wrote: > > Hello all, > > I could use some help installing the ncdf4 package in R (under CentOS > 5.4). >... > When I issue an 'install.packages(c('ncdf4')) in R, compilation succeeds > but > I receive the following error during the loading phase of installation: > > ** building package in

Re: [R] ncdf installation in R

2010-10-18 Thread David Pierce
> Sashi Challa wrote: >> >> I am trying to install ncdf package on a Linux 64-bit machine. >> > [...] > > Hi Sashi, > > Just had a similar issue today. I would suggest the --disable-netcdf4 > hasn't > been picked up. > > Try installing an earlier version and using that path instead. > > See: http:/

Re: [R] NetCDF file: adding a variable

2010-09-23 Thread David Pierce
Hi Gennadi, I think this is fixed in the latest version of the ncdf package, which you can access by going to CRAN, then 'packages', then 'ncdf', and clicking on 'URL'. Or here is a direct link: http://cirrus.ucsd.edu/~pierce/ncdf Give that a try and let me know if you still have a problem, --

Re: [R] Help asked for automated generation of ncdf variables

2010-06-29 Thread David Pierce
> Date: Wed, 16 Jun 2010 17:53:56 +0200 > From: "Adolf STIPS" > > Hi, > > I'm using the "ncdf" library for creating ncdf files. > But I need to create about 100 variables per file (e.g. single rivers), > So I do not like to create each variable separately. > > Unfortunately I found no way to make