Skip to content

Commit caf3a3b

Browse files
author
adelepoulle
committed
Rewrite command to store array variable
1 parent ab8bba0 commit caf3a3b

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

share/eddy_identification.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ EVOLVE_AREA_MAX: 500 # max change in area
9090
# - profiles of swirl velocity from effective contour inwards
9191
# Useful for working with ARGO data
9292
TRACK_EXTRA_VARIABLES: No
93+
TRACK_ARRAY_VARIABLES:
94+
NB_SAMPLES: 10
95+
VARIABLES:
96+
- contour_lon
97+
- contour_lat
9398

9499
# 'RectBivariate' is faster
95100
INTERP_METHOD: 'RectBivariate'

src/py_eddy_tracker/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,26 @@ def parse_args(self, *args, **kwargs):
243243
description='observation sequence number (XX day intervals)',
244244
)
245245
),
246+
contour_lon=dict(
247+
attr_name=None,
248+
nc_name='contour_lon',
249+
nc_type='f4',
250+
nc_dims=('Nobs', 'NbSample'),
251+
nc_attr=dict(
252+
long_name='Longitude of contour',
253+
description='lons of contour points',
254+
)
255+
),
256+
contour_lat=dict(
257+
attr_name=None,
258+
nc_name='contour_lat',
259+
nc_type='f4',
260+
nc_dims=('Nobs', 'NbSample'),
261+
nc_attr=dict(
262+
long_name='Latitude of contour',
263+
description='lats of contour points',
264+
)
265+
),
246266
contour_e=dict(
247267
attr_name=None,
248268
nc_name='contour_e',

src/py_eddy_tracker/make_eddy_tracker_list_obj.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ def __init__(self, sign_type, grd, date, **kwargs):
673673
self.diagnostic_type = kwargs.get('DIAGNOSTIC_TYPE', 'SLA')
674674
self.the_domain = kwargs.get('THE_DOMAIN', 'Regional')
675675
self.track_extra_variables = kwargs.get('TRACK_EXTRA_VARIABLES', False)
676+
array_properties = kwargs.get('TRACK_ARRAY_VARIABLES', dict())
677+
self.track_array_variables_sampling = array_properties.get('NB_SAMPLES', 0)
678+
self.track_array_variables = array_properties.get('VARIABLES', [])
676679
self.smoothing = kwargs.get('SMOOTHING', True)
677680
self.max_local_extrema = kwargs.get('MAX_LOCAL_EXTREMA', 1)
678681
self.interp_method = kwargs.get('INTERP_METHOD', 'RectBivariate')

src/py_eddy_tracker/py_eddy_tracker_classes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,9 @@ def collection_loop(contours, grd, rtime, a_list_obj, c_list_obj,
467467
args = (eddy, contours, centlon_e, centlat_e, cont, grd,
468468
anticyclonic_search)
469469

470+
#~ if eddy.track_array_variables > 10:
471+
#~ print ':)'
472+
#~ exit()
470473
if not eddy.track_extra_variables:
471474
# (uavg, centlon_s, centlat_s,
472475
# eddy_radius_s, contlon_s, contlat_s,

0 commit comments

Comments
 (0)