-
Notifications
You must be signed in to change notification settings - Fork 114
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 ED2)
- 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:
- Meteorology/Radiation boundary condition files (hdf5)
- ED2IN settings file
- Soil texture and depth databases (hdf5) OR Site file (*.site, used when running with IRESTYPE = 3.)
- Vegetation Initial Condition Files (*.pss, *.css) (optional).
- XML parameter file (optional)
- Phenology boundary conditions (optional)
- Land Use boundary conditions (optional)
- Fortran compiler. We recommend ifort or gfortran.
- C compiler. We recommend icc or gcc. Make sure that the C compiler is consistent with the Fortran compiler
- HDF5. The HDF5 libraries must be compatible with the Fortran and C compilers.
- MPI (optional). MPI libraries are only used in regional (multi-polygon) simulations. If this is your case, make sure that MPI libraries are compatible with the Fortran and C compilers you are using.
- Check out most recent code using git following instructions available in this link.
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 <code>GCC</code>
sudo apt-get install gfortran # You probably want the latest <code>gfortran</code>
sudo apt-get install libhdf5-openmpi-dev # In case it fails, try 'sudo apt-cache hdf5' to see what is available.
sudo apt-get install libhdf5-tools # Installs e.g. h5dump, which you probably want.
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
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
To install ED2, you must have 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 the compilers, HDF5 libraries, and optionally the MPI libraries, navigate to ED2/ED/build/make
. In case you are part of a group that already uses ED2, the correct configuration file may be already included in the ED2 distribution:
- include.mk.bnl. Brookhaven National Labs.
- include.mk.bu_geo. Boston University.
- include.mk.cannon. Harvard's Cannon cluster (formerly known as Odyssey).
- include.mk.sdumont. Santos Dumont Cluster (LNCC).
- include.mk.ugent. Ghent University.
include.mk.gfortran
or include.mk.intel
to a unique file (e.g. include.mk.mylab
), and make sure to edit it. For more information, check the compiler instructions page.
To compile ED2, navigate to ED2/ED/build/make
, where you should find the install.sh
script.
The install.sh calls the Makefile as well as any script needed for compilation. The script accepts the following options.
-
-p [PLATFORM] or --platform [PLATFORM] . This selects with platform (system) to use. There must be an include.mk.[PLATFORM] file in the make directory. In case no platform is provided, the script assumes
--platform gfortran
. - -c or --clean. This removes the compilation defined by the platform.
-
-k [KIND] or --kind [KIND]. For some platforms, there are multiple pre-defined options to compile more strict checks (useful for debugging) or less strict checks (useful for production). Typically KIND = A is the most strict option, and KIND = E is the least strict (fastest) option. If not provided, the installation will assume
--kind E
. - -g or --gitoff. Use this option in case you do not want the git commit label attached to the executable name.
-
-s [STEP] or --step [STEP]. This option is used only when the code is being compiled with interface check settings (normally ifort compiler with
--kind A
). To thoroughly check interfaces, you must compile the code in 3 steps. 1. Generate interfaces; 2. Clean compilation except for the interface modules; 3. Re-compile, this time checking interfaces.
./install.sh -k E -p intel -g
If installation is successful, you should see a message similar to this:
Finished building === ed_2.2-opt-master-e6xy61a9
Also, note that you can also set multiple working versions. Additional details at Using-Github-with-ED2
Single polygon runs must be run in serial mode. To run this, simply copy or link the executable (for example, ed_2.2-opt-master-e6xy61a9
to the same directory where the ED2IN file you modified is located, then type:
> ./ed_2.2-opt-master-e6xy61a9
In case your namelist is called anything other than ED2IN, you must provide the correct name using the -f option
> ./ed_2.2-opt-master-e6xy61a9 -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.2-opt-master-e6xy61a9
where [n] is the number of processors to use. The -f option also works in parallel simulations.