[Rd] ncdf with opendap/dods support
Russell Moffitt
Russell.Moffitt at noaa.gov
Wed Apr 27 05:03:59 CEST 2005
Aloha,
I just made some quick hacks on the configure script with the 'ncdf'
package to make it link with the opendap/dods libraries (opendap.org)
rather than the netcdf api library. Basically, this allows a user to
interact in R with a remotely served dataset as if it were a netcdf file
on the local filesystem (read-only). Functionality with local files
should continue to work as well. This opendap feature should be greatly
useful for a number of fields of scientific computing, including
oceanography and climate modelling, where a huge number of data sets are
already served via opendap around the world.
In order to do this, the user must install the opendap/dods netcdf
libraries on the system and then run
R CMD INSTALL --configure-args="-with-dods=$DODS_INSTALL_DIR"
ncdf_1.3-dods.tar.gz
where $DODS_INSTALL_DIR is wherever the opendap lib and include
directories are found.
My modifications are small and unelegant, but it works, providing that
the user can successfully install the opendap libraries. I am neither a
compile guru nor do I have very much experience using and developing for
R. Therefore, I would like to see if anyone would be willing to help me
make this modification into a more official package/patch that can be
shared with other R users. The biggest obstacle for me is making
binaries for Windows. Precompiled opendap libraries are available for
windows, so this should be possible. B Ripley has compiled the 'ncdf'
package for windows, and this version should be exactly the same except
for different external libraries.
This same modification should also be possible for the RNetCDF/nvar
packages since they use the same support libraries. I just happened to
try it with ncdf first. Which package do more people tend to use/like
for accessing netcdf files?
Please let me know if you can provide some assistance in making this
modified package as easy to install as possible on
unix/linux/windows/etc... I can provide more info about the opendap
library and what is required to link to it if you ask.
Mahalo,
Russell
P.S. I imagine that this opendap support in R will allow us to list R
on opendap.org's list of client applications, giving R some more exposure.
More information about the R-devel
mailing list