Ejemplo n.º 1
0
# p = proxy(sitename, lon, lat, dpath=dpath, dataset=dataset, variable=variable,
#           season=season, value=value, period=period, climatology=climatology, calc_anoms=calc_anoms, detrend=detrend)
"""
instantiate the analog classes with the proxy for each dataset + variable we
want to map
"""

# ==============================================================================
"""
SST
"""

sst = analogs(ens, 'ersst', 'sst').composite()

f = scalar_plot(sst, test=0.1, proj='cyl').plot()

f.savefig(os.path.join(opath, 'map_ensemble.png'))

# ==============================================================================
"""
UWND at 850 and 200 hPa
"""

uwnd = analogs(ens, 'ncep', 'uwnd_200').composite()

f = scalar_plot(uwnd, test=0.05, proj='cyl').plot()

f.savefig(os.path.join(opath, 'map2_ensemble.png'))

uwnd = analogs(ens, 'ncep', 'uwnd_850').composite()
Ejemplo n.º 2
0
#           season=season, value=value, period=period, climatology=climatology, calc_anoms=calc_anoms, detrend=detrend)


"""
instantiate the analog classes with the proxy for each dataset + variable we
want to map
"""

# ==============================================================================
"""
SST
"""

sst = analogs(ens, 'ersst', 'sst').composite()

f = scalar_plot(sst, test=0.1, proj='cyl').plot()

f.savefig(os.path.join(opath, 'map_ensemble.png'))

# ==============================================================================
"""
UWND at 850 and 200 hPa
"""

uwnd = analogs(ens, 'ncep', 'uwnd_200').composite()

f = scalar_plot(uwnd, test=0.05, proj='cyl').plot()

f.savefig(os.path.join(opath, 'map2_ensemble.png'))

uwnd = analogs(ens, 'ncep', 'uwnd_850').composite()
Ejemplo n.º 3
0
"""
instantiate the analog classes with the proxy for each dataset + variable we
want to map
"""

"""
if the attached dataset is the VCSN dataset, we plot the corresponding composite
anomalies for the variable the proxy is sensitive to
"""
if p.dataset == 'vcsn':
    if verbose:
        save_progress(opath, 'VCSN', 15)
    if p.variable == 'Rain':
        vcsn = analogs(p, 'vcsn', 'Rain').composite()
        f = scalar_plot(vcsn, test=0.1, proj='cyl', res='h').plot(subplots=False)
        f.savefig(os.path.join(opath,'VCSN_rain_proxy.png'))
        images.append({'id': 'vcsn_rain', 'title' : 'VCSN seasonal rainfall', 'filename': 'VCSN_rain_proxy.png'})
        plt.close(f)

    if p.variable == 'TMean':
        vcsn = analogs(p, 'vcsn', 'TMean').composite()
        f = scalar_plot(vcsn, test=0.1, proj='cyl', res='h', vmin=-1.5, vmax=1.5).plot(subplots=False)
        f.savefig(os.path.join(opath,'VCSN_tmean_proxy.png'))
        images.append({'id': 'vcsn_tmean', 'title' : 'VCSN seasonal Temperatures', 'filename': 'VCSN_tmean_proxy.png'})
        plt.close(f)


# ==============================================================================
"""
Sea Surface Temperatures, global
Ejemplo n.º 4
0
instantiate the analog classes with the proxy for each dataset + variable we
want to map
"""

"""
if the attached dataset is the VCSN dataset, we plot the corresponding composite
anomalies for the variable the proxy is sensitive to
"""

dataset = p.dataset
variable = p.variable

compos = analogs(p, dataset, variable).composite()

if dataset in ['vcsn']:
    f = scalar_plot(compos, test=0.1, proj='cyl', res='h').plot(subplots=False)
else:
    f = scalar_plot(compos, test=0.1, proj='cyl', res='i').plot(subplots=False)

images.append({'id': '{}_{}'.format(dataset, variable), 'title' : '{} seasonal {}'.format(dataset, variable), 'filename': '{}_{}_proxy.png'.format(dataset, variable)})

plt.close(f)

data_var = {}
data_var['ncep'] = ['hgt_1000','hgt_850','uwnd_1000']
data_var['ersst'] = ['sst']
data_var['gpcp'] = ['Rain']

for dataset in data_var.keys():
    variables = data_var[dataset]
    for var in variables:
Ejemplo n.º 5
0
images = []

"""
instantiate the analog classes with the proxy for each dataset + variable we
want to map
"""

# ==============================================================================
"""
HGT 1000
"""
if verbose:
    save_progress(opath, 'HGT 1000 NZ', 20)

hgt_1000 = analogs(ens, 'ncep', 'hgt_1000').composite()
f = scalar_plot(hgt_1000, test=0.1, domain=[165, 180, -50., -30], proj='cyl', res='h', vmin=-25.0, vmax=25.0).plot()
f.savefig(os.path.join(opath, 'hgt_1000_NZ.png'))
plt.close(f)
images.append(
    {'id': 'NCEP_NZ_map_ensemble', 'title': 'New Zealand ensemble map for z1000', 'filename': 'hgt_1000_NZ.png'})

if verbose:
    save_progress(opath, 'HGT 1000 SH', 23)

f = scalar_plot(hgt_1000, test=0.1, proj='spstere', res='i', vmin=-25.0, vmax=25.0).plot()
f.savefig(os.path.join(opath, 'hgt_1000_SH.png'))
images.append({'id': 'NCEP_SH_map_ensemble', 'title': 'Southern Hemisphere ensemble map for z1000',
               'filename': 'hgt_1000_SH.png'})
plt.close(f)

if verbose: