Sacramento SMA
The SMA project/module provides a soil moisture model for the Soil Moisture Estimator tool and implements a custom C interface to the National Weather Service/University of Arizona Sacramento Soil Moisture Accounting (SMA) model.
Contents
SMA Module Files
There are four C programs which make up the module.
The first two below are interface contributions:
- ini.c reads ini style input variables from [1] - sma.c interfaces between the SME and the SMA model from Agrineer
The next two implement the actual model:
- sacramento_state.c (a version of sac_sma.c) - fland1.c
and were originally part of the MOSCEM package developed at University of Arizona by Yuqiong Liu and others. Permission to use and distribute these files was granted by Professor Hoshin Gupta (University of Arizona) on 2009-08-28.
The last two programs were originally downloaded from Google's cached copy of http://info.science.uva.nl/ibed/research/Research_Fields/cbpg/software/code/moscem.0.tar.gz 2009-08-20 by Felix Andrews. IndieCompLabs, LLC. makes no claim on sac_sma.c (sacramento_state.c) or fland1.c.
For an R language version go to [2]. Many descriptive phrases on the model come from Hydromad.
Implementation
The SMA module is part of the SME project and can be downloaded from here. The SMA module is in the Sacramento directory.
The sma.c program can be run standalone. To create the sma executable, type "make" in the Sacramento directory. The executable is moved to its parent directory for use.
Usage:
sma -c config_file
Where the configuration file holds "ini" parameters for:
loads - Filepath to atmospheric loads (precip and et) data, described below. soil - Filepath to soil attribute data, described below. output - Filepath to output report, described below. rain - Optional filepath for local rain input data. Overrides climate model rain data. irr - Optional filepath for irrigation events. Events count as precipitation and are added to the precip input data.
An example configuration file:
[FILES] loads = /home/agrineer/sma/input/loads.csv soil = /home/agrineer/sma/input/soil.csv output = /home/agrineer/sma/input/output.csv rain = /home/agrineer/sma/input/rain.csv irr = /home/agrineer/sma/input/irr.csv
Note that when used with the SME the configuration file is constructed on the fly.
Input file format and variable description
Atmosphereic Loads
Soil Attributes
Local Rain Events
=== Irrigation Events
- read_loads() - read_soils() - replace_precip() - add_irrigations() Output file documention can be found in the main() routine.
Paper References
Links describing the Sacramento Soil Moisture Accounting model:
Plus many more by searching for "Sacramento Soil Moisture Accounting".