@@ -824,19 +824,19 @@ def open_store_variable(self, name):
824
824
# probably be 3.1
825
825
import zarr
826
826
827
+ #
827
828
if Version (zarr .__version__ ) >= Version ("3.0.6" ):
828
829
attributes ["_FillValue" ] = (
829
830
# Use the new dtype infrastructure instead of doing xarray
830
831
# specific fill value decoding
831
- zarr_array . metadata . data_type . from_json_value (
832
+ FillValueCoder . decode (
832
833
attributes ["_FillValue" ],
833
- zarr_format = zarr_array .metadata .zarr_format ,
834
+ zarr_array .metadata .data_type . to_native_dtype () ,
834
835
)
835
836
)
836
837
else :
837
- original_zarr_dtype = zarr_array .metadata .data_type
838
838
attributes ["_FillValue" ] = FillValueCoder .decode (
839
- attributes ["_FillValue" ], original_zarr_dtype .value
839
+ attributes ["_FillValue" ], zarr_array . metadata . data_type .value
840
840
)
841
841
return Variable (dimensions , data , attributes , encoding )
842
842
@@ -953,6 +953,7 @@ def store(
953
953
variables_encoded , attributes = self .encode (
954
954
{vn : variables [vn ] for vn in new_variable_names }, attributes
955
955
)
956
+ print (f"{ variables_encoded = } " )
956
957
957
958
if existing_variable_names :
958
959
# We make sure that values to be appended are encoded *exactly*
@@ -1005,6 +1006,7 @@ def store(
1005
1006
else :
1006
1007
variables_to_set = variables_encoded
1007
1008
1009
+ print (f"{ variables_to_set = } " )
1008
1010
self .set_variables (
1009
1011
variables_to_set , check_encoding_set , writer , unlimited_dims = unlimited_dims
1010
1012
)
@@ -1013,6 +1015,7 @@ def store(
1013
1015
if _zarr_v3 ():
1014
1016
kwargs ["zarr_format" ] = self .zarr_group .metadata .zarr_format
1015
1017
zarr .consolidate_metadata (self .zarr_group .store , ** kwargs )
1018
+ print ("DONE STORE.STORE" )
1016
1019
1017
1020
def sync (self ):
1018
1021
pass
@@ -1062,6 +1065,7 @@ def _open_existing_array(self, *, name) -> ZarrArray:
1062
1065
def _create_new_array (
1063
1066
self , * , name , shape , dtype , fill_value , encoding , attrs
1064
1067
) -> ZarrArray :
1068
+ # STRING ERROR FOR OBJECT HERE
1065
1069
if coding .strings .check_vlen_dtype (dtype ) is str :
1066
1070
dtype = str
1067
1071
@@ -1085,6 +1089,8 @@ def _create_new_array(
1085
1089
if c in encoding :
1086
1090
encoding ["config" ][c ] = encoding .pop (c )
1087
1091
1092
+ print ("create" )
1093
+ print (dtype )
1088
1094
zarr_array = self .zarr_group .create (
1089
1095
name ,
1090
1096
shape = shape ,
@@ -1223,6 +1229,8 @@ def set_variables(
1223
1229
1224
1230
encoding ["overwrite" ] = self ._mode == "w"
1225
1231
1232
+ print (dtype )
1233
+ print (";sdf" )
1226
1234
zarr_array = self ._create_new_array (
1227
1235
name = name ,
1228
1236
dtype = dtype ,
@@ -1231,6 +1239,8 @@ def set_variables(
1231
1239
encoding = encoding ,
1232
1240
attrs = encoded_attrs ,
1233
1241
)
1242
+ print (zarr_array )
1243
+ print (type (zarr_array ))
1234
1244
1235
1245
writer .add (v .data , zarr_array , region )
1236
1246
0 commit comments