-
Notifications
You must be signed in to change notification settings - Fork 112
Quick start
The following data is the minimum necessary to start a simulation with near bare ground, for a single polygon.
- Meteorology data with sub-daily resolution (recommended between 15 min to 6hr)
- Radiation data, with sub-daily resolution (recommended between 15 min to 1hr)
- ED2IN Namelist with the appropriate configuration.
- Land/sea fraction (only land points are solved by ED)
- Soil texture map (homogeneous soil type is an option, but not recommended).
- Tree-level inventory data (minimum: species, DBH)
- Soil Carbon stocks
- Soil texture profile (assumed homogeneous if not provided).
- Leaf phenology data
- Model & PFT parameters
- Land use change data (assumed inexistent if not provided).
From the data above you then need to build:
- Vegetation I.C. Files (*.pss, *.css)
- Meteorology/Radiation B.C. files (hdf5)
- ED2IN settings file
- Soil texture and depth databases (hdf5) OR Site file (*.site, used when running with IRESTYPE = 3.)
- XML parameter file (optional)
- Phenology B.C. (optional)
- Land Use B.C. (optional)
- Fortran compiler (recommended ifort or gfortran)
- C compiler (recommended icc or gcc)
- MPI
- HDF5
- Check out most recent code using git following instructions https://github.com/EDmodel/ED2/wiki/Using-Github-with-ED2
To compile the model on an Ubuntu machine, execute the following commands
sudo apt-get update # Updates application information
sudo apt-get install git # Skip if you have Git already
sudo apt-get install gcc # You probably want the latest GCC
sudo apt-get install gfortran # Dito for gfortran (unless it's after 4.8 and doesn't support -fno-whole-file)
sudo apt-get libopenmpi-dev # This should always get the latest version of openmpi, a requirement
sudo apt-get openmpi-doc # Documentation
sudo apt-get openmpi-bin # Standalone binaries
sudo apt-get install libhdf5-openmpi-dev # If fails try 'sudo apt-cache hdf5' to see what's available
sudo apt-get install libhdf5-tools # Ditto. Installs e.g. h5dump, which you probably want.
Next, move to the directory in which you'd like to install ED and clone the main repo:
git clone https://github.com/EDmodel/ED2.git
The ED installation will require the following library files:
- libhdf5.a
- libhdf5_fortran.a
- libhdf5_hl.a
/usr/lib/x86_64-linux-gnu/
if you've got a 64-bit machine.
Once you've cloned the mainline and set up HDF5, OpenMPI, and a compiler, navigate to ED2/ED/build/
and type install.sh
.
If the installation fails as a result of missing dependencies, you can use e.g. find / -name libhdf5.a
to try to locate them. You may also need to change the paths specified in the HDF5_LIBS variable found in the include.mk.[opt].[platform]
file being used for your installation, and your HDF5_HOME variable to properly reflect the location of hdf5.mod. One way of finding hdf5.mod, if the compilation does not, is to type which h5dump
the HDF5_HOME environment variable should be set to whatever the path preceeding /bin/h5dump
is.
If none of the include.mk.[opt].[platform]
files found in ED/build/make/
are tagged with your computing platform (e.g. bnl
for Brookhaven National Labs, odyssey
for Harvard, gfortran
for generic *nix machines such as ubuntu or potentially Macs, or macosx
for, obviously OSX) you can create a new one.
These files are used to specify the following:
- compiler and loader names
- compiler and loader flags
- to-be-linked library information necessary to build ED
- the locations of directories/files to be
include
ed via compiler-I
flags
include.mk.opt.[platform]
and create a softlink to it (in the same folder) with the name include.mk.dbg.[platform]
. By convention, this file should take a make variable KIND_COMP
of type A
through E
to choose between sets of flags, A
for maximal debugging and E
for maximal optimization. If you are using gfortran, you may need to change the CMACH compiling flag in include.mk.opt.[platform]
file from CMACH=PC_LINUX1
to CMACH=PC_GFORTRAN
.
Also, note that you can also set multiple working versions. Additional details at https://github.com/EDmodel/ED2/wiki/Using-Github-with-ED2
Single polygon runs must be run in serial mode. To run this, simply copy or link the executable to the same directory where the ED2IN file you modified is located, then type:
> ./ed_2.1-opt
In case your namelist is called anything other than ED2IN, you must provide the correct name using the -f option
> ./ed_2.1-opt -f my-ED2IN
Regional runs can be run using MPI. In this case, you must submit the job with the mpirun command:
> mpirun -np [n] ./ed_2.1-opt
where [n] is the number of processors to use. The -f option also works in parallel simulations.