示例#1
0
                # Check if file exists for this model
                if onlynew:
                    chfile = outsuf + thre_str + '_' + dset + '-OLR.synop'
                    if os.path.isfile(chfile):
                        print "MetBot already run on this model: " + name
                        continue  # goes back to the beginning of the for loop
                    else:
                        print "Running for the first time on: " + name

                plt.ion()

                ### Get mbs 0-0
                if getmbs:
                    v = dset + "-olr-0-0"
                    daset, globv, lev, drv = v.split('-')
                    mbs, mbt, chull = blb.MetBlobs_th(olr,dtime,time,lat,lon,v,thisthresh,\
                                                   sub=sub,showblobs=showblb,interact=intract,debugplots=debugplots)
                    blb.mbsave(outsuf + thre_str + '_' + v + ".mbs", mbs, mbt,
                               chull)
                    del mbs, mbt, chull

                    ### Get mbs 0-all
                    if olrall:
                        refmbsstr = dset + "-olr-0-0"
                        refmbs, refmbt, refch = blb.mbopen(outsuf + thre_str +
                                                           '_' + refmbsstr +
                                                           ".mbs")
                        reftime = refmbs[:, 0]
                        v = dset + "-olr-0-all"
                        daset, varstr, lev, drv = v.split('-')

                        # Get data subset for days before and after CBs
示例#2
0
            # Check if file exists for this model
            if onlynew:
                chfile = outsuf + thre_str + '_' + dset + '-OLR.synop'
                if os.path.isfile(chfile):
                    print "MetBot already run on this model: " + name
                    continue  # goes back to the beginning of the for loop
                else:
                    print "Running for the first time on: " + name

            plt.ion()

            ### Get mbs 0-0
            if getmbs:
                v = dset + "-olr-0-0"
                daset, globv, lev, drv = v.split('-')
                mbs, mbt, chull = blb.MetBlobs_th(olr,dtime,time,lat,lon,v,thisthresh,\
                                               sub=sub,showblobs=showblb,interact=intract)
                blb.mbsave(outsuf + thre_str + '_' + v + ".mbs", mbs, mbt,
                           chull)
                del mbs, mbt, chull

                ### Get mbs 0-all
                if olrall:
                    refmbsstr = dset + "-olr-0-0"
                    refmbs, refmbt, refch = blb.mbopen(outsuf + thre_str +
                                                       '_' + refmbsstr +
                                                       ".mbs")
                    reftime = refmbs[:, 0]
                    v = dset + "-olr-0-all"
                    daset, varstr, lev, drv = v.split('-')
                    exec("ixt,[time,%s,dtime]=\
                          my.ixtwindow(reftime,time,hrwindow,time,%s,dtime)"\