Coder Social home page Coder Social logo

tanxuejin / tethys Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jgcri/tethys

0.0 0.0 0.0 204.6 MB

Spatiotemporal downscaling model for global water use

Home Page: https://jgcri.github.io/tethys/

License: Other

Python 65.75% Jupyter Notebook 34.25%

tethys's Introduction

build codecov docs DOI

Summary

Tethys serves as a critical step to link Xanthos (a global hydrologic model) and the Global Change Analysis Model (GCAM). The spatial resolution of GCAM is geopolitical regional scale for energy and economy systems (32 regions), and river basins for the land, agriculture, and water systems (235 water basins). GCAM is often used as a boundary condition and coupled to sectoral models, such as the Community Land Model and Xanthos, which typically operate at finer spatial and temporal scales than GCAM. For example, Xanthos is a globally gridded hydrology model that operates at monthly scale. Resolving such a mismatch in spatial and temporal scales facilitated coupling these models together. It is also helpful for understanding seasonal patterns of water use and acquiring high resolution water use data. The main objective of Tethys is to reconstruct global monthly gridded (0.5 geographic degree) water withdrawal datasets by spatial and temporal downscaling water withdrawal estimates at region/basin and annual scale. As an open-access software, Tethys applies statistical downscaling algorithms, to spatially and temporally downscale water withdrawal data from annual region/basin scale into monthly grid scale. In our study, the water withdrawals are separated into six sectors: irrigation, livestock, domestic, electricity (generation), manufacturing and mining.

Get Started with Tethys

Set up Tethys using the following steps:

  1. Install Tethys from GitHub using:

    python -m pip install git+https://github.com/JGCRI/tethys.git
  2. Download the example data using the following in a Python prompt:

    import tethys
    
    # the directory that you want to download and extract the example data to
    data_dir = "<my data download location>"
    
    # download and unzip the package data to your local machine
    tethys.get_package_data(data_dir)
  3. Setup your configuration file (.ini). Inside the "example" directory that you just downloaded (data_dir from step 2 above) there will be two example configuration files:

  • data_dir/example_1_3_1/config.ini
  • data_dir/example_1_3_1/configDemeter.ini Before you can run these examples please find and replace all absolute paths in each of these files from "C:/Z/models/tethysExampleFolders/example_v1_3_1/..." to "data_dir/example_1_3_1/...".
  1. To run Tethys:

    import tethys
    
    # the path and file name that my example configuration (.ini) file was downloaded to
    config_file = 'data_dir/example_1_3_1/config.ini'
    
    # run Tethys 
    tethys.run_model(config_file=config_file)

Citation

Zarrar Khan, Isaac Thompson, & Chris R. Vernon. (2022). JGCRI/tethys: v1.3.1 (v1.3.1). Zenodo. https://doi.org/10.5281/zenodo.6399488

Supporting Documents

Li, X., Vernon, C.R., Hejazi, M.I., Link, R.P., Huang, Z., Liu, L. and Feng, L., 2018. Tethys โ€“ A Python Package for Spatial and Temporal Downscaling of Global Water Withdrawals. Journal of Open Research Software, 6(1), p.9. DOI: http://doi.org/10.5334/jors.197

Contact Us

For questions, technical support and user contribution, please contact:

Zarrar Khan [email protected] Chris Vernon [email protected]

Example Data

Example data is available for download at https://zenodo.org/record/6399117/files/example_v1_3_1.zip?download=1. Once extracted, change the paths in config.ini to point to the relevant files and directories on your machine.

tethys's People

Contributors

crvernon avatar zarrarkhan avatar ifthompson avatar rplzzz avatar calebbraun avatar dependabot[bot] 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.