Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RY4GIT committed Jul 28, 2023
1 parent 3bf7b01 commit 323bbdf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![versions](https://img.shields.io/pypi/pyversions/hydra-core.svg) [![CodeStyle](https://img.shields.io/badge/code%20style-Black-black)]()

The differentiable parameter learning Conceptual Functional Equivalent (dCFE) is a differentiable implementation of CFE (see below). All operations of the model are coded using PyTorch to track gradients and tune model parameters. Currently the model allows gradient tracking from runoff to 9 calibration parameters (```bb```, ```satdk```, ```smcmax```, ```slop```, ```Cgw```, ```expon```, ```max_gw_storage```, ```K_nash```, ```K_lf```).

Currently the model takes only static attributes from one basin. Development in progress to include dynamic parameters for multiple CAMELS basins.

#### Conceptual Functional Equivalent (CFE) Model
The CFE model is designed to be a simplified and functionaly equivalent model of the National Water Model. The model code was originally written by Dr. Fred Ogden and converted to BMI-compliant format in the Next-Gen framework by NOAA-OWP. The official CFE code by Dr. Fred Oden and NOAA-OWP lives [here](https://github.com/NOAA-OWP/cfe/). [The Python version of the code](https://github.com/NWC-CUAHSI-Summer-Institute/cfe_py) is developed for the prototyping, research, and development. This code is developed upon the Python version and for research purpose.
Expand All @@ -19,18 +21,22 @@ We are using [Hydra](https://github.com/facebookresearch/hydra) to store/manage

The main branch code is currently configured to run the CAMELS basin id #0102500 test case. If you want to use your own case, you will need to manage three config files located here:

- ```dCFE/config.yaml```
- The main config file. I recommend looking at the Hydra config docs here to learn how this file is structured.
- ```dCFE/src/config.yaml```
- The main config file. Choose appropriate ```run_type```, ```soil_scheme```, and ```basin_id``` here.
- ```run_type```
- ```generate_synthetic```: to generate synthetic data. Make sure to change the ```synthetic``` configs.
- ```ML```: to run and train the dCFE against observed data
- ```ML_synthetic_test```: to run and test the dCFE against the synthetic data generated after ```generate_synthetic```
- ```dCFE/src/models/config/base.yaml```
- This holds all config values for the models
- ```dCFE/src/data/config/<site_name>.yaml```
- This holds all config values for the dataset you're working on.
- ```dCFE/data/```
- This holds all forcing (P, PET) and validation dataset (runoff)

To run the code, just run the following command inside the dCFE/ folder:
To run the code, just run the following command inside the dCFE/src folder:

```python __main__.py```
```python .```

## Gradient chain visualization
See [this PDF](https://github.com/NWC-CUAHSI-Summer-Institute/ngen-aridity/blob/main/CFE_gradient_chain_demo.pdf) for an example of CFE gradient chain.
Expand Down

0 comments on commit 323bbdf

Please sign in to comment.