domainiac 9.0.3__tar.gz → 9.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {domainiac-9.0.3 → domainiac-9.0.5}/PKG-INFO +1 -1
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/interpolation.py +1 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/temperature.py +5 -1
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/wind.py +5 -1
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/nwp_manager.py +8 -3
- {domainiac-9.0.3 → domainiac-9.0.5}/pyproject.toml +1 -1
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/__init__.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/__init__.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/conversions.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/solar.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/functions/typing.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/__init__.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/masterdata_manager.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/metering_manager.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/outage_manager.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/plant_manager.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/resource_manager.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/managers/unit_manager.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/modeling/__init__.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/modeling/nwp.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/modeling/plant.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/wrappers/__init__.py +0 -0
- {domainiac-9.0.3 → domainiac-9.0.5}/domainiac/wrappers/cache_wrapper.py +0 -0
|
@@ -23,8 +23,12 @@ def interpolate_temperature(times: pd.Series, temperature: pd.Series) -> RealFun
|
|
|
23
23
|
|
|
24
24
|
f = interpolate.make_interp_spline(x, y, k=1)
|
|
25
25
|
|
|
26
|
+
bounds = (x.min(), x.max())
|
|
27
|
+
|
|
26
28
|
def estimate(times: pd.Series) -> NDArray[np.float64]:
|
|
27
29
|
x = conversions.datetime_to_float(times)
|
|
28
|
-
|
|
30
|
+
y = f(x)
|
|
31
|
+
y[(x < bounds[0]) | (x > bounds[1])] = np.nan
|
|
32
|
+
return y
|
|
29
33
|
|
|
30
34
|
return estimate
|
|
@@ -25,8 +25,12 @@ def interpolate_wind_components(
|
|
|
25
25
|
|
|
26
26
|
f = interpolate.make_interp_spline(x, y, k=1)
|
|
27
27
|
|
|
28
|
+
bounds = (x.min(), x.max())
|
|
29
|
+
|
|
28
30
|
def estimate(times: pd.Series) -> NDArray[np.float64]:
|
|
29
31
|
x = conversions.datetime_to_float(times)
|
|
30
|
-
|
|
32
|
+
y = f(x)
|
|
33
|
+
y[(x < bounds[0]) | (x > bounds[1]), :] = np.nan
|
|
34
|
+
return y
|
|
31
35
|
|
|
32
36
|
return estimate
|
|
@@ -51,9 +51,10 @@ class NWPManager:
|
|
|
51
51
|
"""
|
|
52
52
|
key = (provider, parameter)
|
|
53
53
|
if key not in self._nwp_coordinates_kd_tree:
|
|
54
|
-
# Base KDTree on
|
|
54
|
+
# Base KDTree on six hours of data,
|
|
55
|
+
# which should be enough to cover the largest interval which is ECMWF
|
|
55
56
|
query_time_interval = pdz.TimeInterval(
|
|
56
|
-
self.time_interval.left, self.time_interval.left + pd.Timedelta("
|
|
57
|
+
self.time_interval.left, self.time_interval.left + pd.Timedelta("PT6H")
|
|
57
58
|
)
|
|
58
59
|
|
|
59
60
|
df = self.db.query(
|
|
@@ -194,7 +195,11 @@ class NWPManager:
|
|
|
194
195
|
df_interpolated["time_utc"]
|
|
195
196
|
)
|
|
196
197
|
|
|
197
|
-
#
|
|
198
|
+
# remove nan values from the interpolated data
|
|
199
|
+
# (for example when data has been extrapolated)
|
|
200
|
+
df = df_interpolated.dropna(subset=column_names)
|
|
201
|
+
|
|
202
|
+
# remove values outside the original time interval
|
|
198
203
|
df_interpolated = df_interpolated[
|
|
199
204
|
df_interpolated["time_utc"].between(
|
|
200
205
|
df["time_utc"].min(), df["time_utc"].max()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|