MEWS
A Python package designed to add extreme weather events to existing weather data or projections.
https://github.com/sandialabs/MEWS
Category: Atmosphere
Sub Category: Meteorological Observation and Forecast
Keywords
application data-science scr-2664 snl-applications
Last synced: 42 minutes ago
JSON representation
Repository metadata
Multi-scenario Extreme Weather Simulator (MEWS)
- Host: GitHub
- URL: https://github.com/sandialabs/MEWS
- Owner: sandialabs
- License: other
- Created: 2021-06-22T19:04:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-30T18:15:40.000Z (7 months ago)
- Last Synced: 2025-04-17T22:44:40.299Z (10 days ago)
- Topics: application, data-science, scr-2664, snl-applications
- Language: Python
- Homepage:
- Size: 270 MB
- Stars: 33
- Watchers: 12
- Forks: 7
- Open Issues: 3
- Releases: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
README.md
The Multi-scenario Extreme Weather Simulator (MEWS) is a Python package designed to add
extreme weather events to existing weather data or projections. MEWS does not simulate
weather but rather adds variations in weather for the purpose of probabilistic analyses
of infrastructure or environmental systems.
Currently MEWS works for extreme temperature. Other enhancements to MEWS are envisioned that provide reasonably realistic selection
of hurricane futures and extreme precipitation.
Currently the infrastructure focus has been for Building Energy Simulation and MEWS can read/write
altered weather files for Energy Plus (https://energyplus.net/) and DOE-2 (https://www.doe2.com/)
weather files. Both of these provide a rich library of historic and Typical Meteorological weather
inputs around the world.
MEWS has been tested on Linux, Max-OS, and Windows using Python 3.8, 3.9, and 3.10.
Documentation will also follow in the near future.
License
See the LICENSE.md file for license details. This package has third party packages that have their own licenses that are appended to the MEWS license.
Organization
Directories
- mews - Python package
- dist - wheel and tar.gz binaries for installing mews 1.1
- docs - UNDER CONSTRUCTION - inital build available on ReadTheDocs (https://mews.readthedocs.io/en/latest/)
- information - contains general information about MEWS
- examples - current working example is run_mews_extreme_temperature_example_v_1_1.py. All others are deprecated or use older techniques
Installation
-
To install the latest released version:
pip install mews
For the current code:
cd < a directory you want to work with > python -m venv <a virtual environment name> <a virtual environment name>/Scripts/activate git clone [email protected]:sandialabs/MEWS.git cd MEWS pip install -e .
If this does not work an alternative method is to:
cd < a directory you want to work with > python -m venv <a virtual environment name> <a virtual environment name>/Scripts/activate git clone [email protected]:sandialabs/MEWS.git cd MEWS pip install -r requirements.txt python setup.py develop
Then run the following to ensure the code passes unit testing
pip install pytest pytest
All tests should pass. Sometimes failures occur if you have tex on your computer.
The API for MEWS is only documented in the code and has many inputs. The best example of how to use the latest version is available in examples/run_mews_extreme_temperature_example_v_1_1.py
the other examples are either depricated or are not being kept up to date presently.
Other Installation Requirements
- MEWS requires Cython which needs a C compiler in place. For windows, this can be the visual studio free Microsoft Visual C++ 14.0 Build Tools
that are freely available at https://visualstudio.microsoft.com/visual-cpp-build-tools/. Download the build tools and install them. It is necessary
to assure the correct version of the build tools is installed. The stack exchange thread below shows how to verify the correct version is installed.
- MEWS downloads CMIP6 data when using the ClimateScenario class. This step can be messy though and requires many retries when downloading the data live from multiple servers. As a result, the entire dataset (~24Gb) has been uploaded to https://osf.io/ts9e8/files/osfstorage and is publicly available to manually download.
Download the CMIP6_Data_Files file and then make its local path equal to the "output_folder" parameter for the ClimateScenario class in
mews.weather.climate.ClimateScenario
Using MEWS
A training video has been made available at: https://drive.google.com/file/d/1B-G5yGu0BFXCqj0BYfu_e8XFliAoeoRi/view?usp=drive_link
MEWS has many classes that have their API's documented in the code. These classes have specialized functions that most users will not want to work with.
The MEWS function for heat waves is:
from mews.run_mews import extreme_temperature
The example in MEWS/examples/run_mews_extreme_temperature_v_1_1.py shows how to use extreme_temperature. The repository now contains
pre-processed solution files for the following cities:
cities = ["Chicago",
"Baltimore",
"Minneapolis",
"Phoenix",
'Miami',
'Houston'
'Atlanta',
'LasVegas',
'LosAngeles',
'SanFrancisco',
'Albuquerque',
'Seattle',
'Denver',
'Helena',
'Duluth',
'Fairbanks',
'McAllen',
'Kodiak',
'Worcester']
The extreme_temperature input parameters can be used to only generate files from the solutions rather than running the lengthy optimization process again.
Inside "MEWS/examples/example_data" are folders for each city and inside these folders you can find the solution files in "results" and "mews_epw_results" folder for EnergyPlus epw files.
Contact
- Daniel Villa, Sandia National Laboratories (SNL) [email protected]
Citing MEWS
You can cite MEWS with one or more of the following:
-
Daniel L. Villa, Sang Hoon Lee, Carlo Bianchi, Juan Pablo Carvallo, Illya Azaroff, Andrea Mammoli and Tyler Schostek 2023. "Multi-scenario Extreme Weather Simulator Application to Heat Waves: Ko’olauloa Community Resilience Hub," Science and Technology for the Built Environment https://doi.org/10.1080/23744731.2023.2279467
-
Villa, Daniel L., Tyler J. Schostek, Krissy Govertsen, and Madeline Macmillan. 2023. "A Stochastic Model of Future Extreme Temperature Events for Infrastructure Analysis." Environmental Modeling & Software https://doi.org/10.1016/j.envsoft.2023.105663.
-
Villa, Daniel L., Juan Carvallo, Carlo Bianchi, and Sang Hoon Lee. 2022. "Multi-scenario Extreme Weather Simulator Application to Heat Waves." 2022 Building Performance Analysis Conference and SimBuild co-organized by ASHRAE and IBPSA-USA https://doi.org/10.26868/25746308.2022.C006
Sandia Funding Statement
Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy's National Nuclear Security Administration under contract DE-NA-0003525.
Owner metadata
- Name: Sandia National Laboratories
- Login: sandialabs
- Email:
- Kind: organization
- Description: Exceptional service in the national interest.
- Website: https://software.sandia.gov
- Location: United States
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/4993680?v=4
- Repositories: 123
- Last ynced at: 2023-03-13T13:51:28.478Z
- Profile URL: https://github.com/sandialabs
GitHub Events
Total
- Watch event: 4
Last Year
- Watch event: 4
Committers metadata
Last synced: 4 days ago
Total Commits: 320
Total Committers: 16
Avg Commits per committer: 20.0
Development Distribution Score (DDS): 0.497
Commits in past year: 42
Committers in past year: 2
Avg Commits per committer in past year: 21.0
Development Distribution Score (DDS) in past year: 0.31
Name | Commits | |
---|---|---|
Daniel Villa | 3****a | 161 |
dlvilla | d****a@s****v | 47 |
Daniel Villa | d****a@e****v | 26 |
tjschos | t****s@s****v | 16 |
Daniel Villa | d****a@e****v | 15 |
tschoste | 1****e | 12 |
Daniel Villa | d****a@e****v | 11 |
Daniel L Villa | d****a@h****v | 8 |
Daniel L Villa | d****a@h****v | 8 |
Daniel Villa | d****a@e****v | 5 |
Macmillan | m****l@n****v | 4 |
Daniel Villa | d****a@c****v | 2 |
Daniel Villa | d****a@e****v | 2 |
Daniel Villa | d****a@e****v | 1 |
Daniel Villa | d****a@e****v | 1 |
U-SANDIA\dlvilla | d****a@S****v | 1 |
Committer domains:
- sandia.gov: 2
- s980178.srn.sandia.gov: 1
- ecw00807a.sandia.gov: 1
- ecw00607.sandia.gov: 1
- ecw00911a.sandia.gov: 1
- ceesrvnode3.sandia.gov: 1
- nrel.gov: 1
- ecw00407.sandia.gov: 1
- hpws267.sandia.gov: 1
- hpws025.sandia.gov: 1
- ecw00203.sandia.gov: 1
- ecw00608.sandia.gov: 1
- ecw00604.sandia.gov: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 4
Total pull requests: 24
Average time to close issues: 2 months
Average time to close pull requests: 14 days
Total issue authors: 1
Total pull request authors: 3
Average comments per issue: 0.25
Average comments per pull request: 0.38
Merged pull request: 20
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 7
Past year average time to close issues: N/A
Past year average time to close pull requests: 7 days
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 0.43
Past year merged pull request: 7
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- dlvilla (4)
Top Pull Request Authors
- dlvilla (14)
- madelinemacmillan (5)
- tschoste (5)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 127 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: mews
Multi-scenario Extreme Weather Simulator (MEWS)
- Homepage: https://github.com/sandialabs/MEWS
- Documentation: https://mews.readthedocs.io/
- Licenses: Revised BSD
- Latest release: 1.1.1 (published almost 2 years ago)
- Last Synced: 2025-04-26T13:37:08.077Z (1 day ago)
- Versions: 4
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 127 Last month
-
Rankings:
- Dependent packages count: 10.052%
- Stargazers count: 12.877%
- Forks count: 13.288%
- Average: 19.261%
- Dependent repos count: 21.642%
- Downloads: 38.446%
- Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
Score: 11.215920065057563