NGen
|
At present, there is no supported standard installation process.
The quickest way to build and run NGEN is to follow what we do for our model run testing:
First we make a new directory: mkdir ngen && cd ngen
Then clone the github repository: git clone https://github.com/NOAA-OWP/ngen.git
Then we can build with docker: docker build . --file ./docker/CENTOS_NGEN_RUN.dockerfile --tag localbuild/ngen:latest
Install the Linux required packages (package names shown for Centos 8.4.2105):
Clone the NGen repository:
Download the Boost Libraries:
Set the ENV for Boost and C compiler:
Get the git submodules:
Configure NGen using cmake:
In addition to normal CMake options, the following ngen
configuration options are available:
Option | Description |
---|---|
NGEN_WITH_NETCDF | Include NetCDF support |
NGEN_WITH_SQLITE3 | Include SQLite3 support (GeoPackage support) |
NGEN_WITH_UDUNITS | Include UDUNITS support |
NGEN_WITH_MPI | Include MPI (Parallel Execuation) support |
NGEN_WITH_BMI_FORTRAN | Include Fortran BMI support |
NGEN_WITH_BMI_C | Include C BMI support |
NGEN_WITH_PYTHON | Include Python support |
NGEN_WITH_ROUTING | Include t-route integration |
NGEN_WITH_TESTS | Include unit and integration tests |
NGEN_QUIET | Include suppressing unwanted message output |
These can be included by adding
-D{Option:BOOL}=[ON/OFF]
to the following CMake command.
Note: if
-DNGEN_WITH_PYTHON:BOOL=ON
, and you are using an activated virtual environment, then CMake will bind its Python configuration to your virtual environment. This means, when you run thengen
executable, your virtual environment must be activated.
The following CMake command will configure the build:
Build NGen using cmake:
If you want to build with multiple jobs (in parallel), then you can run the following instead:
Running the Model:
Further information on each step:
Make sure all necessary dependencies are installed, and then build the main ngen target with CMake. Then run the executable, as described here for basic use or here for distributed execution. A step by step instruction and install with more options are also provided on our wiki page.