This library provides all of the source code for NFDRS Version 4.0 including the Nelson Dead Fuel Moisture Model, the Growing Season Index-based Live Fuel Moisture Model, the NFDRS calculator, and NFDRS Spatial.
Also produces three apps: the FireWxConverter, NFDRS4_cli (command line interface), and NFDRS4_spatial.
FireWxConverter: Converts FW13 fire weather data files to FW21 fire weather data files.NFDRS4_cli: Produces live and dead fuel moistures as well as NFDRS indexes from FW21 fire weather data files.NFDRS4_spatial: Allows running the NFDRS4 code in a spatial grid (with NETCDF files for I/O).
- CMake: Requires CMake version 3.8 or higher.
- Config4cpp: See http://www.config4star.org/. Used for defining configuration files for
NFDRS4_cliand NFDRS4 initialization (station) parameters. The complete source is included in theextern/directory and must be built to produce a static library. - utctime: See http://paulgriffiths.github.io/utctime/documentation/index.html. Used for handling time in NFDRS4. The complete source is in the
lib/utctimedirectory.
- Open the x64 Native Tools Command Prompt for VS 2022.
- Navigate to the
NFDRS4/extern/config4cppdirectory. - Run:
nmake -f Makefile.win all64 - This produces
config4cpp.libinNFDRS4/extern/config4cpp/lib.
- Open the NFDRS4 folder in Visual Studio 2022 (it will load as a CMake project).
- Select Project -> CMake Settings for NFDRS4.
- Create an x64-Release configuration.
- Save the settings (CMake will run).
- Edit
CMakeSettings.json:- Set
CONFIG4CPP_DIRto<REPO_LOCATION>/NFDRS4/extern/config4cpp/include(e.g.,D:/Repos/NFDRS4/extern/config4cpp/include). - Set
CONFIG4CPP_LIBto<REPO_LOCATION>/NFDRS4/extern/config4cpp/lib/config4cpp.lib(e.g.,D:/Repos/NFDRS4/extern/config4cpp/lib/config4cpp.lib).
- Set
- Save
CMakeSettings.json(CMake will run). - Select Build -> Build All.
- Select Build -> Install NFDRS4.
This creates an install folder with include and lib files for NFDRS4 and fw21, along with NFDRS4_cli.exe and FireWxConverter.exe.
- Navigate to
NFDRS4/extern/config4cppin a terminal. - Run
make. This createslibconfig4cpp.ainNFDRS4/extern/config4cpp/lib. - Navigate back to the NFDRS4 directory.
- Create a
build/directory andcdinto it - Run
cmake .. - Edit
CMakeCache.txt:- Set
CONFIG4CPP_DIR(e.g.,/home/<user>/src/NFDRS4/extern/config4cpp/include). - Set
CONFIG4CPP_LIB(e.g.,/home/<user>/src/NFDRS4/extern/config4cpp/lib/libconfig4cpp.a).
- Set
- Run
make. - Run
sudo make install(Optional).
cdintobuild/bin- Run
./NFDRS4_spatial
NFDRS4 is public domain software, still under development.