Esempio n. 1
0
def gen_models(quick = False):
    from simpleNIPA import NIPAphase
    from numpy import ravel
    from smapFuncts import sstMap

    models = {}

    lcrb_prcp = get_lcrb_prcp()
    sst, slp, mei, phaseind = get_climate_data()

    for phase in phaseind:
        model = NIPAphase(lcrb_prcp, sst, mei, phaseind[phase])
        model.bootcorr(ntim = 100, corrconf = 0.99, bootconf = 0.80, quick = quick)
        model.gridCheck()
        model.crossvalpcr()
        if not model.flags['noSST']: model.genEnsemble()
        models[phase] = model
    return models
Esempio n. 2
0
def gen_models(n = 100, cc = 0.90, bc = 0.80, quick = False):
    from simpleNIPA import NIPAphase
    from numpy import ravel
    from smapFuncts import sstMap

    models = {}

    lcrb_prcp = get_lcrb_prcp()
    sst, slp, mei, phaseind = get_climate_data()

    for phase in ['lanina', 'neutneg', 'neutpos', 'elnino', 'allyears']:
        model = NIPAphase(lcrb_prcp, sst, mei, phaseind[phase])
        model.bootcorr(ntim = n, corrconf = cc, bootconf = bc, quick = quick)
        model.gridCheck(lim = 5, ntim = 3)
        model.crossvalpcr()
        if not model.flags['noSST']: model.genEnsemble()
        models[phase] = model
    return models