[R-sig-Geo] netcdf library on OS X
Chris Waigl
chris.waigl at gi.alaska.edu
Wed May 15 01:21:43 CEST 2013
On May 14, 2013, at 2:42 PM, Andy Bunn wrote:
> I was a former user of RNetCDF under Windows. I've switched to Mac and all is well. Almost all. RNetCDF (reasonably) would like to have netcdf and udunits from unidata installed on the machine prior to using the RNetCDF. Correct? And, unless I am missing something basic it appears that I have to install those tools from src and not from a prebuilt binary. Is that correct? I am willing to do so but think it's unlikely that's the way most folks do it. Not to be a luddite, but isn't there a DMG with netcdf and udunits for Os X out there?
>
> If I do install from source, looking at the docs it appears I would try something like:
> tar -xzvf netcdf-4.3.0.tar.gz
> cd netcdf-4.3.0
> ./configure --disable-netcdf-4 --enable-shared
> make check install
I have had good experience following the instructions to install NetCDF from source as described here: http://www.unidata.ucar.edu/software/netcdf/docs/building.html (both Fortran and C libraries for my own use case). This was once on OS X and multiple times on GNU/Linux. This is if you REALLY want to go the install-from-source route.
HOWEVER. On OS X I have made very good experience with using the homebrew package management system http://mxcl.github.io/homebrew/ (or https://blog.engineyard.com/2010/homebrew-os-xs-missing-package-manager), including for NetCDF and udunits. This is currently the case on both my main environments where I call the libraries from R and from Python (plus use the NCO tools, NCView etc.).
Chris Waigl
More information about the R-sig-Geo
mailing list