-
Notifications
You must be signed in to change notification settings - Fork 15
Patching NetCDF
- download a copy of the NetCDF 4.2 source. The package that we built the patch against was build on Oct 24, 2011 The NetCDF Java download website is here: http://www.unidata.ucar.edu/downloads/netcdf/netcdf-java-4/index.jsp
An ftp link for the package we used for the patch can be found here: ftp://ftp.unidata.ucar.edu/pub/netcdf-java/v4.2/ncSrc-4.2.zip
We downloaded the zip file with this command
wget ftp://ftp.unidata.ucar.edu/pub/netcdf-java/v4.2/ncSrc-4.2.zip
and we downloaded that file into this directory
/install/netcdf42
-
unzip your zip file. Our command looked like this
unzip ncSrc-4.2.zip
-
download the NetCDF patch from github a) install git. On Ubuntu this command does the trick
sudo apt-get install git
b) configure git via these two commands
git config --global user.name "Joe Smith"
git config --global user.email "[email protected]"
c) create a directory to hold the source code. Ours is at /hub/SciHadoop
d) cd into that directory
e) run git init
f) add the remote repository like so (we named the remote repo scihadoop)
git remote add hub/scihadoop git://github.com/four2five/SciHadoop.git
git fetch hub/scihadoop
git checkout -b scihadoop hub/scihadoop/master
g) copy the NetCDF patch into the NetCDF source directory, in our case that is /install/netcdf42
cp netcdf_path/netcdf42.diff /install/netcdf42/
h) install ant. On Ubuntu, this command will do that
sudo apt-get install ant
i) cd into the cdm directory and run this command
ant makeMainComplete
j) within the cdm directory, there should now be a directory named target
. Within target, there is a jar file named netcdfAll-4.2.jar
. This is the NetCDF library that SciHadoop will use.
k) add the NetCDF library to your CLASSPATH and HADOOP_CLASSPATH environment variables.
In your ~/.bashrc file, add this line (assuming you build the NetCDF library in /install/netcdf
):
CLASSPATH=$CLASSPATH:/install/netcdf/cdm/target/netcdfAll-4.2.jar
and then, in the conf/hadoop-env.sh
file located in your hadoop installation (our Hadoop installation is at /install/hadoop-0.20.203.0
), add this line
export HADOOP_CLASSPATH=/install/netcdf/cdm/target/netcdfAll-4.2.jar