def driver_vortexLoc(data, timeInds, pt_ll, cClose, cellsOnCell, nEdgesOnCell, latCell, lonCell, isMin): cCloseList = [] valList = [] for tInd in timeInds: #use theta on 2 pvu output_data.print_xtime(data, tInd) epv_ht, theta_trop = compare.calc_height_theta_2PVU(data, tInd) #theta_trop = data.variables['temperature_500hPa'][tInd,:] #radius = 1000.e3 radius = 500.e3 cClose = findLocalExtremum(pt_ll, cClose, radius, cellsOnCell, nEdgesOnCell, latCell, lonCell, theta_trop, isMin) pt_ll[0] = latCell[cClose]; pt_ll[1] = lonCell[cClose] print "{0} {1} {2}".format(pt_ll[0], pt_ll[1], theta_trop[cClose]) cCloseList.append(cClose) valList.append(theta_trop[cClose]) #estimate cyclone region properties #tInd=0 #epv_ht, theta_trop = compare.calc_height_theta_2PVU(data, tInd) rShoot = calc_objectRadius_shoot(cClose, cellsOnCell, nEdgesOnCell, latCell, lonCell, theta_trop, isMin) cycloneCells = gather_regionGrow_nbrValues(cClose, cellsOnCell, nEdgesOnCell, theta_trop, isMin) print "Radius shoot and cells in cyclone region: ", rShoot, cycloneCells return (cCloseList, pt_ll, valList)