Exemplo n.º 1
0
 def test_calc(self):
     test_calc = CalcInterface(proj=self.proj,
                               model=self.model,
                               run=self.run,
                               var=self.variable,
                               date_range=('0021-01-01', '0080-12-31'),
                               intvl_in='monthly',
                               intvl_out='son',
                               dtype_in_time='ts',
                               dtype_in_vert='sigma',
                               dtype_out_time='avg',
                               dtype_out_vert=False,
                               level=False)
     calc = Calc(test_calc)
     calc.compute()
     self.assertEqual(calc.intvl_in, 'monthly')
Exemplo n.º 2
0
 def test_calc2(self):
     test_calc = CalcInterface(proj=self.proj,
                               model=self.model,
                               run=self.run,
                               var=self.variable2,
                               date_range=('0021-01-01', '0080-12-31'),
                               intvl_in='monthly',
                               intvl_out='son',
                               dtype_in_time='ts',
                               dtype_in_vert='sigma',
                               dtype_out_time='avg',
                               dtype_out_vert=False,
                               level=False,
                               backend=SQLBackend())
     calc = Calc(test_calc)
     calc.compute()
     self.assertEqual(calc.intvl_in, 'monthly')
Exemplo n.º 3
0
from aospy_synthetic.calc import Calc, CalcInterface

import cases
import models
import example_projects
import variables

test = CalcInterface(proj=example_projects.example,
                     model=models.am2,
                     run=cases.am2_control,
                     var=variables.mse,
                     date_range=('0021-01-01', '0080-12-31'),
                     intvl_in='monthly',
                     intvl_out='son',
                     dtype_in_time='ts',
                     dtype_in_vert='sigma',
                     dtype_out_time='avg',
                     dtype_out_vert=False,
                     level=False)
calc = Calc(test)
calc.compute()