ocf-data-sampler 0.2.34__tar.gz → 0.2.35__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.2.34 → ocf_data_sampler-0.2.35}/PKG-INFO +1 -1
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/nwp.py +12 -8
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler.egg-info/PKG-INFO +1 -1
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/LICENSE +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/README.md +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/config/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/config/load.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/config/model.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/config/save.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/data/uk_gsp_locations_20220314.csv +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/data/uk_gsp_locations_20250109.csv +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/gsp.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/load_dataset.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/cloudcasting.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/gfs.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/icon.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/satellite.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/site.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/utils.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/collate.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/common_types.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/datetime_features.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/gsp.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/nwp.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/satellite.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/site.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/sun_position.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/dropout.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/fill_time_periods.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/geospatial.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/location.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/select_time_slice.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/datasets/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/datasets/pvnet_uk.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/datasets/site.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/sample/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/sample/base.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/sample/site.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/sample/uk_regional.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/__init__.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/channel_dict_to_dataarray.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/merge_and_fill_utils.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/spatial_slice_for_dataset.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/time_slice_for_dataset.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/valid_time_periods.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/utils/validation_utils.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/utils.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler.egg-info/requires.txt +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler.egg-info/top_level.txt +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/pyproject.toml +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/scripts/download_gsp_location_data.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/scripts/refactor_site.py +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/setup.cfg +0 -0
- {ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/utils/compute_icon_mean_stddev.py +0 -0
|
@@ -29,7 +29,7 @@ def _validate_nwp_data(data_array: xr.DataArray, provider: str) -> None:
|
|
|
29
29
|
common_expected_dtypes = {
|
|
30
30
|
"init_time_utc": np.datetime64,
|
|
31
31
|
"step": np.timedelta64,
|
|
32
|
-
"channel": np.str_,
|
|
32
|
+
"channel": (np.str_, np.object_),
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
geographic_spatial_dtypes = {
|
|
@@ -57,17 +57,21 @@ def _validate_nwp_data(data_array: xr.DataArray, provider: str) -> None:
|
|
|
57
57
|
**provider_specific_spatial_dtypes.get(provider, {}),
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
if not expected_dtypes:
|
|
61
|
-
raise ValueError(f"Unknown provider: {provider}")
|
|
62
|
-
|
|
63
60
|
for coord, expected_dtype in expected_dtypes.items():
|
|
64
61
|
if coord not in data_array.coords:
|
|
65
62
|
raise ValueError(f"Coordinate '{coord}' missing for provider '{provider}'")
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
|
|
64
|
+
actual_dtype = data_array.coords[coord].dtype
|
|
65
|
+
|
|
66
|
+
if not np.issubdtype(actual_dtype, expected_dtype):
|
|
67
|
+
if isinstance(expected_dtype, tuple):
|
|
68
|
+
expected_name_str = " or ".join([t.__name__ for t in expected_dtype])
|
|
69
|
+
else:
|
|
70
|
+
expected_name_str = expected_dtype.__name__
|
|
71
|
+
|
|
68
72
|
err_msg = (
|
|
69
|
-
f"'{coord}' for {provider} should be {
|
|
70
|
-
f"not {actual_dtype}"
|
|
73
|
+
f"'{coord}' for {provider} should be {expected_name_str}, "
|
|
74
|
+
f"not {actual_dtype.name}"
|
|
71
75
|
)
|
|
72
76
|
raise TypeError(err_msg)
|
|
73
77
|
|
|
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
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/ecmwf.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/gfs.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/icon.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/ukv.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/load/nwp/providers/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/__init__.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/collate.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/common_types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/satellite.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/numpy_sample/sun_position.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/fill_time_periods.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/select_spatial_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/select/select_time_slice.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/datasets/site.py
RENAMED
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/sample/base.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/ocf_data_sampler/torch_datasets/sample/site.py
RENAMED
|
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
|
{ocf_data_sampler-0.2.34 → ocf_data_sampler-0.2.35}/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
|
|
File without changes
|