Exemplo n.º 1
0
def test_get_clw_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'HadGEM3-GC31-LL', 'Amon', 'clw')
    assert fix == [Clw(None), AllVars(None)]
Exemplo n.º 2
0
 def test_get_fix_mip_and_var(self):
     self.assertListEqual(Fix.get_fixes('CMIP6', 'CESM2', 'Omon', 'tos'),
                          [Tos(None), Omon(None)])
Exemplo n.º 3
0
def test_get_allvars_fix():
    fix = Fix.get_fixes('CMIP6', 'MCM-UA-1-0', 'Amon',
                        'arbitrary_var_name_and_wrong_lon_bnds')
    assert fix == [AllVars(None)]
Exemplo n.º 4
0
 def test_get_fix_no_model(self):
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'BAD_MODEL', 'Amon', 'ch4'), [])
Exemplo n.º 5
0
 def test_get_fix_only_mip(self):
     self.assertListEqual(Fix.get_fixes('CMIP6', 'CESM2', 'Omon', 'thetao'),
                          [Omon(None)])
Exemplo n.º 6
0
 def test_get_fix_case_insensitive(self):
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'CanESM2', 'Amon', 'fgCo2'), [FgCo2(None)])
Exemplo n.º 7
0
 def test_get_fixes_with_generic(self):
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'CESM1-BGC', 'Amon', 'gpp'), [Gpp(None)])
Exemplo n.º 8
0
 def test_get(self):
     """Test fix get."""
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'HADGEM2-ES', 'Amon', 'o2'),
         [O2(None), AllVars(None)])
Exemplo n.º 9
0
def test_get_cl_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP5', 'HadGEM2-ES', 'Amon', 'cl')
    assert fix == [Cl(None), AllVars(None)]
Exemplo n.º 10
0
def test_get_clw_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'CESM2', 'Amon', 'clw')
    assert fix == [Clw(None)]
Exemplo n.º 11
0
def test_get_tas_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'CESM2', 'Amon', 'tas')
    assert fix == [Tas(None)]
Exemplo n.º 12
0
 def test_get(self):
     """Test fix get"""
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'CNRM-CM5', 'Amon', 'msftmyzba'),
         [Msftmyzba(None)])
Exemplo n.º 13
0
 def test_get(self):
     """Test fix get"""
     self.assertListEqual(Fix.get_fixes('CMIP5', 'FIO-ESM', 'co2'), [Co2()])
Exemplo n.º 14
0
 def test_get(self):
     """Test fix get."""
     self.assertListEqual(
         Fix.get_fixes('CMIP6', 'EC-Earth3', 'SImon', 'siconca'),
         [Siconca(None)])
Exemplo n.º 15
0
 def test_get(self):
     """Test fix get"""
     self.assertListEqual(Fix.get_fixes('CMIP5', 'CANESM2', 'fgco2'),
                          [FgCo2()])
Exemplo n.º 16
0
def test_get_thetao_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'MCM-UA-1-0', 'Omon', 'thetao')
    assert fix == [Omon(None), AllVars(None)]
Exemplo n.º 17
0
 def test_get_fix(self):
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'CanESM2', 'Amon', 'fgco2'), [FgCo2(None)])
Exemplo n.º 18
0
 def test_get(self):
     """Test fix get"""
     self.assertListEqual(Fix.get_fixes('CMIP5', 'MIROC5', 'sftof'),
                          [Sftof()])
Exemplo n.º 19
0
 def test_get_fixes_with_replace(self):
     self.assertListEqual(Fix.get_fixes('CMIP5', 'BNU-ESM', 'Amon', 'ch4'),
                          [Ch4(None)])
Exemplo n.º 20
0
 def test_get(self):
     """Test fix get"""
     self.assertListEqual(Fix.get_fixes('CMIP5', 'MIROC5', 'tas'), [Tas()])
Exemplo n.º 21
0
 def test_get_fix_no_project(self):
     with pytest.raises(KeyError):
         Fix.get_fixes('BAD_PROJECT', 'BNU-ESM', 'Amon', 'ch4')
Exemplo n.º 22
0
def test_get_cl_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP5', 'inmcm4', 'Amon', 'cl')
    assert fix == [Cl(None)]
Exemplo n.º 23
0
 def test_get_fix_no_var(self):
     self.assertListEqual(
         Fix.get_fixes('CMIP5', 'BNU-ESM', 'Amon', 'BAD_VAR'), [])
Exemplo n.º 24
0
 def test_get(self):
     """Test fix get."""
     self.assertListEqual(Fix.get_fixes('CMIP5', 'INMCM4', 'Amon', 'nbp'),
                          [Nbp(None)])
Exemplo n.º 25
0
 def test_get_fix_only_mip_case_insensitive(self):
     self.assertListEqual(Fix.get_fixes('CMIP6', 'CESM2', 'omOn', 'thetao'),
                          [Omon(None)])
Exemplo n.º 26
0
def test_get_cl_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'GFDL-CM4', 'Amon', 'cl')
    assert fix == [Cl(None)]
Exemplo n.º 27
0
def test_get_cl_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'MPI-ESM1-2-LR', 'Amon', 'cl')
    assert fix == [Cl(None)]
Exemplo n.º 28
0
def test_get_siconc_fix():
    """Test getting of fix."""
    fix = Fix.get_fixes('CMIP6', 'NorESM2-LM', 'SImon', 'siconc')
    assert fix == [Siconc(None)]
Exemplo n.º 29
0
def test_get_tas_fix():
    fix = Fix.get_fixes('CMIP6', 'MCM-UA-1-0', 'Amon', 'tas')
    assert fix == [Tas(None), AllVars(None)]
Exemplo n.º 30
0
def test_get_tas_fix():
    fix = Fix.get_fixes('CMIP6', 'HadGEM3-GC31-LL', 'Amon', 'tas')
    assert fix == [AllVars(None)]