@@ -274,6 +274,7 @@ def load_from_netcdf(cls, filename, raw_data=False):
274
274
var_inv = VAR_DESCR_inv [variable ]
275
275
if var_inv == 'type_cyc' :
276
276
eddies .sign_type = h_nc .variables [variable ][0 ]
277
+ eddies .sign_type = getattr (h_nc , 'rotation_type' , 0 )
277
278
if eddies .sign_type == 0 :
278
279
logging .debug ('File come from another algorithm of identification' )
279
280
eddies .sign_type = - 1
@@ -301,8 +302,7 @@ def from_netcdf(cls, handler):
301
302
eddies .obs [VAR_DESCR_inv [variable ]] = handler .variables [variable ][:]
302
303
return eddies
303
304
304
- @staticmethod
305
- def propagate (previous_obs , current_obs , obs_to_extend , dead_track , nb_next , model ):
305
+ def propagate (self , previous_obs , current_obs , obs_to_extend , dead_track , nb_next , model ):
306
306
"""
307
307
Filled virtual obs (C)
308
308
Args:
@@ -321,6 +321,7 @@ def propagate(previous_obs, current_obs, obs_to_extend, dead_track, nb_next, mod
321
321
track_extra_variables = model .track_extra_variables ,
322
322
track_array_variables = model .track_array_variables ,
323
323
array_variables = model .array_variables )
324
+ next_obs .sign_type = self .sign_type
324
325
nb_dead = len (previous_obs )
325
326
nb_virtual_extend = nb_next - nb_dead
326
327
@@ -349,9 +350,6 @@ def propagate(previous_obs, current_obs, obs_to_extend, dead_track, nb_next, mod
349
350
return next_obs
350
351
351
352
352
-
353
-
354
-
355
353
@staticmethod
356
354
def cost_function_common_area (xy_in , xy_out , distance , intern = False ):
357
355
""" How does it work on x bound ?
@@ -695,6 +693,7 @@ def set_global_attr_netcdf(self, h_nc):
695
693
h_nc .comment = 'Surface product; mesoscale eddies'
696
694
h_nc .framework_used = 'https://bitbucket.org/emason/py-eddy-tracker'
697
695
h_nc .standard_name_vocabulary = 'NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table'
696
+ h_nc .rotation_type = self .sign_type
698
697
699
698
def display (self , ax , ref = None , ** kwargs ):
700
699
if ref is None :
0 commit comments