Skip to content

Commit 472cea2

Browse files
author
adelepoulle
committed
Add specification to store array data
1 parent caf3a3b commit 472cea2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/py_eddy_tracker/__init__.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ def parse_args(self, *args, **kwargs):
247247
attr_name=None,
248248
nc_name='contour_lon',
249249
nc_type='f4',
250+
output_type='i2',
251+
scale_factor=0.01,
252+
add_offset=180,
250253
nc_dims=('Nobs', 'NbSample'),
251254
nc_attr=dict(
252255
long_name='Longitude of contour',
@@ -257,12 +260,39 @@ def parse_args(self, *args, **kwargs):
257260
attr_name=None,
258261
nc_name='contour_lat',
259262
nc_type='f4',
263+
output_type='i2',
264+
scale_factor=0.01,
260265
nc_dims=('Nobs', 'NbSample'),
261266
nc_attr=dict(
262267
long_name='Latitude of contour',
263268
description='lats of contour points',
264269
)
265270
),
271+
contour_lon_s=dict(
272+
attr_name=None,
273+
nc_name='contour_lon_s',
274+
nc_type='f4',
275+
output_type='i2',
276+
scale_factor=0.01,
277+
add_offset=180,
278+
nc_dims=('Nobs', 'NbSample'),
279+
nc_attr=dict(
280+
long_name='Longitude of speed-based contour points',
281+
description='lons of speed-based contour points',
282+
)
283+
),
284+
contour_lat_s=dict(
285+
attr_name=None,
286+
nc_name='contour_lat_s',
287+
nc_type='f4',
288+
output_type='i2',
289+
scale_factor=0.01,
290+
nc_dims=('Nobs', 'NbSample'),
291+
nc_attr=dict(
292+
long_name='Latitude of speed-based contour points',
293+
description='lats of speed-based contour points',
294+
)
295+
),
266296
contour_e=dict(
267297
attr_name=None,
268298
nc_name='contour_e',
@@ -307,4 +337,8 @@ def parse_args(self, *args, **kwargs):
307337
),
308338
)
309339

340+
for key in VAR_DESCR.keys():
341+
if 'output_type' not in VAR_DESCR[key]:
342+
VAR_DESCR[key]['output_type'] = VAR_DESCR[key]['nc_type']
343+
310344
VAR_DESCR_inv = {VAR_DESCR[key]['nc_name'] : key for key in VAR_DESCR.keys()}

0 commit comments

Comments
 (0)