wattadvisor.optimization_model.utils.feedin_tools
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Functions
|
Calculates photovoltaic power plant generation profile for a certain location and time range by |
|
Calculates wind power plant generation profile for a certain location and time range by |
Module Contents
- wattadvisor.optimization_model.utils.feedin_tools.pv_normed_feedin_from_era5(latitude: float, longitude: float, azimuth: float, tilt: float, surface_type: Literal['urban', 'grass', 'fresh grass', 'soil', 'sand', 'snow', 'fresh snow', 'asphalt', 'concrete', 'aluminum', 'copper', 'fresh steel', 'dirty steel', 'sea'], start_date: datetime.datetime, end_date: datetime.datetime, cds_api_key: str | None = None, path_era5_file: str | None = None, pvlib_df: pandas.DataFrame | None = None, path_export_csv: str | None = None, normalized: bool = True, elevation: float | None = None) pandas.Series
Calculates photovoltaic power plant generation profile for a certain location and time range by using weather data from ERA5 Climate Data Store, either downloaded by this function or downloaded before
- Parameters:
latitude (float) – latitude of the location point for which the wind power generation should be calculated
longitude (float) – longitude of the location point for which the wind power generation should be calculated
azimuth (float) – azimuth orientation [°] of the photovoltaic plant where the power will be generated * North=0 * East=90 * South=180 * West=270
tilt (float) – tilt orientation [°] of the photovoltaic plant where the power will be generated * Up=0 * horizon=90
surface_type (Literal["urban", "grass", "fresh grass", "soil", "sand", "snow", "fresh snow", "asphalt", "concrete", "aluminum", "copper", "fresh steel", "dirty steel", "sea"]) – surface type of the surroundings of the photovoltaic plant where the power will be generated.
start_date (datetime) – datetime of the first time interval of the time range for which the photovoltaic power generation should be calculated
end_date (datetime) – datetime of the last time interval of the time range for which the photovoltaic power generation should be calculated
cds_api_key (str | None, optional) – key to access the ERA5 Climate Data Store, more information [here](https://cds.climate.copernicus.eu/api-how-to), by default None
path_era5_file (str | None, optional) – path to a file with raw weather data from the climate data store, if already downloaded before, by default None
pvlib_df (pd.DataFrame | None, optional) – DataFrame with already generated weather data for photovoltaic power generation from raw weather data from the climate data store, if already downloaded before, by default None
path_export_csv (str | None, optional) – path to CSV file to write the resulted generation time series to, by default None
normalized (bool, optional) – whether resulting power values should be normalized to installed power, by default True
elevation (float | None, optional) – elevation of the location of the photovoltaic plant above sea level [m], by default None
- Returns:
time series of power generation values for each hourly time interval in the range between start_date and end_date
- Return type:
pd.Series
- Raises:
ValueError – if pvlib_df, path_era5_file and key for climate date store cds_api_key are not provided
- wattadvisor.optimization_model.utils.feedin_tools.windpower_normed_feedin_from_era5(latitude: float, longitude: float, hub_height: float, start_date: datetime.datetime, end_date: datetime.datetime, cds_api_key: str | None = None, path_era5_file: str | None = None, windpowerlib_df: pandas.DataFrame | None = None, path_export_csv: str | None = None, normalized: bool = True) pandas.Series
Calculates wind power plant generation profile for a certain location and time range by using weather data from ERA5 Climate Data Store, either downloaded by this function or downloaded before
- Parameters:
latitude (float) – latitude of the location point for which the wind power generation should be calculated
longitude (float) – longitude of the location point for which the wind power generation should be calculated
hub_height (float) – height of the wind power plant hub where the power will be generated [m]
start_date (datetime) – datetime of the first time interval of the time range for which the wind power generation should be calculated
end_date (datetime) – datetime of the last time interval of the time range for which the wind power generation should be calculated
cds_api_key (str | None, optional) – key to access the ERA5 Climate Data Store, more information [here](https://cds.climate.copernicus.eu/api-how-to), by default None
path_era5_file (str | None, optional) – path to a file with raw weather data from the climate data store, if already downloaded before, by default None
windpowerlib_df (pd.DataFrame | None, optional) – DataFrame with already generated weather data for windpower from raw weather data from the climate data store, if already downloaded before, by default None
path_export_csv (str | None, optional) – path to CSV file to write the resulted generation time series to, by default None
normalized (bool, optional) – whether resulting power values should be normalized to installed power, by default True
- Returns:
time series of power generation values for each hourly time interval in the range between start_date and end_date
- Return type:
pd.Series
- Raises:
ValueError – if windpowerlib_df, path_era5_file and key for climate date store cds_api_key are not provided