Skip to main content

pipeline coverage Code style: black

Timeseries Methods for Wind Power

This is a Python package to download timeseries data from the NORA3 or ERA5 reanalysis, and to convert to power time series for wind farms.

Documentation

Documentation is provided in GitLab Pages.

Quick-start

  • Install as a Python package in your preferred way, for example using poetry.
  • Copy and adjust the example code below.

Installation

Using conda to manage the environment, the package can be installed as follows.

conda create --name myenv python=3.11 
conda activate myenv 
conda install -c conda-forge poetry 
git clone https://gitlab.sintef.no/harald.svendsen/wind_power_timeseries.git 
cd wind_power_timeseries 
poetry install

ERA5 API Key

For use of the "ERA5" data source, the user needs to register and obtain a CDS API key.

Example

import pandas as pd
import pathlib
import wind_power_timeseries as tm

# Specify windfarms
windfarms = pd.DataFrame([
    {"id":"windfarm_1", "lat":55, "lon": 9, "orientation":None, "shape":None, "turbine_height": 150},
    {"id":"windfarm_2", "lat":60, "lon": 7, "orientation":None, "shape":None, "turbine_height": 150},
]).set_index("id")

# Download wind speed data from NORA3 and save to CSV file in specified folder
time_start = "2022-05-01"
time_end = "2022-05-05"
data_path = pathlib.Path("downloaded_nora3")
data_path.mkdir(parents=True,exist_ok=True)

# Download from server and save to files
wind_data = tm.download.retrieve_nora3(
    windfarms,time_start,time_end,use_cache=True,data_path=data_path)

# Specify function for wind speed to wind power conversion, using a pre-defined function:
my_power_function = tm.compute.func_ninja_compute_power
my_args = {"turbine_power_curve": tm.compute.get_power_curve(name="VestasV80")}

# Compute wind farm power from wind speed data
windpower = tm.compute.compute_power(windfarms,wind_data,
        power_function=my_power_function,power_function_args=my_args)

# Save to file
windpower.to_csv("windpower.csv")

This creates a windpower dataframe

                     windfarm_1  windfarm_2
time
2022-05-01 00:00:00    0.053922    0.105866
2022-05-01 01:00:00    0.065940    0.037178
2022-05-01 02:00:00    0.107095    0.009000
2022-05-01 03:00:00    0.056030    0.006256
2022-05-01 04:00:00    0.041206    0.003573
...

Metadata

Release files for wind_power_timeseries 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wind_power_timeseries 0.6.2
File Size Uploaded
wind_power_timeseries-0.6.2.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wind_power_timeseries 0.6.2
File Interpreter ABI Platform
wind_power_timeseries-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.0 kB

Release files / wind_power_timeseries-0.6.2.tar.gz

Download URL wind_power_timeseries-0.6.2.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
00b0e93977f7817694ee1c6fe179caa555aff219051c0d0a52b3b2b955f73577
BLAKE2b-256 checksum
How to use checksums
d6497361602b3f60b5ec8ea5a6ebe01ab1787f4d6619c09d03de7c3047bf6253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.11.16 Linux/4.18.0-553.159.1.el8_10.x86_64

Release files / wind_power_timeseries-0.6.2-py3-none-any.whl

Download URL wind_power_timeseries-0.6.2-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59d02dbad1826824c3654ee833a9d4684a02ba6c134bac4992fc82034671d3e2
BLAKE2b-256 checksum
How to use checksums
7a73aa13fd505dab9eed93fb4ed1d3efe2d687e2500bf2f82d940a3a9b3ef9b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.11.16 Linux/4.18.0-553.159.1.el8_10.x86_64

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page