Skip to content

Commit 3016908

Browse files
committed
comment out extra block
1 parent 2276b59 commit 3016908

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

activestorage/netcdf_to_zarr.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,18 @@ def gen_json(file_url, varname, outf, storage_type, storage_options):
146146
# if not operating with two open Files: W and R
147147
# - this block can not be extracted into a function because we need to dealloc each instance of
148148
# s3file_o, s3file_r and s3file_w (hence the naming is different in the step above)
149-
s3file_r = h5py.File(s3file_o, mode="r")
150-
s3file_w = h5py.File(s3file_o, mode="w")
151-
if isinstance(s3file_r[varname], h5py.Dataset):
152-
print("Looking only at a single Dataset", s3file_r[varname])
153-
s3file_w.create_group(varname + " ")
154-
s3file_w[varname + " "][varname] = s3file_w[varname]
155-
s3file = s3file_w[varname + " "]
156-
elif isinstance(s3file_r[varname], h5py.Group):
157-
print("Looking only at a single Group", s3file_r[varname])
158-
s3file = s3file_r[varname]
159-
160-
s3file_r.close()
149+
#s3file_r = h5py.File(s3file_o, mode="r")
150+
#s3file_w = h5py.File(s3file_o, mode="w")
151+
#if isinstance(s3file_r[varname], h5py.Dataset):
152+
# print("Looking only at a single Dataset", s3file_r[varname])
153+
# s3file_w.create_group(varname + " ")
154+
# s3file_w[varname + " "][varname] = s3file_w[varname]
155+
# s3file = s3file_w[varname + " "]
156+
#elif isinstance(s3file_r[varname], h5py.Group):
157+
# print("Looking only at a single Group", s3file_r[varname])
158+
# s3file = s3file_r[varname]
159+
160+
#s3file_r.close()
161161

162162
# Kerchunk wants the correct file name in S3 format
163163
if not file_url.startswith("s3://"):

0 commit comments

Comments
 (0)