ocf-data-sampler 0.0.14__tar.gz → 0.0.15__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.
Potentially problematic release.
This version of ocf-data-sampler might be problematic. Click here for more details.
- {ocf_data_sampler-0.0.14/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.15}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/gsp.py +0 -2
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/ecmwf.py +2 -1
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/ukv.py +1 -1
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/satellite.py +2 -3
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/utils.py +1 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/dropout.py +1 -1
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/select_time_slice.py +2 -2
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/setup.py +1 -1
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/LICENSE +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/MANIFEST.in +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/README.md +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/nwp.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/nwp.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/fill_time_periods.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler.egg-info/requires.txt +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler.egg-info/top_level.txt +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/requirements.txt +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/setup.cfg +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/tests/__init__.py +0 -0
- {ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/tests/conftest.py +0 -0
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/ecmwf.py
RENAMED
|
@@ -4,6 +4,7 @@ import xarray as xr
|
|
|
4
4
|
from ocf_data_sampler.load.nwp.providers.utils import open_zarr_paths
|
|
5
5
|
from ocf_data_sampler.load.utils import check_time_unique_increasing, make_spatial_coords_increasing
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
def open_ifs(zarr_path: Path | str | list[Path] | list[str]) -> xr.DataArray:
|
|
8
9
|
"""
|
|
9
10
|
Opens the ECMWF IFS NWP data
|
|
@@ -25,7 +26,7 @@ def open_ifs(zarr_path: Path | str | list[Path] | list[str]) -> xr.DataArray:
|
|
|
25
26
|
}
|
|
26
27
|
)
|
|
27
28
|
|
|
28
|
-
# Check the
|
|
29
|
+
# Check the timestamps are unique and increasing
|
|
29
30
|
check_time_unique_increasing(ds.init_time_utc)
|
|
30
31
|
|
|
31
32
|
# Make sure the spatial coords are in increasing order
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/ukv.py
RENAMED
|
@@ -31,7 +31,7 @@ def open_ukv(zarr_path: Path | str | list[Path] | list[str]) -> xr.DataArray:
|
|
|
31
31
|
}
|
|
32
32
|
)
|
|
33
33
|
|
|
34
|
-
# Check the
|
|
34
|
+
# Check the timestamps are unique and increasing
|
|
35
35
|
check_time_unique_increasing(ds.init_time_utc)
|
|
36
36
|
|
|
37
37
|
# Make sure the spatial coords are in increasing order
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
import subprocess
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
-
import pandas as pd
|
|
7
6
|
import xarray as xr
|
|
8
7
|
from ocf_data_sampler.load.utils import check_time_unique_increasing, make_spatial_coords_increasing
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
def _get_single_sat_data(zarr_path: Path | str) -> xr.
|
|
10
|
+
def _get_single_sat_data(zarr_path: Path | str) -> xr.Dataset:
|
|
12
11
|
"""Helper function to open a zarr from either local or GCP path.
|
|
13
12
|
|
|
14
13
|
The local or GCP path may contain wildcard matching (*)
|
|
@@ -89,7 +88,7 @@ def open_sat_data(zarr_path: Path | str | list[Path] | list[str]) -> xr.DataArra
|
|
|
89
88
|
}
|
|
90
89
|
)
|
|
91
90
|
|
|
92
|
-
# Check the
|
|
91
|
+
# Check the timestamps are unique and increasing
|
|
93
92
|
check_time_unique_increasing(ds.time_utc)
|
|
94
93
|
|
|
95
94
|
# Make sure the spatial coords are in increasing order
|
|
@@ -7,6 +7,7 @@ def check_time_unique_increasing(datetimes) -> None:
|
|
|
7
7
|
assert time.is_unique
|
|
8
8
|
assert time.is_monotonic_increasing
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
def make_spatial_coords_increasing(ds: xr.Dataset, x_coord: str, y_coord: str) -> xr.Dataset:
|
|
11
12
|
"""Make sure the spatial coordinates are in increasing order
|
|
12
13
|
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/select_time_slice.py
RENAMED
|
@@ -37,7 +37,7 @@ def _sel_fillinterp(
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def select_time_slice(
|
|
40
|
-
ds: xr.
|
|
40
|
+
ds: xr.DataArray,
|
|
41
41
|
t0: pd.Timestamp,
|
|
42
42
|
sample_period_duration: pd.Timedelta,
|
|
43
43
|
history_duration: pd.Timedelta | None = None,
|
|
@@ -75,7 +75,7 @@ def select_time_slice(
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
def select_time_slice_nwp(
|
|
78
|
-
ds: xr.
|
|
78
|
+
ds: xr.DataArray,
|
|
79
79
|
t0: pd.Timestamp,
|
|
80
80
|
sample_period_duration: pd.Timedelta,
|
|
81
81
|
history_duration: pd.Timedelta,
|
|
@@ -10,7 +10,7 @@ install_requires = (this_directory / "requirements.txt").read_text().splitlines(
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name="ocf_data_sampler",
|
|
13
|
-
version="0.0.
|
|
13
|
+
version="0.0.15",
|
|
14
14
|
license="MIT",
|
|
15
15
|
description="Sample from weather data for renewable energy prediction",
|
|
16
16
|
author="James Fulton, Peter Dudfield, and the Open Climate Fix team",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/data/uk_gsp_locations.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/__init__.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/load/nwp/providers/utils.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/satellite.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/numpy_batch/sun_position.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/fill_time_periods.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/select/select_spatial_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler/torch_datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.14 → ocf_data_sampler-0.0.15}/ocf_data_sampler.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|