@@ -38,7 +38,7 @@ class ColoredFormatter(logging.Formatter):
38
38
WARNING = "\033 [30;47m" ,
39
39
INFO = "\033 [36m" ,
40
40
DEBUG = "\033 [34m\t " ,
41
- )
41
+ )
42
42
43
43
def __init__ (self , message ):
44
44
super (ColoredFormatter , self ).__init__ (message )
@@ -59,7 +59,7 @@ class EddyParser(ArgumentParser):
59
59
"""
60
60
61
61
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"
63
63
64
64
def __init__ (self , * args , ** kwargs ):
65
65
super (EddyParser , self ).__init__ (* args , ** kwargs )
@@ -72,8 +72,8 @@ def add_base_argument(self):
72
72
dest = 'logging_level' ,
73
73
default = 'ERROR' ,
74
74
help = 'Levels : DEBUG, INFO, WARNING,'
75
- ' ERROR, CRITICAL' )
76
-
75
+ ' ERROR, CRITICAL' )
76
+
77
77
def parse_args (self , * args , ** kwargs ):
78
78
# set up logging to CONSOLE
79
79
console = logging .StreamHandler ()
@@ -101,8 +101,8 @@ def parse_args(self, *args, **kwargs):
101
101
axis = 'T' ,
102
102
longname = 'Time' ,
103
103
description = 'Date of this observation' ,
104
- )
105
- ),
104
+ )
105
+ ),
106
106
type_cyc = dict (
107
107
attr_name = None ,
108
108
nc_name = 'cyclonic_type' ,
@@ -113,29 +113,29 @@ def parse_args(self, *args, **kwargs):
113
113
longname = 'cyclonic' ,
114
114
units = 'boolean' ,
115
115
description = 'Cyclonic -1; anti-cyclonic +1' ,
116
- )
117
- ),
116
+ )
117
+ ),
118
118
segment_size = dict (
119
119
attr_name = None ,
120
120
nc_name = 'segment_size' ,
121
121
nc_type = 'byte' ,
122
122
nc_dims = ('obs' ,),
123
123
nc_attr = dict ()
124
- ),
124
+ ),
125
125
dlon = dict (
126
126
attr_name = None ,
127
127
nc_name = 'dlon' ,
128
128
nc_type = 'float64' ,
129
129
nc_dims = ('obs' ,),
130
130
nc_attr = dict ()
131
- ),
131
+ ),
132
132
dlat = dict (
133
133
attr_name = None ,
134
134
nc_name = 'dlat' ,
135
135
nc_type = 'float64' ,
136
136
nc_dims = ('obs' ,),
137
137
nc_attr = dict ()
138
- ),
138
+ ),
139
139
virtual = dict (
140
140
attr_name = None ,
141
141
nc_name = 'observation_flag' ,
@@ -147,8 +147,8 @@ def parse_args(self, *args, **kwargs):
147
147
units = 'boolean' ,
148
148
description = 'Flag indicating if the value is interpolated between two'
149
149
' observations or not (0: observed, 1: interpolated)' ,
150
- )
151
- ),
150
+ )
151
+ ),
152
152
cost_association = dict (
153
153
attr_name = None ,
154
154
nc_name = 'cost_association' ,
@@ -157,8 +157,8 @@ def parse_args(self, *args, **kwargs):
157
157
nc_attr = dict (
158
158
longname = 'cost_value_to_associate_with_next_observation' ,
159
159
description = 'Cost value to associate with the next observation' ,
160
- )
161
- ),
160
+ )
161
+ ),
162
162
lon = dict (
163
163
attr_name = 'lon' ,
164
164
compute_type = 'float64' ,
@@ -172,8 +172,8 @@ def parse_args(self, *args, **kwargs):
172
172
description = 'Observation longitude' ,
173
173
longname = 'longitude of measurement' ,
174
174
standard_name = 'longitude' ,
175
- )
176
- ),
175
+ )
176
+ ),
177
177
lat = dict (
178
178
attr_name = 'lat' ,
179
179
compute_type = 'float64' ,
@@ -187,8 +187,8 @@ def parse_args(self, *args, **kwargs):
187
187
longname = 'latitude of measurement' ,
188
188
standard_name = 'latitude' ,
189
189
description = 'Observation latitude' ,
190
- )
191
- ),
190
+ )
191
+ ),
192
192
lon_max = dict (
193
193
attr_name = 'lon_max' ,
194
194
compute_type = 'float64' ,
@@ -202,8 +202,8 @@ def parse_args(self, *args, **kwargs):
202
202
description = 'Observation longitude' ,
203
203
longname = 'longitude of amplitude max' ,
204
204
standard_name = 'longitude' ,
205
- )
206
- ),
205
+ )
206
+ ),
207
207
lat_max = dict (
208
208
attr_name = 'lat_max' ,
209
209
compute_type = 'float64' ,
@@ -217,8 +217,8 @@ def parse_args(self, *args, **kwargs):
217
217
description = 'Observation latitude' ,
218
218
longname = 'latitude of amplitude max' ,
219
219
standard_name = 'latitude' ,
220
- )
221
- ),
220
+ )
221
+ ),
222
222
amplitude = dict (
223
223
attr_name = 'amplitude' ,
224
224
nc_name = 'amplitude' ,
@@ -232,8 +232,8 @@ def parse_args(self, *args, **kwargs):
232
232
units = 'm' ,
233
233
description = 'Magnitude of the height difference between the extremum of ADT within '
234
234
'the eddy and the ADT around the contour defining the eddy perimeter' ,
235
- )
236
- ),
235
+ )
236
+ ),
237
237
speed_radius = dict (
238
238
attr_name = 'speed_radius' ,
239
239
scale_factor = .0001 ,
@@ -246,8 +246,8 @@ def parse_args(self, *args, **kwargs):
246
246
longname = 'maximum circum-averaged speed' ,
247
247
units = 'm/s' ,
248
248
description = 'Average speed of the contour defining the radius scale “speed_radius”' ,
249
- )
250
- ),
249
+ )
250
+ ),
251
251
uavg_profile = dict (
252
252
attr_name = None ,
253
253
nc_name = 'uavg_profile' ,
@@ -269,8 +269,8 @@ def parse_args(self, *args, **kwargs):
269
269
nc_attr = dict (
270
270
longname = 'longitude index in the grid of the detection' ,
271
271
description = 'Longitude index in the grid of the detection' ,
272
- )
273
- ),
272
+ )
273
+ ),
274
274
j = dict (
275
275
attr_name = 'j' ,
276
276
nc_name = 'j' ,
@@ -279,8 +279,8 @@ def parse_args(self, *args, **kwargs):
279
279
nc_attr = dict (
280
280
longname = 'latitude index in the grid of the detection' ,
281
281
description = 'Latitude index in the grid of the detection' ,
282
- )
283
- ),
282
+ )
283
+ ),
284
284
eke = dict (
285
285
attr_name = 'eke' ,
286
286
nc_name = 'Teke' ,
@@ -291,8 +291,8 @@ def parse_args(self, *args, **kwargs):
291
291
units = 'm^2/s^2' ,
292
292
description = 'Sum of eddy kinetic energy within contour '
293
293
'defining the effective radius' ,
294
- )
295
- ),
294
+ )
295
+ ),
296
296
radius_e = dict (
297
297
attr_name = 'radius_e' ,
298
298
nc_name = 'effective_radius' ,
@@ -305,8 +305,8 @@ def parse_args(self, *args, **kwargs):
305
305
longname = 'effective radius scale' ,
306
306
units = 'm' ,
307
307
description = 'Radius of a circle whose area is equal to that enclosed by the effective contour' ,
308
- )
309
- ),
308
+ )
309
+ ),
310
310
radius_s = dict (
311
311
attr_name = 'radius_s' ,
312
312
nc_name = 'speed_radius' ,
@@ -319,8 +319,8 @@ def parse_args(self, *args, **kwargs):
319
319
longname = 'speed radius scale' ,
320
320
units = 'm' ,
321
321
description = 'Radius of a circle whose area is equal to that enclosed by the contour of maximum circum-average speed' ,
322
- )
323
- ),
322
+ )
323
+ ),
324
324
track = dict (
325
325
attr_name = None ,
326
326
nc_name = 'track' ,
@@ -330,8 +330,8 @@ def parse_args(self, *args, **kwargs):
330
330
longname = 'track number' ,
331
331
units = 'ordinal' ,
332
332
description = 'Eddy identification number' ,
333
- )
334
- ),
333
+ )
334
+ ),
335
335
n = dict (
336
336
attr_name = None ,
337
337
nc_name = 'observation_number' ,
@@ -342,8 +342,8 @@ def parse_args(self, *args, **kwargs):
342
342
longname = 'observation number' ,
343
343
units = 'ordinal' ,
344
344
description = 'Observation sequence number, days from eddy first detection' ,
345
- )
346
- ),
345
+ )
346
+ ),
347
347
contour_lon_e = dict (
348
348
attr_name = None ,
349
349
nc_name = 'effective_contour_longitude' ,
@@ -358,8 +358,8 @@ def parse_args(self, *args, **kwargs):
358
358
description = 'Longitudes of effective contour' ,
359
359
units = 'degrees_east' ,
360
360
axis = 'X' ,
361
- )
362
- ),
361
+ )
362
+ ),
363
363
contour_lat_e = dict (
364
364
attr_name = None ,
365
365
nc_name = 'effective_contour_latitude' ,
@@ -373,8 +373,8 @@ def parse_args(self, *args, **kwargs):
373
373
description = 'Latitudes of effective contour' ,
374
374
units = 'degrees_east' ,
375
375
axis = 'X' ,
376
- )
377
- ),
376
+ )
377
+ ),
378
378
contour_lon_s = dict (
379
379
attr_name = None ,
380
380
nc_name = 'speed_contour_longitude' ,
@@ -389,8 +389,8 @@ def parse_args(self, *args, **kwargs):
389
389
description = 'Longitudes of speed contour' ,
390
390
units = 'degrees_east' ,
391
391
axis = 'X' ,
392
- )
393
- ),
392
+ )
393
+ ),
394
394
contour_lat_s = dict (
395
395
attr_name = None ,
396
396
nc_name = 'speed_contour_latitude' ,
@@ -404,8 +404,8 @@ def parse_args(self, *args, **kwargs):
404
404
description = 'Latitudes of speed contour' ,
405
405
units = 'degrees_east' ,
406
406
axis = 'X' ,
407
- )
408
- ),
407
+ )
408
+ ),
409
409
shape_error_e = dict (
410
410
attr_name = None ,
411
411
nc_name = 'effective_contour_shape_error' ,
@@ -418,8 +418,8 @@ def parse_args(self, *args, **kwargs):
418
418
units = '%' ,
419
419
description = 'Error criterion of fit on effective contour' ,
420
420
longname = 'effective contour error' ,
421
- )
422
- ),
421
+ )
422
+ ),
423
423
shape_error_s = dict (
424
424
attr_name = None ,
425
425
nc_name = 'speed_contour_shape_error' ,
@@ -432,8 +432,8 @@ def parse_args(self, *args, **kwargs):
432
432
units = '%' ,
433
433
description = 'Error criterion of fit on speed contour' ,
434
434
longname = 'speed contour error' ,
435
- )
436
- ),
435
+ )
436
+ ),
437
437
height_max_speed_contour = dict (
438
438
attr_name = None ,
439
439
nc_name = 'speed_contour_height' ,
@@ -444,8 +444,8 @@ def parse_args(self, *args, **kwargs):
444
444
longname = 'speed contour height' ,
445
445
description = 'ADT filtered height for speed contour' ,
446
446
units = 'm' ,
447
- )
448
- ),
447
+ )
448
+ ),
449
449
height_external_contour = dict (
450
450
attr_name = None ,
451
451
nc_name = 'effective_contour_height' ,
@@ -456,8 +456,8 @@ def parse_args(self, *args, **kwargs):
456
456
longname = 'effective contour height' ,
457
457
description = 'ADT filtered height for effective contour' ,
458
458
units = 'm' ,
459
- )
460
- ),
459
+ )
460
+ ),
461
461
height_inner_contour = dict (
462
462
attr_name = None ,
463
463
nc_name = 'inner_contour_height' ,
@@ -468,8 +468,8 @@ def parse_args(self, *args, **kwargs):
468
468
longname = 'inner contour height' ,
469
469
description = 'ADT filtered height for inner contour' ,
470
470
units = 'm' ,
471
- )
472
- ),
471
+ )
472
+ ),
473
473
nb_contour_selected = dict (
474
474
attr_name = None ,
475
475
nc_name = 'num_contours' ,
@@ -480,9 +480,9 @@ def parse_args(self, *args, **kwargs):
480
480
longname = 'number of contour' ,
481
481
units = 'ordinal' ,
482
482
description = 'Number of contour selected for this eddy' ,
483
- )
484
- ),
485
- )
483
+ )
484
+ ),
485
+ )
486
486
487
487
for key in VAR_DESCR .keys ():
488
488
if 'output_type' not in VAR_DESCR [key ]:
@@ -493,4 +493,3 @@ def parse_args(self, *args, **kwargs):
493
493
VAR_DESCR_inv [VAR_DESCR [key ]['nc_name' ]] = key
494
494
for key_old in VAR_DESCR [key ].get ('old_nc_name' , list ()):
495
495
VAR_DESCR_inv [key_old ] = key
496
-
0 commit comments