File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -341,11 +341,14 @@ def determine_target_size(var_type: str) -> int:
341341    full_shape  =  tuple (dim .size  for  dim  in  ds .variables [idx ].dimensions )
342342    target_size  =  determine_target_size (var_type )
343343
344-     chunks  =  ChunkGridMetadata (
345-         chunk_grid = RegularChunkGrid (
346-             configuration = RegularChunkShape (chunk_shape = get_constrained_chunksize (full_shape , var_type , target_size ))
347-         )
348-     )
344+     chunk_shape  =  get_constrained_chunksize (full_shape , var_type , target_size )
345+     chunks  =  ChunkGridMetadata .model_validate ({
346+         "chunkGrid" : {
347+             "configuration" : {
348+                 "chunkShape" : chunk_shape 
349+             }
350+         }
351+     })
349352
350353    # Update the variable's metadata with the new chunk grid 
351354    if  ds .variables [idx ].metadata  is  None :
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments