This model is designed to be a simplified (conceptual) model of the National Water Model, which is functionally equivalent.
CFE was written by Fred Ogden, and this repository includes a Basic Model Interface (BMI) to run the CFE
There are actually multiple ways to run the CFE.
- As written by the original author. This includes a full program to read and process atmospheric forcing data, print the model output and check for mass balance closure. This code can be run from the
original_author_code
directory. - Through the BMI commands. This method will be used by the Next Generation U.S. National Water Model (Nextgen NWM). The
make_and_run_bmi.sh
script in the main directory does that for you through a main run file in the./src
directory.
The user has the option to pick a particular direct runoff (aka surface partitioning) method:
- Schaake function (configuration:
surface_partitioning_scheme=Schaake
) - XinanJiang function (configuration:
surface_partitioning_scheme=Xinanjiang
). When using this runoff method the user must also include three parameters.
- a_Xinanjiang_inflection_point_parameter
- b_Xinanjiang_shape_parameter
- x_Xinanjiang_shape_parameter
The BMI functionality was developed as a standalone module in C. To compile this code the developer used these steps:
module load gnu/10.1.0
gcc -lm ./src/main.c ./src/cfe.c ./src/bmi_cfe.c -o run_bmi_cfe
This should generate an executable called run_cfe_bmi. To run this executable you must pass the path to the corresponding configuration file:./run_bmi_cfe ./configs/cat_58_bmi_config_cfe.txt
Included in this repository is an environment file (env_cheyenne.sh), and a "make and run" file (make_and_run_bmi.sh), which will compile the code and run an example. If you are on the Cheyenne computer, or if you can modify these files to your machine, you can simply follow these two steps to run this code:source env_cheyenne.sh
./make_and_run_bmi.sh
The CFE was designed to read its own forcing file, but we have added an option to get forcings passed in through BMI. To test this functionality we need to also include the AORC BMI model when compiling. The steps are very similar to the example above, but with just adding two additional src files, which come from the AORC BMI Module in the forcing_code
directory.
module load gnu/10.1.0
gcc -lm ./src/main_pass_forcings.c ./src/cfe.c ./src/bmi_cfe.c ./forcing_code/src/aorc.c ./forcing_code/src/bmi_aorc.c -o run_cfe_bmi_pass_forcings
This should generate an executable called run_cfe_bmi_pass_forcings. To run this executable you must pass the path to the corresponding configuration files for BOTH CFE and AORC (in that order):./run_cfe_bmi_pass_forcings ./configs/cat_89_bmi_config_cfe_pass.txt ./configs/cat_89_bmi_config_aorc.txt
The CFE has functionality to remove mass through evapotranspiration (directly from precipitation and from soil using the Bydukko function). The steps to test this functionality are very similar to the example above, but with just adding two additional src files, which come from the AORC BMI Module in the forcing_code
directory.
module load gnu/10.1.0
gcc -lm ./src/main_cfe_aorc_pet.c ./forcing_code/src/pet.c ./forcing_code/src/bmi_pet.c ./src/cfe.c ./src/bmi_cfe.c ./forcing_code/src/aorc.c ./forcing_code/src/bmi_aorc.c -o run_cfe_aorc_et_bmi
This should generate an executable called run_cfe_bmi_pass_forcings. To run this executable you must pass the path to the corresponding configuration files for ALL CFE, PET and AORC (in that order):./run_cfe_aorc_et_bmi ./configs/cat_89_bmi_config_cfe_pass.txt ./configs/cat_89_bmi_config_aorc.txt ./configs/cat_89_bmi_config_pet_pass.txt
make clean
make (the resulting executable is moved to parent directory in the Makefile script)
cd ..
./run_cfe_bmi ./configs/cat_89_bmi_config_cfe.txt
t-shirt approximation of the hydrologic routing functionality of the National Water Model v 1.2, 2.0, and 2.1
This code was developed to test the hypothesis that the National Water Model runoff generation, vadose zone dynamics, and conceptual groundwater model can be greatly simplified by acknowledging that it is truly a conceptual model. The hypothesis is supported by a number of observations made during a 2017-2018 deep dive into the NWM code. These are:
- Rainfall/throughfall/melt partitioning in the NWM is based on a simple curve-number like approach that was developed by Schaake et al. (1996) and which is very similar to the Probability Distributed Moisture (PDM) function by Moore, 1985. The Schaake function is a single valued function of soil moisture deficit, predicts 100% runoff when the soil is saturated, like the curve-number method, and is fundamentally simple.
- Run-on infiltration is strictly not calculated. Overland flow routing applies the Schaake function repeatedly to predict this phenomenon, which violates the underlying assumption of the PDM method that only rainfall inputs affect soil moisture.
- The water-content based Richards' equation, applied using a coarse-discretization, can be replaced with a simple conceptual reservoir because it never allows saturation or infiltration-excess runoff unless deactivated by assuming no-flow lower boundary condition. Since this form of Richards' equation cannot simulate heterogeneous soil layers, it can be replaced with a conceptual reservoir.
- The lateral flow routing function in the NWM is purely conceptual. It is activated whenever the soil water content in one or more of the four Richards-equation discretizations reaches the wilting point water content. This activation threshold is physically unrealistic, because in most soils lateral subsurface flow is not active until pore water pressures become positive at some point in the soil profile. Furthermore, the lateral flow hydraulic conductivity is assumed to be the vertical hydraulic conductivity multiplied by a calibration factor "LKSATFAC" which is allowed to vary between 10 and 10,000 during calibration, resulting in an anisotropy ratio that varies over the same range, without correlation with physiographic characteristics or other support.
This code implements these assumptions using pure conceptualizations. The formulation consists of the following:
- Rainfall is partitioned into direct runoff and soil moisture using the Schaake function.
- Rainfall that becomes direct runoff is routed to the catchment outlet using a geomorphological instantaneous unit hydrograph (GIUH) approach, eliminating the 250 m NWM routing grid, and the incorrect use of the Schaake function to simulate run-on infiltration.
- Water partitioned by the Schaake function to be soil moisture is placed into a conceptual linear reservoir that consists of two outlets that apply a minimum storage activation threshold. This activation threshold is identical for both outlets, and is based on an integral solution of the storage in the soil assuming Clapp-Hornberger parameters equal to those used in the NWM to determine that storage corresponding to a soil water content 0.5 m above the soil column bottom that produces a soil suction head equal to -1/3 atm, which is a commonly applied assumption used to estimate the field capacity water content. The first outlet calculates vertical percolation of water to deep groundwater using the saturated hydraulic conductivity of the soil multiplied by the NWM "slope" parameter, which when 1.0 indicates free drainage and when 0.0 indicates a no-flow lower boundary condition. The second outlet is used to calculate the flux to the soil lateral flow path, using a conceptual LKSATFAC-like calibration parameter.
- The lateral flow is routed to the catchment outlet using a Nash-cascade of reservoirs to produce a mass-conserving delayed response, and eliminates the need for the 250 m lateral flow routing grid.
- The groundwater contribution to base flow is modeled using either (a) an exponential nonlinear reservoir identical to the one in the NWM formulation, or (b) a nonlinear reservoir forumulation, which can also be made linear by assuming an exponent value equal to 1.0.
This code was written entirely by Fred L. Ogden, May 22-24, 2020, in the service of the NOAA-NWS Office of Water Prediction, in Tuscaloosa, Alabama.