Environmental Fluid Dynamics Code (EFDC) is a multifunctional surface water modeling engine that includes hydrodynamic, sediment-contaminant, and eutrophication components designed to simulate aquatic systems in one, two, and three dimensions. The solver is parallelised with a hybrid MPI + OpenMP strategy.
Over the years, DSI has continued developing EFDC and into what is now known as EFDC+. To learn more about different versions of EFDC, please visit A Review of EFDC Versions - EEMS Blog
After you Prepare your environment.
Execute the following:
git clone https://github.com/dsi-llc/EFDC_Plus.git
cd EFDC_Plus
chmod -x toolkit-setup.shRun the setup script and pass in your package manager parameter (ubuntu users would use apt).
If you want to be able to compile the code, use option -c.
If you just want to be able to run efdc, use option -r.
toolkit-setup.sh <-r or -c> <package manager name>
# example: toolkit-setup -r aptAlternatively, you can download and follow the installation steps from intel:
Intel OneApi Base Toolkit
Intel OneApi HPC Toolkit
Load the intel environment variables.
source /opt/intel/oneapi/setvars.shInstall the required dependencies (Ubuntu/Debian):
sudo apt update
sudo apt install cmake build-essential pkg-config m4
sudo apt install hdf5-tools hdf5-helpers libhdf5-dev libhdf5-serial-dev
sudo apt install libnetcdf-dev libnetcdf-c++4-devInstall NetCDF-Fortran. The CMake build system searches for NetCDF-Fortran in ~/software/netcdf-fortran by default, or you can set the NETCDF_FORTRAN_ROOT environment variable to point to your installation:
sudo apt install libnetcdf-fortran-devOr, to build from source into ~/software/netcdf-fortran:
export FC=mpiifx F77=mpiifx F90=mpiifx
./configure --prefix=$HOME/software/netcdf-fortran
make check && make install
source $HOME/software/setup_netcdf_env.sh # if generated by setup scriptVerify NetCDF is installed correctly:
nc-config --all
nf-config --allmkdir build && cd build
cmake ..
cmake --build . -j$(nproc)mkdir build && cd build
cmake .. -DUSE_GFORTRAN=ON
cmake --build . -j$(nproc)| Option | Default | Description |
|---|---|---|
USE_GFORTRAN |
OFF | Use gfortran instead of Intel Fortran |
USE_STATIC_NETCDF |
OFF | Link NetCDF/HDF5 statically |
ENABLE_FAST_MATH |
OFF | Enable fast math optimizations |
ENABLE_PROFILING |
OFF | Enable profiling support |
CUSTOM_EXE_NAME |
(empty) | Override the output executable name |
For a debug build:
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . -j$(nproc)
# produces efdc_debugThe run command structure is
cd /path/to/project
mpiexec -n <number of nodes> path/to/efdc -NT<number of omp threads>An example of a run command for a model with 4 mpi domains, running with 6 omp threads per domain (24 cpu cores total) would look like:
mpiexec -n 4 ~/code/efdc/build/efdc -NT6
-
Install Visual Studio:
Visual Studio Downloads -
Install the Intel Toolkits:
Intel OneApi Base Toolkit
Intel OneApi HPC Toolkit -
Clone the EFDC_Plus repository: https://github.com/dsi-llc/EFDC_Plus.git
-
Open the .sln file at the root of the repository.
The open source availability of this code will make it easier for scientists, researchers, and developers to contribute to the code and build more trust in their models. We welcome all the opportunities to collaborate. If you would like to contribute to the source code development, please clone the repository and submit pull requests as needed. For more active contribution and role, please email admin@ds-intl.biz