@@ -130,38 +130,6 @@ def strcompare(str1, str2):
130130    return  str1  in  str2  and  str2  in  str1 
131131
132132
133- #def find_nearest_contour(contcoll, x, y): 
134-     #""" 
135-     #Finds contour that is closest to a point. 
136- 
137-     #Returns a tuple containing the contour & segment. 
138- 
139-     #Call signature:: 
140- 
141-     #segmin = find_nearest_contour(contcoll, x, y) 
142- 
143-     #""" 
144-     #dmin = 1e10 
145-     #segmin = None 
146-     #linepathmin = None 
147- 
148-     #paths = contcoll.get_paths() 
149-     #for segNum, linepath in enumerate(paths): 
150-         #lc = linepath.vertices 
151-         #ds = lc[:,0] - x 
152-         #ds **= 2 
153-         #dss = lc[:,1] - y 
154-         #dss **= 2 
155-         #ds += dss 
156-         ##print 'ds', ds 
157-         #d = ds.min() 
158-         #if d < dmin: 
159-             #dmin = d 
160-             #segmin = segNum 
161-             #linepathmin = linepath 
162-     #return (segmin, linepathmin) 
163- 
164- 
165133class  Track  (object ):
166134    """ 
167135    Class that holds eddy tracks and related info 
@@ -265,7 +233,6 @@ class TrackList (object):
265233        old_lon, old_lat: old lon/lat centroids 
266234        index:   index of eddy in track_list 
267235    """ 
268-     #def __init__(self, DATATYPE, TRACK_DURATION_MIN, TRACK_EXTRA_VARIABLES): 
269236    def  __init__ (self , DATATYPE , SIGN_TYPE , SAVE_DIR , grd , search_ellipse ,
270237                 ** kwargs ):
271238        """ 
@@ -318,7 +285,6 @@ def __init__(self, DATATYPE, SIGN_TYPE, SAVE_DIR, grd, search_ellipse,
318285        self .EVOLVE_AREA_MIN  =  np .float64 (kwargs .get ('EVOLVE_AREA_MIN' , 0.0005 ))
319286        self .EVOLVE_AREA_MAX  =  np .float64 (kwargs .get ('EVOLVE_AREA_MAX' , 500 ))
320287
321- 
322288        self .AREA0  =  np .pi  *  np .float64 (kwargs .get ('RAD0' , 60000. ))** 2 
323289        self .AMP0  =  np .float64 (kwargs .get ('AMP0' , 2. ))
324290        self .DIST0  =  np .float64 (kwargs .get ('DIST0' , 25000. ))
@@ -370,10 +336,10 @@ def __init__(self, DATATYPE, SIGN_TYPE, SAVE_DIR, grd, search_ellipse,
370336            self .old_contour_s  =  []
371337            self .old_uavg_profile  =  []
372338            self .old_shape_error  =  []
373-         self .new_list  =  True  # flag indicating new list 
374-         self .index  =  0  # counter 
375-         self .ncind  =  0  # index to write to nc files, will increase and increase 
376-         self .ch_index  =  0  # index for Chelton style nc files 
339+         self .new_list  =  True    # flag indicating new list 
340+         self .index  =  0    # counter 
341+         self .ncind  =  0    # index to write to nc files, will increase and increase 
342+         self .ch_index  =  0    # index for Chelton style nc files 
377343        self .PAD  =  2 
378344        self .search_ellipse  =  None 
379345        self .PIXEL_THRESHOLD  =  None 
@@ -638,7 +604,6 @@ def create_netcdf(self, directory, savedir,
638604        nc .variables ['cyc' ].long_name  =  'cyclonic' 
639605        nc .variables ['cyc' ].description  =  'cyclonic -1; anti-cyclonic +1' 
640606
641- 
642607        #nc.variables['eddy_duration'].units = 'days' 
643608        nc .variables ['lon' ].units  =  'deg. longitude' 
644609        nc .variables ['lon' ].min_val  =  self .LONMIN 
@@ -686,7 +651,6 @@ def create_netcdf(self, directory, savedir,
686651        nc .variables ['radius_e' ].long_name  =  'effective radius scale' 
687652        nc .variables ['radius_e' ].description  =  'effective eddy radius' 
688653
689- 
690654        if  'Q'  in  self .DIAGNOSTIC_TYPE :
691655            nc .variables ['qparameter' ].units  =  's^{-2}' 
692656
@@ -842,13 +806,9 @@ def write2netcdf(self, rtime):
842806                            self .ch_index  +=  1 
843807                            nc .sync ()
844808
845-         #print 'eddy.ncind', self.ncind 
846-         
847809        # Get index to first currently active track 
848810        try :
849811            lasti  =  self .get_active_tracks (rtime )[0 ]
850-             #print '__________________lasti', lasti 
851-             #print '__________________rtime', rtime 
852812        except  Exception :
853813            lasti  =  None 
854814
@@ -862,7 +822,6 @@ def write2netcdf(self, rtime):
862822
863823        # Update old_lon and old_lat... 
864824        self .old_lon  =  self .new_lon [lasti :]
865-         #print '______________________self.old_lon', self.old_lon 
866825        self .old_lat  =  self .new_lat [lasti :]
867826        self .old_radii_s  =  self .new_radii_s [lasti :]
868827        self .old_radii_e  =  self .new_radii_e [lasti :]
0 commit comments