Unix/Linux/Mac用户====================要从源代码构建ncdfFlow包,确保HDF5库存在于您的系统中:如果HDF5安装到一些非标准位置,您可以传递环境变量——with-hdf5指向HDF5的正确位置,例如,R CMD INSTALL ncdfFlow_x.y.z.tar.gz——configure-args="——with-hdf5='/path/ To '"在'/path/ To '下,您应该找到包含HDF5头文件和共享库的"include"和"lib"子文件夹。Windows用户=============您需要安装netcdf4库(>=4.0.1)。最简单的方法是从http://www.unidata.ucar.edu/netcdf/win_netcdf/netCDF4.3.1-rc2-NC4-32.exe安装预先构建的netcdf4二进制文件。为了成功加载这个包,你需要告诉R在哪里可以找到netcdf.dll。您必须确保.dll文件(以及来自deps/shared/bin的任何依赖项)都在系统路径上。要添加此文件,您可以右键单击“我的计算机”,选择“属性”,选择“高级”选项卡,然后单击按钮“环境变量”。在打开的对话框中,点击变量列表中的“Path”,然后点击“Edit”。在“变量值”字段中增加“c:/netcdf4/bin/”和“c:/netcdf4/deps/shared/bin”(假设netcdf安装在“c:/netcdf4”中)。重要的是,文件路径不包含任何空格字符;为了避免这种情况,你可以简单地使用在Windows命令行中键入“dir /x”找到的短形式(8.3 DOS文件名)。例如,可以在“Path”环境变量中添加以下内容:C:/PROGRA~1/netcdf4/bin,并使用符号“;”将其与现有路径分开。 Also in order to build ncdfFlow from source using Rtools, you need to tell ncdfFlow where your netcdf library and header files are. You can do that by setting up the environment variable LIB_NETCDF with the correct path to the library files and header files. You can do this by going to the "Environment Variables" dialog box as instructed above and then clicking the "New" button. Enter "LIB_NETCDF" in the "Variable name" field, and lib directory (e.g. "c:/netcdf4") in the "Variable value" field. Remember to use "/" instead of "\" as the directory delimiter. You can download Rtools at http://www.murdoch-sutherland.com/Rtools/ which provides the resources for building R and R packages. You should add to the Path variable the paths to the various components of Rtools. Please read the "Windows Toolset" appendix at http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset for more details.