ocf-data-sampler 0.0.14__py3-none-any.whl → 0.0.15__py3-none-any.whl

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.

@@ -29,5 +29,3 @@ def open_gsp(zarr_path: str | Path) -> xr.DataArray:
29
29
  )
30
30
 
31
31
  return ds.generation_mw
32
-
33
-
@@ -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 timestmps are unique and increasing
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
@@ -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 timestmps are unique and increasing
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.DataArray:
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 timestmps are unique and increasing
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
 
@@ -27,7 +27,7 @@ def draw_dropout_time(
27
27
 
28
28
 
29
29
  def apply_dropout_time(
30
- ds: xr.Dataset,
30
+ ds: xr.DataArray,
31
31
  dropout_time: pd.Timestamp | None,
32
32
  ):
33
33
 
@@ -37,7 +37,7 @@ def _sel_fillinterp(
37
37
 
38
38
 
39
39
  def select_time_slice(
40
- ds: xr.Dataset | xr.DataArray,
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.Dataset | xr.DataArray,
78
+ ds: xr.DataArray,
79
79
  t0: pd.Timestamp,
80
80
  sample_period_duration: pd.Timedelta,
81
81
  history_duration: pd.Timedelta,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.14
3
+ Version: 0.0.15
4
4
  Summary: Sample from weather data for renewable energy prediction
5
5
  Author: James Fulton, Peter Dudfield, and the Open Climate Fix team
6
6
  Author-email: info@openclimatefix.org
@@ -1,14 +1,14 @@
1
1
  ocf_data_sampler/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
2
  ocf_data_sampler/data/uk_gsp_locations.csv,sha256=RSh7DRh55E3n8lVAaWXGTaXXHevZZtI58td4d4DhGos,10415772
3
3
  ocf_data_sampler/load/__init__.py,sha256=MjgfxilTzyz1RYFoBEeAXmE9hyjknLvdmlHPmlAoiQY,44
4
- ocf_data_sampler/load/gsp.py,sha256=ewuypEah4dfj_gIcYwZoLHiA2ZjUj7KPeyBYKwT1qdo,761
5
- ocf_data_sampler/load/satellite.py,sha256=RcF0HmpV2PKedOdqcTc6dDk4qdQZAdTLYwmMuNpSTZQ,2906
6
- ocf_data_sampler/load/utils.py,sha256=tkhuhL3YzJucAtaCH572OxBkYvcEDpSed83yg02O8jg,966
4
+ ocf_data_sampler/load/gsp.py,sha256=Gcr1JVUOPKhFRDCSHtfPDjxx0BtyyEhXrZvGEKLPJ5I,759
5
+ ocf_data_sampler/load/satellite.py,sha256=SkcL5ZSiAs5iOU71Ds12GQd8re1N5vEg8IDKuoUFoOU,2885
6
+ ocf_data_sampler/load/utils.py,sha256=kQM9BHwKG--soehlnJOe8VqEI9WEoky-L4aep8ANNOM,967
7
7
  ocf_data_sampler/load/nwp/__init__.py,sha256=SmcrnbygO5xtCKmGR4wtHrj-HI7nOAvnAtfuvRufBGQ,25
8
8
  ocf_data_sampler/load/nwp/nwp.py,sha256=O4QnajEZem8BvBgTcYYDBhRhgqPYuJkolHmpMRmrXEA,610
9
9
  ocf_data_sampler/load/nwp/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- ocf_data_sampler/load/nwp/providers/ecmwf.py,sha256=1AFfdhReLjVZIfoA6N1fnKuBS-c8s_6W660A4k5KfA8,1095
11
- ocf_data_sampler/load/nwp/providers/ukv.py,sha256=IyZ9F9W9exfm08z1ndKsDN6BG2iir5bYf6RI4pOlGb4,1124
10
+ ocf_data_sampler/load/nwp/providers/ecmwf.py,sha256=hLfq23DJI_NmPdtjELU4uuw2zoDeIUHVY6HYpxo776o,1097
11
+ ocf_data_sampler/load/nwp/providers/ukv.py,sha256=y9DiQ4hK618MnYmskXZcC-ImYcWM7y5vA9gFeuseEUY,1125
12
12
  ocf_data_sampler/load/nwp/providers/utils.py,sha256=Sy2exG1wpXLLhMXYdsfR-DZMR3txG1_bBmBdchlc-yA,848
13
13
  ocf_data_sampler/numpy_batch/__init__.py,sha256=mrtqwbGik5Zc9MYP5byfCTBm08wMtS2XnTsypC4fPMo,245
14
14
  ocf_data_sampler/numpy_batch/gsp.py,sha256=EL0_cJJNyvkQQcOat9vFA61pF4lema3BP_vB4ZS788U,805
@@ -16,17 +16,17 @@ ocf_data_sampler/numpy_batch/nwp.py,sha256=Rv0yfDj902Z2oCwdlRjOs3Kh-F5Fgxjjylh99
16
16
  ocf_data_sampler/numpy_batch/satellite.py,sha256=e6eoNmiiHtzZbDVtBolFzDuE3qwhHN6bL9H86emAUsk,732
17
17
  ocf_data_sampler/numpy_batch/sun_position.py,sha256=UW6-WtjrKdCkcguolHUDSLhYFfarknQzzjlCX8YdEOM,1700
18
18
  ocf_data_sampler/select/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
19
- ocf_data_sampler/select/dropout.py,sha256=JYbjG5e8d48te7xj4I9pTWk43d6ksjGeyKFLSTuAOlY,1062
19
+ ocf_data_sampler/select/dropout.py,sha256=3aDqlL3U9kzzIkIHV44h5_ZbfOUSg1iChHKingXk7-s,1064
20
20
  ocf_data_sampler/select/fill_time_periods.py,sha256=iTtMjIPFYG5xtUYYedAFBLjTWWUa7t7WQ0-yksWf0-E,440
21
21
  ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=6ioB8LeFpFNBMgKDxrgG3zqzNjkBF_jlV9yye2ZYT2E,11925
22
22
  ocf_data_sampler/select/select_spatial_slice.py,sha256=7BSzOFPMSBWpBWXSajWTfI8luUVsSgh4zN-rkr-AuUs,11470
23
- ocf_data_sampler/select/select_time_slice.py,sha256=XuksC9N03c5rV9OeWtxjGuoGyeJJGy4JMJe3w7m6oaw,6654
23
+ ocf_data_sampler/select/select_time_slice.py,sha256=41cch1fQr59fZgv7UHsNGc3OvoynrixT3bmr3_1d7cU,6628
24
24
  ocf_data_sampler/torch_datasets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
25
25
  ocf_data_sampler/torch_datasets/pvnet_uk_regional.py,sha256=haljV4FAZI4-Qf-65nq-JIJOIQNhR6YRncjTBWMYkY4,18502
26
26
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  tests/conftest.py,sha256=OcArgF60paroZQqoP7xExRBF34nEyMuXd7dS7hD6p3w,5393
28
- ocf_data_sampler-0.0.14.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
29
- ocf_data_sampler-0.0.14.dist-info/METADATA,sha256=3aN9lKWnmbNdjsF-J69AKAPwvc2WwUDkb0Nnyorr92c,588
30
- ocf_data_sampler-0.0.14.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
31
- ocf_data_sampler-0.0.14.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
32
- ocf_data_sampler-0.0.14.dist-info/RECORD,,
28
+ ocf_data_sampler-0.0.15.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
29
+ ocf_data_sampler-0.0.15.dist-info/METADATA,sha256=LaNhiRYMOobKgxuQvARTv5hzlswCaINSJtxchuT-lgY,588
30
+ ocf_data_sampler-0.0.15.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
31
+ ocf_data_sampler-0.0.15.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
32
+ ocf_data_sampler-0.0.15.dist-info/RECORD,,