@@ -274,6 +274,7 @@ def load_from_netcdf(cls, filename, raw_data=False):
274274 var_inv = VAR_DESCR_inv [variable ]
275275 if var_inv == 'type_cyc' :
276276 eddies .sign_type = h_nc .variables [variable ][0 ]
277+ eddies .sign_type = getattr (h_nc , 'rotation_type' , 0 )
277278 if eddies .sign_type == 0 :
278279 logging .debug ('File come from another algorithm of identification' )
279280 eddies .sign_type = - 1
@@ -301,8 +302,7 @@ def from_netcdf(cls, handler):
301302 eddies .obs [VAR_DESCR_inv [variable ]] = handler .variables [variable ][:]
302303 return eddies
303304
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 ):
306306 """
307307 Filled virtual obs (C)
308308 Args:
@@ -321,6 +321,7 @@ def propagate(previous_obs, current_obs, obs_to_extend, dead_track, nb_next, mod
321321 track_extra_variables = model .track_extra_variables ,
322322 track_array_variables = model .track_array_variables ,
323323 array_variables = model .array_variables )
324+ next_obs .sign_type = self .sign_type
324325 nb_dead = len (previous_obs )
325326 nb_virtual_extend = nb_next - nb_dead
326327
@@ -349,9 +350,6 @@ def propagate(previous_obs, current_obs, obs_to_extend, dead_track, nb_next, mod
349350 return next_obs
350351
351352
352-
353-
354-
355353 @staticmethod
356354 def cost_function_common_area (xy_in , xy_out , distance , intern = False ):
357355 """ How does it work on x bound ?
@@ -695,6 +693,7 @@ def set_global_attr_netcdf(self, h_nc):
695693 h_nc .comment = 'Surface product; mesoscale eddies'
696694 h_nc .framework_used = 'https://bitbucket.org/emason/py-eddy-tracker'
697695 h_nc .standard_name_vocabulary = 'NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table'
696+ h_nc .rotation_type = self .sign_type
698697
699698 def display (self , ax , ref = None , ** kwargs ):
700699 if ref is None :
0 commit comments