@@ -701,11 +701,7 @@ def load_file(cls, filename, **kwargs):
701
701
.. code-block:: python
702
702
703
703
kwargs_latlon_300 = dict(
704
- include_vars=[
705
- "longitude",
706
- "latitude",
707
- ],
708
- indexs=dict(obs=slice(0, 300)),
704
+ include_vars=["longitude", "latitude",], indexs=dict(obs=slice(0, 300)),
709
705
)
710
706
small_dataset = TrackEddiesObservations.load_file(
711
707
filename, **kwargs_latlon_300
@@ -1677,7 +1673,8 @@ def write_file(
1677
1673
handler = zarr .open (filename , "w" )
1678
1674
self .to_zarr (handler , ** kwargs )
1679
1675
else :
1680
- with Dataset (filename , "w" , format = "NETCDF4" ) as handler :
1676
+ nc_format = kwargs .pop ("format" , "NETCDF4" )
1677
+ with Dataset (filename , "w" , format = nc_format ) as handler :
1681
1678
self .to_netcdf (handler , ** kwargs )
1682
1679
1683
1680
@property
@@ -1968,11 +1965,7 @@ def bins_stat(self, xname, bins=None, yname=None, method=None, mask=None):
1968
1965
1969
1966
def format_label (self , label ):
1970
1967
t0 , t1 = self .period
1971
- return label .format (
1972
- t0 = t0 ,
1973
- t1 = t1 ,
1974
- nb_obs = len (self ),
1975
- )
1968
+ return label .format (t0 = t0 , t1 = t1 , nb_obs = len (self ),)
1976
1969
1977
1970
def display (self , ax , ref = None , extern_only = False , intern_only = False , ** kwargs ):
1978
1971
"""Plot the speed and effective (dashed) contour of the eddies
@@ -2331,14 +2324,7 @@ def grid_count_pixel_in(
2331
2324
x_ , y_ = reduce_size (x_ , y_ )
2332
2325
v = create_vertice (x_ , y_ )
2333
2326
(x_start , x_stop ), (y_start , y_stop ) = bbox_indice_regular (
2334
- v ,
2335
- x_bounds ,
2336
- y_bounds ,
2337
- xstep ,
2338
- ystep ,
2339
- N ,
2340
- is_circular ,
2341
- x_size ,
2327
+ v , x_bounds , y_bounds , xstep , ystep , N , is_circular , x_size ,
2342
2328
)
2343
2329
i , j = get_pixel_in_regular (v , x_c , y_c , x_start , x_stop , y_start , y_stop )
2344
2330
grid_count_ (grid , i , j )
0 commit comments