Giter Club home page Giter Club logo

baseflowconus's Introduction

Monthly Baseflow Dataset for the CONUS

provides an opportunity to analyze large-scale baseflow trends under global change πŸ”₯




πŸš€Β Β Introduction

To fill the gaps in time-series baseflow datasets, we introduced a machine learning approach called long short-term memory (LSTM) networks to develop a monthly baseflow dataset.

To better train across basins, we compared the standard LSTM with four variant architectures using additional static properties as input. Results show that three variant architectures (Joint, Front, and EA-LSTM) perform better than the standard LSTM, with median Kling-Gupta efficiency across basins greater than 0.85.

Based on Front LSTM, the monthly baseflow dataset with 0.25Β° spatial resolution across the contiguous United States from 1981 to 2020 was obtained, which can be downloaded from the release page.

⚑  Project Structure

β”œβ”€β”€ configs                 <- Hydra configuration files
β”‚   β”œβ”€β”€ constant                <- Folder paths and constants
β”‚   β”œβ”€β”€ dataset                 <- Configs of Pytorch dataset
β”‚   β”œβ”€β”€ datasplit               <- Split dataset into train and test
β”‚   β”œβ”€β”€ hydra                   <- Configs of Hydra logging and launcher
β”‚   β”œβ”€β”€ loss                    <- Configs of loss function
β”‚   β”œβ”€β”€ model                   <- Configs of Pytorch model architectures
β”‚   β”œβ”€β”€ optimizer               <- Configs of optimizer
β”‚   β”œβ”€β”€ trainer                 <- Configs of validation metrics and trainer
β”‚   β”œβ”€β”€ tuner                   <- Configs of Optuna hyperparameter search
β”‚   └── config.yaml             <- Main project configuration file
β”‚
β”œβ”€β”€ data                    <- Baseflow, time series, and static properties
β”‚
β”œβ”€β”€ logs                    <- Logs generated by Hydra and PyTorch loggers
β”‚
β”œβ”€β”€ saved                   <- Saved evaluation results and model parameters
β”‚
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ datasets                <- PyTorch datasets
β”‚   β”œβ”€β”€ datasplits              <- Dataset splitter for train and test
β”‚   β”œβ”€β”€ models                  <- PyTorch model architectures
β”‚   β”œβ”€β”€ trainer                 <- Class managing training process
β”‚   β”œβ”€β”€ utils                   <- Utility scripts for metric logging
β”‚   β”œβ”€β”€ evaluate.py             <- Model evaluation piplines
β”‚   β”œβ”€β”€ perpare.py              <- Data preparation piplines
β”‚   └── simulate.py             <- Simulate gridded baseflow
β”‚
β”œβ”€β”€ run.py                  <- Run pipeline with chosen configuration
β”‚
β”œβ”€β”€ main.py                 <- Main process for the whole project
β”‚
β”œβ”€β”€ .gitignore              <- List of files/folders ignored by git
β”œβ”€β”€ requirements.txt        <- File for installing python dependencies
β”œβ”€β”€ LICENSE
└── README.md

ℹ️  Usage

Data Preparation

from src import prepare

# download data from ERA5 and Google Earth Engine
prepare(cfg['constant'])

Hyperparameter Tuning

# detailed settings are in optuna.yaml
python run.py -m tuner=optuna

Train and Evaluate

# evaluate Front LSTM using test_size=0.2
python run.py -m model=front dataset.eco=CPL, NAP, NPL
# train Front LSTM using test_size=0
python run.py -m model=front datasplit=full dataset.eco=CPL, NAP, NPL

Baseflow Simulation

from src import simulate

# load the trained model for each ecoregion
checkpoint = 'saved/train/front/CPL/models/model_latest.pth'
simulate(checkpoint)

πŸ“ŒΒ Β Publications

It is highly appreciated for citing the following paper:

  • Xie, J., Liu, X., Tian, W., Wang, K., Bai, P., & Liu, C. (2022). Estimating Gridded Monthly Baseflow From 1981 to 2020 for the Contiguous US Using Long Short-Term Memory (LSTM) Networks. Water Resources Research, 58(8), e2021WR031663. https://doi.org/10.1029/2021WR031663

baseflowconus's People

Contributors

xiejx5 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.