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 can be use it in any mosaik simulation scenario.

Installation

This package will usually be installed automatically together with midas-mosaik if you opt-in for the base extra. 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_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-2.0.3.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

midas_weather-2.0.3-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file midas_weather-2.0.3.tar.gz.

File metadata

  • Download URL: midas_weather-2.0.3.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for midas_weather-2.0.3.tar.gz
Algorithm Hash digest
SHA256 aec8e4203c6ef613f1ec00eeda8b0f29c8502d6c7712fd4a7a4a7468e11df34c
MD5 5e1346b25a2b03c96a7f2f7af17cad17
BLAKE2b-256 33c3cc7b12ef9b0e82ff15524660695606e4d72fd49a4cb28d827a61fe9d5276

See more details on using hashes here.

File details

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

File metadata

  • Download URL: midas_weather-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for midas_weather-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 10faacdd5434c60e8cf0d63fac69dcf1c303360e28a20ffa07b65c89b0ca7017
MD5 7662e3a9e274b1d8aaa41358c6cc2c84
BLAKE2b-256 47c87a1291dd524fa95ac0a55faeb106b56235b4ccc492bf71b6edc232563e4a

See more details on using hashes here.

Supported by

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