From 3ee8f2553892e846b18d2ebe9525bd075e9f88d4 Mon Sep 17 00:00:00 2001 From: Bryan Lawrence Date: Thu, 22 Feb 2024 09:19:09 +0000 Subject: [PATCH] Temporary file for use while constructing functionalit. Will turn into a test at some point. --- bnl/playing.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 bnl/playing.py diff --git a/bnl/playing.py b/bnl/playing.py new file mode 100644 index 0000000..ebd6b01 --- /dev/null +++ b/bnl/playing.py @@ -0,0 +1,27 @@ +import pyfive +from pathlib import Path +from pyfive.as_dataobjects import ADataObjects + +MYFILE = 'da193o_25_day__grid_T_198807-198807.nc' +MYFILE = '../tests/chunked.hdf5' +MYPATH = Path(__file__).parent + +#f = h5py.File(MYPATH/MYFILE,'r') +f2 = pyfive.File(MYPATH/MYFILE) +path = 'dataset1' +link_target = f2._links[path] +dsref = ADataObjects(f2.file._fh, link_target) +chunk_index = dsref.get_offset_addresses() +print(chunk_index) + + +#v='tos' +#tos =f2[v] +#v='dataset1' +#print(tos) +#x = tos[2,:] +#print(x) +#print(tos.shape) + + +