ocf-data-sampler 0.0.22__py3-none-any.whl → 0.0.23__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.22
3
+ Version: 0.0.23
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
@@ -37,7 +37,7 @@ tests/load/test_load_gsp.py,sha256=aT_nqaSXmUTcdHzuTT7AmXJr3R31k4OEN-Fv3eLxlQE,4
37
37
  tests/load/test_load_nwp.py,sha256=3qyyDkB1q9t3tyAwogfotNrxqUOpXXimco1CImoEWGg,753
38
38
  tests/load/test_load_satellite.py,sha256=STX5AqqmOAgUgE9R1xyq_sM3P1b8NKdGjO-hDhayfxM,524
39
39
  tests/numpy_batch/test_gsp.py,sha256=ke4CsFn9ZKRgrciT5-OHS8jmd8nu9gGKKr0T2WzZK6M,592
40
- tests/numpy_batch/test_nwp.py,sha256=yk77jZfba-dd5ImjOTWNTMNnjJR8SF0kSpZ-513vPTw,1490
40
+ tests/numpy_batch/test_nwp.py,sha256=7ELnpQc6kAWPTQoPejTnXIxCPgjFVmzmdsa8E0ZEBGY,1490
41
41
  tests/numpy_batch/test_satellite.py,sha256=DIVnVq7JYgoC6Y6xMtLCNUnk3ADzakCi0bZ44QTdPgQ,1230
42
42
  tests/numpy_batch/test_sun_position.py,sha256=zw7ErTKARkW8NrpXJ9MeGp-dkNBJsCscxQx0dnZHg2c,2513
43
43
  tests/select/test_dropout.py,sha256=kiycl7RxAQYMCZJlokmx6Da5h_oBpSs8Is8pmSW4gOU,2413
@@ -45,10 +45,10 @@ tests/select/test_fill_time_periods.py,sha256=o59f2YRe5b0vJrG3B0aYZkYeHnpNk4s6EJ
45
45
  tests/select/test_find_contiguous_time_periods.py,sha256=G6tJRJd0DMfH9EdfzlKWsmfTbtMwOf3w-2filjJzuIQ,5998
46
46
  tests/select/test_location.py,sha256=_WZk2FPYeJ-nIfCJS6Sp_yaVEEo7m31DmMFoZzgyCts,2712
47
47
  tests/select/test_select_spatial_slice.py,sha256=7EX9b6g-pMdACQx3yefjs5do2s-Rho2UmKevV4oglsU,5147
48
- tests/select/test_select_time_slice.py,sha256=rH4h90HdQCoWE7vV7ivMEKhiCStQDEcMBCPamiDuO0k,10147
48
+ tests/select/test_select_time_slice.py,sha256=XC1J3DBBDnt81jcba5u-Hnd0yKv8GIQErLm-OECV6rs,10147
49
49
  tests/torch_datasets/test_pvnet_uk_regional.py,sha256=r1SHtwaXQrOYU3EOH1OEp_Bamo338IMv-9Q_gKsUOa4,2789
50
- ocf_data_sampler-0.0.22.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
51
- ocf_data_sampler-0.0.22.dist-info/METADATA,sha256=iB2KIy-7AQjWsOQzQoINItbAlKFWv_3TIRcOJ1-f_Uw,5269
52
- ocf_data_sampler-0.0.22.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
53
- ocf_data_sampler-0.0.22.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
54
- ocf_data_sampler-0.0.22.dist-info/RECORD,,
50
+ ocf_data_sampler-0.0.23.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
51
+ ocf_data_sampler-0.0.23.dist-info/METADATA,sha256=mQrWfafPPHVh3Bq40lCEq2_qNcmCj2_8piukA2yqLAg,5269
52
+ ocf_data_sampler-0.0.23.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
53
+ ocf_data_sampler-0.0.23.dist-info/top_level.txt,sha256=KaQn5qzkJGJP6hKWqsVAc9t0cMLjVvSTk8-kTrW79SA,23
54
+ ocf_data_sampler-0.0.23.dist-info/RECORD,,
@@ -16,7 +16,7 @@ def da_nwp_like():
16
16
 
