Exemplo n.º 1
0
    def test_EOF(self):
        x = np.random.random((self.D.nt, 20, 30))
        self.D.data = np.ma.array(x, mask=x != x)
        self.D.cell_area = np.ones_like(self.D.data[0, :, :])
        E = EOF(self.D)
        r = E.reconstruct_data()
        c = E.get_correlation_matrix()
        E.get_eof_data_correlation()
        #~ E.plot_channnel_correlations(100000)   #slow!!
        E.plot_eof_coefficients(None, all=True)
        E._calc_anomalies()

        E.plot_EOF(None, all=True)
Exemplo n.º 2
0
    def test_EOF(self):
        x = np.random.random((self.D.nt, 20, 30))
        self.D.data = np.ma.array(x, mask=x != x)
        self.D.cell_area = np.ones_like(self.D.data[0,:,:])
        E = EOF(self.D)
        r = E.reconstruct_data()
        c = E.get_correlation_matrix()
        E.get_eof_data_correlation()
        #~ E.plot_channnel_correlations(100000)   #slow!!
        E.plot_eof_coefficients(None, all=True)
        E._calc_anomalies()


        E.plot_EOF(None, all=True)
Exemplo n.º 3
0
"""
This file is part of pyCMBS. (c) 2012-2014
For COPYING and LICENSE details, please refer to the file
COPYRIGHT.md
"""

"""
EOF analysis
"""

from pycmbs.examples import download
import matplotlib.pyplot as plt
from pycmbs.diagnostic import EOF

plt.close('all')

air = download.get_sample_file(name='air')
air.label = 'air temperature'

# calculate climatological mean
clim = air.get_climatology(return_object=True)

# calculate EOF based on climatology because of performance issues for this example.
E = EOF(clim)
E.plot_EOF([0,1], use_basemap=True)  # map_plot argument can be used here

#~ E.plot_EOF(0,show_coef=False, use_basemap=True)  # map_plot argument can be used here
#~ E.plot_EOF(1,show_coef=False, use_basemap=True)

plt.show()
Exemplo n.º 4
0
# -*- coding: utf-8 -*-
"""
This file is part of pyCMBS. (c) 2012-2014
For COPYING and LICENSE details, please refer to the file
COPYRIGHT.md
"""
"""
EOF analysis
"""

from pycmbs.examples import download
import matplotlib.pyplot as plt
from pycmbs.diagnostic import EOF

plt.close('all')

air = download.get_sample_file(name='air')
air.label = 'air temperature'

# calculate climatological mean
clim = air.get_climatology(return_object=True)

# calculate EOF based on climatology because of performance issues for this example.
E = EOF(clim)
E.plot_EOF([0, 1], use_basemap=True)  # map_plot argument can be used here

#~ E.plot_EOF(0,show_coef=False, use_basemap=True)  # map_plot argument can be used here
#~ E.plot_EOF(1,show_coef=False, use_basemap=True)

plt.show()
Exemplo n.º 5
0
# -*- coding: utf-8 -*-

"""
This file is part of pyCMBS. (c) 2012-2014
For COPYING and LICENSE details, please refer to the file
COPYRIGHT.md
"""

"""
EOF analysis
"""

from pycmbs.examples import download
import matplotlib.pyplot as plt
from pycmbs.diagnostic import EOF

air = download.get_sample_file(name='air')
air.label = 'air temperature'

# calculate climatological mean
clim = air.get_climatology(return_object=True)

# calculate EOF based on climatology because of performance issues for this example.
E = EOF(clim)
E.plot_EOF(0,show_coef=True, use_basemap=True)  # map_plot argument can be used here
E.plot_EOF(1,show_coef=True, use_basemap=True)

plt.show()