File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed 
lis/utils/usaf/s2s/s2s_modules/s2splots Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 3939import  cartopy .io .img_tiles  as  cimgt 
4040import  shapely .geometry  as  sgeom 
4141import  requests 
42+ import  dask 
4243import  PIL 
4344import  numpy  as  np 
4445mpl .use ('pdf' )
@@ -544,9 +545,12 @@ def preproc(ds_):
544545
545546def  crop  (limits , lat , lon , xrin ):
546547    ''' crops a data set''' 
547-     xr_lon  =  (lon  >=  limits [2 ]) &  (lon  <=  limits [3 ])
548-     xr_lat  =  (lat  >=  limits [0 ]) &  (lat  <=  limits [1 ])
549-     crop_xcm  =  xrin .where (xr_lon  &  xr_lat , drop = True )
548+     with  dask .config .set (** {'array.slicing.split_large_chunks' : True }):
549+         xr_lon  =  (lon  >=  limits [2 ]) &  (lon  <=  limits [3 ])
550+         xr_lat  =  (lat  >=  limits [0 ]) &  (lat  <=  limits [1 ])
551+         xr_lon  =  xr_lon .compute ()
552+         xr_lat  =  xr_lat .compute ()
553+         crop_xcm  =  xrin .where (xr_lon  &  xr_lat , drop = True )
550554    return  crop_xcm 
551555
552556def  getclosest_ij (lats ,lons ,latpt ,lonpt ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments