Package for downloading timeseries data and convert to generated power
Project description
Timeseries Methods for Wind Power
This is a Python package to download timeseries data from the NORA3 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.10
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
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
...
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wind_power_timeseries-0.6.0.tar.gz.
File metadata
- Download URL: wind_power_timeseries-0.6.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.6 Linux/4.18.0-553.51.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c1cd8ecba7a74a2ffdbabf3c39bb54aa54254834954fe07753fc30f3014c946
|
|
| MD5 |
7a8b4ff972be0eeeded107d1dd7f4f83
|
|
| BLAKE2b-256 |
f05b18d8b20b092cc5f7d432527438f5d7b5a6e75cf858980107436502dee8cb
|
File details
Details for the file wind_power_timeseries-0.6.0-py3-none-any.whl.
File metadata
- Download URL: wind_power_timeseries-0.6.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.6 Linux/4.18.0-553.51.1.el8_10.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2226698f5dfb6c1f6292bb8cbf0b0107fc685251ac9ad0e39cec9fc6f5eb8127
|
|
| MD5 |
dd32689c85f7892054d86238da3d6f8d
|
|
| BLAKE2b-256 |
bc4a4b5f21314c46b0220e5193c8ef7e3fe2a6ff138212a6357f21f4f420ec26
|