17
17
  x = np.arange(-100, 100, 10)
18
18
  y = np.arange(-100, 100, 10)
19
- steps = pd.timedelta_range("0H", "8H", freq="1H")
19
+ steps = pd.timedelta_range("0h", "8h", freq="1h")
20
20
  target_times = t0 + steps
21
21
 
22
22
  channels = ["t", "dswrf"]
@@ -6,7 +6,7 @@ import xarray as xr
6
6
  import pytest
7
7
 
8
8
 
9
- NWP_FREQ = pd.Timedelta("3H")
9
+ NWP_FREQ = pd.Timedelta("3h")
10
10
 
11
11
  @pytest.fixture(scope="module")
12
12
  def da_sat_like():
@@ -33,7 +33,7 @@ def da_nwp_like():
33
33
  x = np.arange(-100, 100)
34
34
  y = np.arange(-100, 100)
35
35
  datetimes = pd.date_range("2024-01-02 00:00", "2024-01-03 00:00", freq=NWP_FREQ)
36
- steps = pd.timedelta_range("0H", "16H", freq="1H")
36
+ steps = pd.timedelta_range("0h", "16h", freq="1h")
37
37
  channels = ["t", "dswrf"]
38
38
 
39
39
  da_nwp = xr.DataArray(
@@ -138,9 +138,9 @@ def test_select_time_slice_nwp_basic(da_nwp_like, t0_str):
138
138
 
139
139
  # Slice parameters
140
140
  t0 = pd.Timestamp(f"2024-01-02 {t0_str}")
141
- forecast_duration = pd.Timedelta("6H")
142
- history_duration = pd.Timedelta("3H")
143
- freq = pd.Timedelta("1H")
141
+ forecast_duration = pd.Timedelta("6h")
142
+ history_duration = pd.Timedelta("3h")
143
+ freq = pd.Timedelta("1h")
144
144
 
145
145
  # Make the selection
146
146
  da_slice = select_time_slice_nwp(
@@ -172,10 +172,10 @@ def test_select_time_slice_nwp_with_dropout(da_nwp_like, dropout_hours):
172
172
  """Test the functionality of select_time_slice_nwp with dropout"""
173
173
 
174
174
  t0 = pd.Timestamp("2024-01-02 12:00")
175
- forecast_duration = pd.Timedelta("6H")
176
- history_duration = pd.Timedelta("3H")
177
- freq = pd.Timedelta("1H")
178
- dropout_timedelta = pd.Timedelta(f"-{dropout_hours}H")
175
+ forecast_duration = pd.Timedelta("6h")
176
+ history_duration = pd.Timedelta("3h")
177
+ freq = pd.Timedelta("1h")
178
+ dropout_timedelta = pd.Timedelta(f"-{dropout_hours}h")
179
179
 
180
180
  da_slice = select_time_slice_nwp(
181
181
  da_nwp_like,
@@ -207,10 +207,10 @@ def test_select_time_slice_nwp_with_dropout_and_accum(da_nwp_like, t0_str):
207
207
 
208
208
  # Slice parameters
209
209
  t0 = pd.Timestamp(f"2024-01-02 {t0_str}")
210
- forecast_duration = pd.Timedelta("6H")
211
- history_duration = pd.Timedelta("3H")
212
- freq = pd.Timedelta("1H")
213
- dropout_timedelta = pd.Timedelta("-2H")
210
+ forecast_duration = pd.Timedelta("6h")
211
+ history_duration = pd.Timedelta("3h")
212
+ freq = pd.Timedelta("1h")
213
+ dropout_timedelta = pd.Timedelta("-2h")
214
214
 
215
215
  t0_delayed = (t0 + dropout_timedelta).floor(NWP_FREQ)
216
216