@@ -38,7 +38,7 @@ class ColoredFormatter(logging.Formatter):
3838 WARNING = "\033 [30;47m" ,
3939 INFO = "\033 [36m" ,
4040 DEBUG = "\033 [34m\t " ,
41- )
41+ )
4242
4343 def __init__ (self , message ):
4444 super (ColoredFormatter , self ).__init__ (message )
@@ -59,7 +59,7 @@ class EddyParser(ArgumentParser):
5959 """
6060
6161 FORMAT_LOG = "%(levelname)-8s %(asctime)s %(module)s." \
62- "%(funcName)s :\n \t \t \t \t \t %(message)s"
62+ "%(funcName)s :\n \t \t \t \t \t %(message)s"
6363
6464 def __init__ (self , * args , ** kwargs ):
6565 super (EddyParser , self ).__init__ (* args , ** kwargs )
@@ -72,8 +72,8 @@ def add_base_argument(self):
7272 dest = 'logging_level' ,
7373 default = 'ERROR' ,
7474 help = 'Levels : DEBUG, INFO, WARNING,'
75- ' ERROR, CRITICAL' )
76-
75+ ' ERROR, CRITICAL' )
76+
7777 def parse_args (self , * args , ** kwargs ):
7878 # set up logging to CONSOLE
7979 console = logging .StreamHandler ()
@@ -101,8 +101,8 @@ def parse_args(self, *args, **kwargs):
101101 axis = 'T' ,
102102 longname = 'Time' ,
103103 description = 'Date of this observation' ,
104- )
105- ),
104+ )
105+ ),
106106 type_cyc = dict (
107107 attr_name = None ,
108108 nc_name = 'cyclonic_type' ,
@@ -113,29 +113,29 @@ def parse_args(self, *args, **kwargs):
113113 longname = 'cyclonic' ,
114114 units = 'boolean' ,
115115 description = 'Cyclonic -1; anti-cyclonic +1' ,
116- )
117- ),
116+ )
117+ ),
118118 segment_size = dict (
119119 attr_name = None ,
120120 nc_name = 'segment_size' ,
121121 nc_type = 'byte' ,
122122 nc_dims = ('obs' ,),
123123 nc_attr = dict ()
124- ),
124+ ),
125125 dlon = dict (
126126 attr_name = None ,
127127 nc_name = 'dlon' ,
128128 nc_type = 'float64' ,
129129 nc_dims = ('obs' ,),
130130 nc_attr = dict ()
131- ),
131+ ),
132132 dlat = dict (
133133 attr_name = None ,
134134 nc_name = 'dlat' ,
135135 nc_type = 'float64' ,
136136 nc_dims = ('obs' ,),
137137 nc_attr = dict ()
138- ),
138+ ),
139139 virtual = dict (
140140 attr_name = None ,
141141 nc_name = 'observation_flag' ,
@@ -147,8 +147,8 @@ def parse_args(self, *args, **kwargs):
147147 units = 'boolean' ,
148148 description = 'Flag indicating if the value is interpolated between two'
149149 ' observations or not (0: observed, 1: interpolated)' ,
150- )
151- ),
150+ )
151+ ),
152152 cost_association = dict (
153153 attr_name = None ,
154154 nc_name = 'cost_association' ,
@@ -157,8 +157,8 @@ def parse_args(self, *args, **kwargs):
157157 nc_attr = dict (
158158 longname = 'cost_value_to_associate_with_next_observation' ,
159159 description = 'Cost value to associate with the next observation' ,
160- )
161- ),
160+ )
161+ ),
162162 lon = dict (
163163 attr_name = 'lon' ,
164164 compute_type = 'float64' ,
@@ -172,8 +172,8 @@ def parse_args(self, *args, **kwargs):
172172 description = 'Observation longitude' ,
173173 longname = 'longitude of measurement' ,
174174 standard_name = 'longitude' ,
175- )
176- ),
175+ )
176+ ),
177177 lat = dict (
178178 attr_name = 'lat' ,
179179 compute_type = 'float64' ,
@@ -187,8 +187,8 @@ def parse_args(self, *args, **kwargs):
187187 longname = 'latitude of measurement' ,
188188 standard_name = 'latitude' ,
189189 description = 'Observation latitude' ,
190- )
191- ),
190+ )
191+ ),
192192 lon_max = dict (
193193 attr_name = 'lon_max' ,
194194 compute_type = 'float64' ,
@@ -202,8 +202,8 @@ def parse_args(self, *args, **kwargs):
202202 description = 'Observation longitude' ,
203203 longname = 'longitude of amplitude max' ,
204204 standard_name = 'longitude' ,
205- )
206- ),
205+ )
206+ ),
207207 lat_max = dict (
208208 attr_name = 'lat_max' ,
209209 compute_type = 'float64' ,
@@ -217,8 +217,8 @@ def parse_args(self, *args, **kwargs):
217217 description = 'Observation latitude' ,
218218 longname = 'latitude of amplitude max' ,
219219 standard_name = 'latitude' ,
220- )
221- ),
220+ )
221+ ),
222222 amplitude = dict (
223223 attr_name = 'amplitude' ,
224224 nc_name = 'amplitude' ,
@@ -232,8 +232,8 @@ def parse_args(self, *args, **kwargs):
232232 units = 'm' ,
233233 description = 'Magnitude of the height difference between the extremum of ADT within '
234234 'the eddy and the ADT around the contour defining the eddy perimeter' ,
235- )
236- ),
235+ )
236+ ),
237237 speed_radius = dict (
238238 attr_name = 'speed_radius' ,
239239 scale_factor = .0001 ,
@@ -246,8 +246,8 @@ def parse_args(self, *args, **kwargs):
246246 longname = 'maximum circum-averaged speed' ,
247247 units = 'm/s' ,
248248 description = 'Average speed of the contour defining the radius scale “speed_radius”' ,
249- )
250- ),
249+ )
250+ ),
251251 uavg_profile = dict (
252252 attr_name = None ,
253253 nc_name = 'uavg_profile' ,
@@ -269,8 +269,8 @@ def parse_args(self, *args, **kwargs):
269269 nc_attr = dict (
270270 longname = 'longitude index in the grid of the detection' ,
271271 description = 'Longitude index in the grid of the detection' ,
272- )
273- ),
272+ )
273+ ),
274274 j = dict (
275275 attr_name = 'j' ,
276276 nc_name = 'j' ,
@@ -279,8 +279,8 @@ def parse_args(self, *args, **kwargs):
279279 nc_attr = dict (
280280 longname = 'latitude index in the grid of the detection' ,
281281 description = 'Latitude index in the grid of the detection' ,
282- )
283- ),
282+ )
283+ ),
284284 eke = dict (
285285 attr_name = 'eke' ,
286286 nc_name = 'Teke' ,
@@ -291,8 +291,8 @@ def parse_args(self, *args, **kwargs):
291291 units = 'm^2/s^2' ,
292292 description = 'Sum of eddy kinetic energy within contour '
293293 'defining the effective radius' ,
294- )
295- ),
294+ )
295+ ),
296296 radius_e = dict (
297297 attr_name = 'radius_e' ,
298298 nc_name = 'effective_radius' ,
@@ -305,8 +305,8 @@ def parse_args(self, *args, **kwargs):
305305 longname = 'effective radius scale' ,
306306 units = 'm' ,
307307 description = 'Radius of a circle whose area is equal to that enclosed by the effective contour' ,
308- )
309- ),
308+ )
309+ ),
310310 radius_s = dict (
311311 attr_name = 'radius_s' ,
312312 nc_name = 'speed_radius' ,
@@ -319,8 +319,8 @@ def parse_args(self, *args, **kwargs):
319319 longname = 'speed radius scale' ,
320320 units = 'm' ,
321321 description = 'Radius of a circle whose area is equal to that enclosed by the contour of maximum circum-average speed' ,
322- )
323- ),
322+ )
323+ ),
324324 track = dict (
325325 attr_name = None ,
326326 nc_name = 'track' ,
@@ -330,8 +330,8 @@ def parse_args(self, *args, **kwargs):
330330 longname = 'track number' ,
331331 units = 'ordinal' ,
332332 description = 'Eddy identification number' ,
333- )
334- ),
333+ )
334+ ),
335335 n = dict (
336336 attr_name = None ,
337337 nc_name = 'observation_number' ,
@@ -342,8 +342,8 @@ def parse_args(self, *args, **kwargs):
342342 longname = 'observation number' ,
343343 units = 'ordinal' ,
344344 description = 'Observation sequence number, days from eddy first detection' ,
345- )
346- ),
345+ )
346+ ),
347347 contour_lon_e = dict (
348348 attr_name = None ,
349349 nc_name = 'effective_contour_longitude' ,
@@ -358,8 +358,8 @@ def parse_args(self, *args, **kwargs):
358358 description = 'Longitudes of effective contour' ,
359359 units = 'degrees_east' ,
360360 axis = 'X' ,
361- )
362- ),
361+ )
362+ ),
363363 contour_lat_e = dict (
364364 attr_name = None ,
365365 nc_name = 'effective_contour_latitude' ,
@@ -373,8 +373,8 @@ def parse_args(self, *args, **kwargs):
373373 description = 'Latitudes of effective contour' ,
374374 units = 'degrees_east' ,
375375 axis = 'X' ,
376- )
377- ),
376+ )
377+ ),
378378 contour_lon_s = dict (
379379 attr_name = None ,
380380 nc_name = 'speed_contour_longitude' ,
@@ -389,8 +389,8 @@ def parse_args(self, *args, **kwargs):
389389 description = 'Longitudes of speed contour' ,
390390 units = 'degrees_east' ,
391391 axis = 'X' ,
392- )
393- ),
392+ )
393+ ),
394394 contour_lat_s = dict (
395395 attr_name = None ,
396396 nc_name = 'speed_contour_latitude' ,
@@ -404,8 +404,8 @@ def parse_args(self, *args, **kwargs):
404404 description = 'Latitudes of speed contour' ,
405405 units = 'degrees_east' ,
406406 axis = 'X' ,
407- )
408- ),
407+ )
408+ ),
409409 shape_error_e = dict (
410410 attr_name = None ,
411411 nc_name = 'effective_contour_shape_error' ,
@@ -418,8 +418,8 @@ def parse_args(self, *args, **kwargs):
418418 units = '%' ,
419419 description = 'Error criterion of fit on effective contour' ,
420420 longname = 'effective contour error' ,
421- )
422- ),
421+ )
422+ ),
423423 shape_error_s = dict (
424424 attr_name = None ,
425425 nc_name = 'speed_contour_shape_error' ,
@@ -432,8 +432,8 @@ def parse_args(self, *args, **kwargs):
432432 units = '%' ,
433433 description = 'Error criterion of fit on speed contour' ,
434434 longname = 'speed contour error' ,
435- )
436- ),
435+ )
436+ ),
437437 height_max_speed_contour = dict (
438438 attr_name = None ,
439439 nc_name = 'speed_contour_height' ,
@@ -444,8 +444,8 @@ def parse_args(self, *args, **kwargs):
444444 longname = 'speed contour height' ,
445445 description = 'ADT filtered height for speed contour' ,
446446 units = 'm' ,
447- )
448- ),
447+ )
448+ ),
449449 height_external_contour = dict (
450450 attr_name = None ,
451451 nc_name = 'effective_contour_height' ,
@@ -456,8 +456,8 @@ def parse_args(self, *args, **kwargs):
456456 longname = 'effective contour height' ,
457457 description = 'ADT filtered height for effective contour' ,
458458 units = 'm' ,
459- )
460- ),
459+ )
460+ ),
461461 height_inner_contour = dict (
462462 attr_name = None ,
463463 nc_name = 'inner_contour_height' ,
@@ -468,8 +468,8 @@ def parse_args(self, *args, **kwargs):
468468 longname = 'inner contour height' ,
469469 description = 'ADT filtered height for inner contour' ,
470470 units = 'm' ,
471- )
472- ),
471+ )
472+ ),
473473 nb_contour_selected = dict (
474474 attr_name = None ,
475475 nc_name = 'num_contours' ,
@@ -480,9 +480,9 @@ def parse_args(self, *args, **kwargs):
480480 longname = 'number of contour' ,
481481 units = 'ordinal' ,
482482 description = 'Number of contour selected for this eddy' ,
483- )
484- ),
485- )
483+ )
484+ ),
485+ )
486486
487487for key in VAR_DESCR .keys ():
488488 if 'output_type' not in VAR_DESCR [key ]:
@@ -493,4 +493,3 @@ def parse_args(self, *args, **kwargs):
493493 VAR_DESCR_inv [VAR_DESCR [key ]['nc_name' ]] = key
494494 for key_old in VAR_DESCR [key ].get ('old_nc_name' , list ()):
495495 VAR_DESCR_inv [key_old ] = key
496-
0 commit comments