MetSim

MetSim: A Python package for estimation and disaggregation of meteorological data - Published in JOSS (2020)

https://github.com/uw-hydro/metsim

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 11 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    8 of 18 committers (44.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

climate disaggregation hydrology meteorology mtclim

Keywords from Contributors

energy-systems drone pde

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 6 months ago · JSON representation

Repository

Meteorology Simulator

Basic Info
Statistics
  • Stars: 65
  • Watchers: 8
  • Forks: 52
  • Open Issues: 26
  • Releases: 23
Topics
climate disaggregation hydrology meteorology mtclim
Created over 9 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License Zenodo

README.md

METSIM: Meteorology Simulator

| MetSim Links & Badges | | |------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | JOSS Paper | DOI | | MetSim Documentation | Documentation Status | | Travis-CI Build | Build Status | | License | GitHub license | | Current Release DOI | DOI | | MetSim Tutorial | https://github.com/UW-Hydro/MetSim-tutorial |

MetSim is a meteorological simulator and forcing disaggregator for hydrologic modeling and climate applications. Metsim is based on MtClim and the preprocessor from version 4 of the VIC hydrologic model.

MetSim consists of 3 main modules that govern the operation of 3 major aspects of its operation:

1. Management of dataset preprocessing and IO

The MetSim object provides high level support for setting up jobs and infrastructure for running simulation/disaggregation steps. It is the main interface through which the other modules are accessed.

2. Simulation of daily meteorological forcings

The base implementation of the meteorological simulator is based off of the algorithms described in[1]. This component has been designed to be flexible in allowing for alternative implementations which may be specified during the setup of the MetSim object. The default implementation allows for the daily simulation of:

  • Mean daily temperature
  • Incoming shortwave radiation
  • Cloud cover fraction
  • Potential evapotranspiration
  • Vapor pressure

For the "triangle" and "mix" methods of precipitation disaggregation, doumentation can be found here. This will eventually be superceded by a journal article that is currently in review [7].

3. Disaggregation of daily simulation values to sub-daily timesteps

Daily data from given input or simulated via the forcings generation component of MetSim can be disaggregated down to sub-daily values at intervals specified in minutes (provided they divide evenly into 24 hours). The operation of these algorithms is also described in [1]. The variables estimated are:

  • Temperature
  • Vapor pressure
  • Relative and specific humidity
  • Air pressure
  • Cloud cover fraction
  • Longwave radiation
  • Shortwave radiation
  • Precipitation
  • Wind speed

Getting Started

A tutorial for running MetSim and working with input/output data can be run via binder here: https://github.com/UW-Hydro/MetSim-tutorial

Installation

MetSim itself is a pure Python package, but its dependencies are not. You should ensure that you have all of the required dependencies:

Then, install MetSim with pip or conda:

$ pip install metsim

or

$ conda install -c conda-forge metsim

Alternatively, you can install MetSim directly from the source if you desire to:

$ git clone https://github.com/UW-Hydro/MetSim.git
$ cd MetSim
$ python setup.py install

If you are installing from source you may wish to also run the tests. You can do this from the MetSim directory with the command:

$ pytest --verbose

Basic Usage

MetSim provides a simple command line interface which is primarily operated via configuration files. For more information about the options available to be set in the configuration files see the configuration page in the full documentation.

Once installed, MetSim can be used from the command line via:

ms /path/to/configuration [-v] [-n #]

Bracketed flags are optional; -v activates verbose mode to print messages about the status of a run, and -n activates parallelism. The number given after the -n flag is the number of processes to run. A good rule of thumb is to use one less process than the number of processsors (or threads) that the machine you are running on has.

:exclamation: Users in environments where OpenMP is available may experience over-utilization of CPU resources, leading to lower performance. If you experience this issue try setting the OMP_NUM_THREADS environment variable to 1 before running MetSim.. This can be done in bash and similar shells by running export OMP_NUM_THREADS=1.

Citing MetSim

If you use MetSim in your work and would like to cite it you can use our JOSS paper as:

Bennett et al., (2020). MetSim: A Python package for estimation and disaggregation of meteorological data. Journal of Open Source Software, 5(47), 2042, https://doi.org/10.21105/joss.02042

Or in BibTeX: @article{Bennett2020, doi = {10.21105/joss.02042}, url = {https://doi.org/10.21105/joss.02042}, year = {2020}, publisher = {The Open Journal}, volume = {5}, number = {47}, pages = {2042}, author = {Andrew Bennett and Joseph Hamman and Bart Nijssen}, title = {MetSim: A Python package for estimation and disaggregation of meteorological data}, journal = {Journal of Open Source Software} }

Acknowledgements

MetSim has greatly benefited from the user community, who have contributed code, tested features, provided feedback, and helped with documentation. We would like to thank and acknowledge the work of Ted Bohn, Andy Wood, Kristen Whitney, Yifan Cheng, Liz Clark, Oriana Chegwidden, Ethan Gutmann, Kostas Andreadis, Thomas Remke, Ed Maurer, and Philipp Sommer for their help.

References

[1]: Bohn, T. J., B. Livneh, J. W. Oyler, S. W. Running, B. Nijssen, and D. P. Lettenmaier, 2013a: Global evaluation of MTCLIM and related algorithms for forcing of ecological and hydrological models, Agr. Forest. Meteorol., 176, 38-49, doi:10.1016/j.agrformet.2013.03.003.

[2]: Bristow, K.L., and G.S. Campbell, 1984. On the relationship between incoming solar radiation and daily maximum and minimum temperature. Agricultural and Forest Meteorology, 31:159-166.

[3]: Running, S.W., R.R. Nemani, and R.D. Hungerford, 1987. Extrapolation of synoptic meteorological data in mountainous terrain and its use for simulating forest evaporation and photosynthesis. Canadian Journal of Forest Research, 17:472-483.

[4]: Glassy, J.M., and S.W. Running, 1994. Validating diurnal climatology of the MT-CLIM model across a climatic gradient in Oregon. Ecological Applications, 4(2):248-257.

[5]: Kimball, J.S., S.W. Running, and R. Nemani, 1997. An improved method for estimating surface humidity from daily minimum temperature. Agricultural and Forest Meteorology, 85:87-98.

[6]: Thornton, P.E., and S.W. Running, 1999. An improved algorithm for estimating incident daily solar radiation from measurements of temperature, humidity, and precipitation. Agricultural and Forest Meteorology, 93:211-228.

[7]: Bohn, T. J., K. M. Whitney, G. Mascaro, and E. R. Vivoni, 2019. A deterministic approach for approximating the diurnal cycle of precipitation for large-scale hydrological simulations. Journal of Hydrometeorology (accepted). doi: 10.1175/JHM-D-18-0203.1.

Owner

  • Name: UW Hydro | Computational Hydrology
  • Login: UW-Hydro
  • Kind: organization
  • Email: nijssen@uw.edu
  • Location: Seattle, WA

We build tools to simulate the terrestrial hydrologic cycle

JOSS Publication

MetSim: A Python package for estimation and disaggregation of meteorological data
Published
March 27, 2020
Volume 5, Issue 47, Page 2042
Authors
Andrew R. Bennett ORCID
Department of Civil and Environmental Engineering, University of Washington
Joseph J. Hamman ORCID
Climate and Global Dynamics Laboratory, National Center for Atmospheric Research
Bart Nijssen ORCID
Department of Civil and Environmental Engineering, University of Washington
Editor
Stefan Pfenninger ORCID
Tags
meteorology hydrology

GitHub Events

Total
  • Watch event: 5
  • Fork event: 2
Last Year
  • Watch event: 5
  • Fork event: 2

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 495
  • Total Committers: 18
  • Avg Commits per committer: 27.5
  • Development Distribution Score (DDS): 0.257
Past Year
  • Commits: 9
  • Committers: 4
  • Avg Commits per committer: 2.25
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
arbennett b****r@g****m 368
Joe Hamman j****1@u****u 37
Joseph Hamman j****n@u****u 33
Bart Nijssen n****n@u****u 14
kwhitney727 k****y@g****m 12
ted t****n@g****m 11
benb0228 4****8 4
Thomas Remke t****e@h****e 3
Elizabeth Clark e****2@u****u 3
Daniel S. Katz d****z@i****g 2
Kasra Farmer k****1@u****a 1
DaveCasson d****n@g****m 1
Benjamin Bass b****s@c****u 1
Kasra Farmer k****z@u****a 1
Philipp S. Sommer C****p 1
Kostas Andreadis k****d@j****v 1
Arfon Smith a****n 1
Manabendra Saharia m****b@h****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 114
  • Total pull requests: 154
  • Average time to close issues: 4 months
  • Average time to close pull requests: 28 days
  • Total issue authors: 23
  • Total pull request authors: 15
  • Average comments per issue: 2.12
  • Average comments per pull request: 0.44
  • Merged pull requests: 143
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • arbennett (51)
  • jhamman (17)
  • bartnijssen (11)
  • tbohn (6)
  • andywood (5)
  • YifanCheng (2)
  • kwhitney727 (2)
  • StephanThober (2)
  • kasra-keshavarz (2)
  • Chilipp (2)
  • danhamill (2)
  • kandread (1)
  • JoshMumford (1)
  • shahryaramd (1)
  • 133040028 (1)
Pull Request Authors
  • arbennett (93)
  • jhamman (35)
  • bartnijssen (5)
  • tbohn (4)
  • kwhitney727 (3)
  • lizaclark (2)
  • danielskatz (2)
  • thomasremke (1)
  • msaharia (1)
  • arfon (1)
  • kandread (1)
  • Chilipp (1)
  • DaveCasson (1)
  • benb0228 (1)
  • kasra-keshavarz (1)
Top Labels
Issue Labels
enhancement (14) bug (12) documentation (9) cleanup (6) disaggregation (6) performance (4) testing (3) question (3) builds and ci (2) architecture (2) refactor (2) science (1) forcing (1) help wanted (1) duplicate (1)
Pull Request Labels
cleanup (2) refactor (2) bug (1) disaggregation (1) enhancement (1) documentation (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 80 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 1
proxy.golang.org: github.com/uw-hydro/metsim
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago
proxy.golang.org: github.com/UW-Hydro/MetSim
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago
pypi.org: metsim

Meteorology Simulator

  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 80 Last month
Rankings
Forks count: 5.8%
Dependent packages count: 7.3%
Stargazers count: 9.2%
Average: 13.6%
Dependent repos count: 22.1%
Downloads: 23.6%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: metsim

MetSim is a meteorological simulator and forcing disaggregator for hydrologic modeling and climate applications. Metsim is based on MtClim and the preprocessor from version 4 of the VIC hydrologic model.

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.1%
Forks count: 25.6%
Average: 35.4%
Stargazers count: 40.3%
Dependent packages count: 51.5%
Last synced: 6 months ago

Dependencies

setup.py pypi
  • dask *
  • distributed *
  • netCDF4 *
  • numba *
  • numpy *
  • pandas >=0.25.0
  • scipy *
  • toolz *
  • xarray >=0.11.0
environment.yml pypi