This repository contains the regression tests for WRF-SFIRE. The tests ensure the correctness and stability of the software by comparing the output of different versions or configurations.
To run the regression tests, you need to have the following dependencies installed:
- GNU compilers
- NetCDF and HDF5 (as needed by WRF)
- Python >= 3.8 with the following libraries:
- f90nml
- netCDF4 < 2.0
- NumPy < 2.0
- Pandas
To install the dependencies using conda:
conda env create -f install/regression.yml
To use the tools provided by this library, you need to follow these steps:
-
Activate the conda environment
conda activate regression
-
Copy the Configuration Template
Copy the
config.json_template
file toconfig.json
. This file will be used to configure the regression tests according to your specific needs. You can find the template file in the root directory of the library.cp config.json_template config.json
-
Edit the Configuration File
Open the
config.json
file using a text editor and replace the words in CAPITALS with the appropriate values for your use case. While replacing other parameters in the file is optional, it is recommended only if you have a good understanding of their purpose and implications. -
Run the Regression Test
The regression test will clone two versions of WRF-SFIRE as specified in the configuration file. It takes the list of cases to run from the first version, called reference version, which needs to have the file test/em_sfire/regression.json with a description of cases to run.
To run the regression test, run the following command:
python regression.py config.json >& regression.log &
The code will create a file
reg_tests.json
describing metadata for the regression tests. -
Validate the Regression Test
To validate the results of the regression test, first wait until all the jobs finish running, then use the following command:
python ncdiff4.py
The code will create a table comparing the results in the file
reg_test_results.csv
.