This repository contains code for analyzing soil moisture drydowns from the Soil Moisture Active Passive (SMAP) as detailed in the corresponding manuscript:
Araki, R., Morgan, B.E., McMillan, H.K., Caylor, K.K. Nonlinear Soil Moisture Loss Function Reveals Vegetation Responses to Water Availability. Submitted to Geophysical Research Letters (in review)
- Clone the repository
$ git clone [email protected]:RY4GIT/smap-drydown.git- Create a virtual environment (select an appropriate yml file according to your OS).
$ cd smap-drydown
$ conda env create -f environment_linux.yml
$ conda activate SMAP-
Download the SMAP and ancillary data from appropriate sources using scripts in
data_mng -
In the
analysisdirectory, createconfig.ini, based onconfig_example.ini -
Run
analysis\__main__.py -
Visualize the results using scripts in
notebooks. The results file is large (~130 MB) and is therefore available upon request.
Contains scripts to implement the drydown analysis and model fits.
The functions for loss calculations and drydown models are contained in DrydownModel.py.
This code has been further refactored in https://github.com/ecohydro/drydowns; check it out if you are interested.
Contains scripts to retrieve and curate input data.
All data are pre-curated in "datarods" format, which stores the data as a long time series at a single SMAP grid.
- SMAP soil moisture data
- Download data using
retrieve_NSIDC_Data_SPL3SMP.ipynb - Preprocess data using
create_datarods_SPL3SMP.ipynb
- Download data using
- SMAP precipitation data
- Download data using
retrieve_NSIDC_Data_SPL4SMGP.ipynb - Preprocess data using
create_datarods_SPL4SMGP.py
- Download data using
- dPET (Singer et al., 2020) data
- Download daily data from the website
- Preprocess data using
create_datarods_PET.py
- SMAP ancillary data
- Download data from the website
- Preprocess data using
read_ancillary_landcover_data.ipynb - After obtaining precipitation and PET data, run
calc_aridityindex.py
- Rangeland data
- Download data using
retrieve_rangeland_data.sh - Preprocess data using
read_rangeland_data.py
- Download data using
- Other utilities
retrieve_NSIDC_Data_datacheck.ipynb: check if all the data are downloaded from NSIDCcreate_datarods_datacheck.ipynb: check if all the data are preprocessedidentify_unusable_grid.ipynb: identify grids located on open water
Contains scripts used to test functions or visualize the models and results
figs_stats_datapreprocess.py: Preprocess result files to reduce execution timefigs_method.py&figs_method_tau.py: Visualize the loss functions and drydown modelsfigs_stats.pyandfigs_stats_rev.py: Visualize the resultsfigs_drydown.py: Plot observed and modeled drydown curves
Ryoko Araki, raraki8159 (at) sdsu.edu