Skip to main content

A MIDAS module for weather datasets.

Project description

MIDAS Weather

Description

This package contains a Midas module providing a simulator for weather data.

Although this package is intendet to be used with Midas, it does not depend on anything Midas-related except for the midas-util package. You can use it in any mosaik simulation scenario.

Installation

This package will usually be installed automatically together with midas-mosaik. It is available on pypi, you can install it manually with

pip install midas-weather

Usage

The complete documentation is available at https://midas-mosaik.gitlab.io/midas.

Inside of Midas

To use the weather data inside of Midas, add weather to your modules

my_scenario:
  modules:
    - weather
    - ...

and configure it with

  weather_params:
    my_weather_scope:
      weather_mapping:
        WeatherCurrent:
          - interpolate: true
            randomize: true

If a store module is enabled, the weather module will automatically send all outputs to the store.

Any mosaik scenario

If you don't use Midas, you can add the weather manually to your mosaik scenario file. First, the entry in the sim_config:

sim_config = {
    "WeatherData": {"python": "midas.modules.weather.simulator:WeatherDataSimulator"},
    # ...
}

Next, you need to define start_date and step_size. The start_date is to be provided as ISO datestring and can anything between 2009 and 2022:

start_date = "2021-06-08 14:00:00+0000"

The step_size can be anything between 1 and 3600. Higher values might be possible, but this is untested.

Now, the simulator can be started:

weather_sim = world.start("WeatherData", step_size=900, start_date=start_date)

Next, a weather data model can be started:

weather_model = weather_sim.WeatherCurrent(interpolate=True, randomize=True)

Finally, the model needs to be connected to other models:

world.connect(weather_model, other_entity, "t_air_deg_celsius", "wind_v_m_per_s")

License

This software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midas-weather-1.1.4.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

midas_weather-1.1.4-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file midas-weather-1.1.4.tar.gz.

File metadata

  • Download URL: midas-weather-1.1.4.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for midas-weather-1.1.4.tar.gz
Algorithm Hash digest
SHA256 25e550d330a7b9186464c3b2f896f8ed07d6d17ce0266b2e29dbb66c5d536311
MD5 c18a6f22a32355e1b4abc90bc7db0876
BLAKE2b-256 fe6ebaa059abaf728e8b5a8227a6b3b58044802e60d944577c3510f7ccf43d8e

See more details on using hashes here.

File details

Details for the file midas_weather-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for midas_weather-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e3dcecc52648e70f8488a5adb6030e3b7861d35bf61a8482748a7d9d249aade8
MD5 c9e08fb3c93edb5c7846755adf590a50
BLAKE2b-256 33a73193039161bf9032ce56a38062c0534896008b7abe2c7e0e74b56698312f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page