@@ -231,35 +231,35 @@ def create_unstruct_xarray(values, l0, l1, xyz):
231231 # Values and lith block
232232 property_v3 = xr .DataArray (
233233 data = values [0 ][:, l0 :l1 ],
234- dims = ['attribute ' , 'cell' ],
234+ dims = ['cell_attr ' , 'cell' ],
235235 )
236236
237- arrays ['property_v3 ' ] = property_v3
237+ arrays ['property ' ] = property_v3
238238
239239 if values [1 ] is not None :
240240 # block
241241 block_v3 = xr .DataArray (
242242 data = values [1 ][:, :, l0 :l1 ],
243- dims = ['Features' , 'attribute ' , 'cell' ],
243+ dims = ['Features' , 'cell_attr ' , 'cell' ],
244244 )
245245
246- arrays ['block_v3 ' ] = block_v3
246+ arrays ['block ' ] = block_v3
247247
248248 if values [4 ] is not None :
249249 # Scalar field
250250 scalar_field_v3 = xr .DataArray (
251251 data = values [4 ][:, l0 :l1 ],
252252 dims = ['Features' , 'cell' ],
253253 )
254- arrays ['scalar_field_v3 ' ] = scalar_field_v3
254+ arrays ['scalar_field ' ] = scalar_field_v3
255255
256256 if values [6 ] is not None :
257257 # Scalar field
258258 mask_v3 = xr .DataArray (
259259 data = values [6 ][:, l0 :l1 ],
260260 dims = ['Features' , 'cell' ],
261261 )
262- arrays ['mask_v3 ' ] = mask_v3
262+ arrays ['mask ' ] = mask_v3
263263
264264 return arrays
265265
@@ -272,8 +272,10 @@ def set_values_to_custom_grid(self, values: list, l0, l1,
272272 self .s_custom_grid = subsurface .UnstructuredData .from_array (
273273 vertex = xyz ,
274274 cells = "points" ,
275- attributes = arrays ,
276- coords = coords )
275+ cells_attr = arrays ,
276+ coords = coords ,
277+ default_cells_attr_name = "block"
278+ )
277279
278280 return self .s_custom_grid
279281
0 commit comments