Skip to content

Commit 6030040

Browse files
committed
fail a test and add v0 test
1 parent b1a1aeb commit 6030040

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

tests/test_compression_remote_reductionist.py

+39-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def test_compression_and_filters_cmip6_forced_s3_using_local_Reductionist():
184184
assert result == 239.25946044921875
185185

186186

187-
def test_compression_and_filters_cmip6_forced_s3_from_local_bigger_file():
187+
def test_compression_and_filters_cmip6_forced_s3_from_local_bigger_file_v1():
188188
"""
189189
Test identical to previous
190190
test_compression_and_filters_cmip6_forced_s3_from_local_2
@@ -219,3 +219,41 @@ def test_compression_and_filters_cmip6_forced_s3_from_local_bigger_file():
219219
active._method = "min"
220220

221221
result = active[0:2, 0:3, 4:6, 7:9]
222+
print(x)
223+
224+
225+
def test_compression_and_filters_cmip6_forced_s3_from_local_bigger_file_v0():
226+
"""
227+
Test identical to previous
228+
test_compression_and_filters_cmip6_forced_s3_from_local_2
229+
but using a bigger file, for more relevant performance measures.
230+
231+
This is for a special anon=True bucket connected to via valid key.secret
232+
Variable standard_name: tendency_of_eastward_wind_due_to_orographic_gravity_wave_drag
233+
Variable var_name: m01s06i247_4
234+
dims: 30 (time) 39 (plev) 325 (lat) 432 (lon)
235+
236+
Entire mother file info:
237+
[2024-01-24 10:07:02 GMT] 2.8GiB STANDARD da193a_25_day__198807-198807.nc
238+
"""
239+
storage_options = {
240+
'key': "f2d55c6dcfc7618b2c34e00b58df3cef",
241+
'secret': "$/'#M{0{/4rVhp%n^(XeX$q@y#&(NM3W1->~N.Q6VP.5[@bLpi='nt]AfH)>78pT",
242+
'client_kwargs': {'endpoint_url': "https://uor-aces-o.s3-ext.jc.rl.ac.uk"}
243+
}
244+
active_storage_url = "https://192.171.169.248:8080"
245+
bigger_file = "da193a_25_day__198807-198807.nc"
246+
247+
test_file_uri = os.path.join(
248+
S3_BUCKET,
249+
bigger_file
250+
)
251+
print("S3 Test file path:", test_file_uri)
252+
active = Active(test_file_uri, 'm01s06i247_4', storage_type="s3",
253+
storage_options=storage_options,
254+
active_storage_url=active_storage_url)
255+
256+
active._version = 0
257+
d = active[0:2, 0:3, 4:6, 7:9]
258+
min_result = np.min(d)
259+
print(min_result)

0 commit comments

Comments
 (0)