@@ -146,18 +146,18 @@ def gen_json(file_url, varname, outf, storage_type, storage_options):
146
146
# if not operating with two open Files: W and R
147
147
# - this block can not be extracted into a function because we need to dealloc each instance of
148
148
# 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()
161
161
162
162
# Kerchunk wants the correct file name in S3 format
163
163
if not file_url .startswith ("s3://" ):
0 commit comments