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