Skip to content

Commit 779ecf2

Browse files
Merge branch 'dev' into df/#1352-air-condition-input
# Conflicts: # CHANGELOG.md
2 parents 53894dc + e902abb commit 779ecf2

File tree

5 files changed

+71
-3
lines changed

5 files changed

+71
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased/Snapshot]
88

9-
### Added
9+
### Added
10+
-Added weathersource documentation [#1390](https://github.com/ie3-institute/PowerSystemDataModel/issues/1390)
1011
- Create data model for air condition [#1396](https://github.com/ie3-institute/PowerSystemDataModel/issues/1396)
1112

1213
### Fixed
14+
- Fixed small issues in tests [#1400](https://github.com/ie3-institute/PowerSystemDataModel/issues/1400)
1315

1416
### Changed
1517

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# WeatherSource
2+
3+
The **`WeatherSource`** is an abstract class that provides a standardized interface for accessing time-series weather data. It serves as a foundation for concrete implementations that fetch data from various providers (e.g., CSV files or SQL databases).
4+
5+
A `WeatherSource` relies on two key components:
6+
* **[`IdCoordinateSource`](idcoordinatesource.md)**: Used to resolve a numeric **coordinate ID** from the source data into a geographic `Point` object.
7+
* **`TimeBasedWeatherValueFactory`**: Used to construct `WeatherValue` objects from the raw data fields.
8+
9+
***
10+
11+
## Information
12+
13+
The source data for any `WeatherSource` implementation is expected to contain the following information.
14+
15+
```{list-table}
16+
:widths: auto
17+
:class: wrapping
18+
:header-rows: 1
19+
20+
* - Attribute
21+
- Remarks
22+
23+
* - **`coordinateid`**
24+
- An **integer ID** for a specific geographic coordinate. This ID is used to look up the actual `Point` via the `IdCoordinateSource`.
25+
26+
* - **Time**
27+
- The specific timestamp of the weather data, typically as a `ZonedDateTime`.
28+
29+
* - **Weather Data**
30+
- The meteorological values, such as solar irradiance (`direct` and `diffuse`), temperature, and wind data (`speed` and `direction`).
31+
```
32+
33+
## WeatherData
34+
35+
Weather data is comprised of five key components:
36+
37+
```{list-table}
38+
:widths: auto
39+
:class: wrapping
40+
:header-rows: 1
41+
42+
* - Component
43+
- Description
44+
- Unit
45+
46+
* - **`directIrradiance`**
47+
- Solar radiation that reaches the surface directly from the sun.
48+
- W/m²
49+
50+
* - **`diffuseIrradiance`**
51+
- Solar radiation scattered by the atmosphere before reaching the surface.
52+
- W/m²
53+
54+
* - **`temperature`**
55+
- Ambient air temperature.
56+
- K (Kelvin)
57+
58+
* - **`windVelocity`**
59+
- Wind speed.
60+
- m/s (meters per second)
61+
62+
* - **`windDirection`**
63+
- Wind direction, where 0° is North, 90° is East, etc.
64+
- ° (degrees)
65+
```
66+
Weather data in COSMO and ICON formats is supported. Additional optional weather data can also be provided.

docs/readthedocs/models/models.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ maxdepth: 1
169169
---
170170
input/additionaldata/timeseries
171171
input/additionaldata/idcoordinatesource
172+
input/additionaldata/weathersource
172173
```
173174

174175
## Result

src/test/groovy/edu/ie3/datamodel/io/factory/FactoryTest.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package edu.ie3.datamodel.io.factory
77

88
import edu.ie3.datamodel.exceptions.FactoryException
9-
import edu.ie3.datamodel.models.input.EmInput
109
import edu.ie3.datamodel.utils.Try
1110
import spock.lang.Shared
1211
import spock.lang.Specification

src/test/groovy/edu/ie3/datamodel/io/source/sql/SqlTimeSeriesSourceIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class SqlTimeSeriesSourceIT extends Specification implements TestContainerHelper
126126
value.get() == P_VALUE_00MIN
127127
}
128128

129-
def "The cSqlTimeSeriesSource returns the last value, if there is no current value"() {
129+
def "The SqlTimeSeriesSource returns the last value, if there is no current value"() {
130130
given:
131131
def time = TimeUtil.withDefaults.toZonedDateTime("2020-01-01T00:13:00Z")
132132

0 commit comments

Comments
 (0)