Skip to content

Commit 347d19d

Browse files
Fixes for sos and siconc of BCC models (#1090)
* sos and siconc fixed * tests added * test fixed * fix flake8 * fix flake8 * fix codacy issue
1 parent b46829e commit 347d19d

File tree

4 files changed

+58
-2
lines changed

4 files changed

+58
-2
lines changed

esmvalcore/cmor/_fixes/cmip6/bcc_csm2_mr.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414

1515

1616
Siconc = OceanFixGrid
17+
18+
19+
Sos = OceanFixGrid

esmvalcore/cmor/_fixes/cmip6/bcc_esm1.py

+6
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@
1111

1212

1313
Tos = OceanFixGrid
14+
15+
16+
Sos = OceanFixGrid
17+
18+
19+
Siconc = OceanFixGrid

tests/integration/cmor/_fixes/cmip6/test_bcc_csm2_mr.py

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
"""Test fixes for BCC-CSM2-MR."""
2-
from esmvalcore.cmor._fixes.cmip6.bcc_csm2_mr import Cl, Cli, Clw, Siconc, Tos
2+
from esmvalcore.cmor._fixes.cmip6.bcc_csm2_mr import (
3+
Cl,
4+
Cli,
5+
Clw,
6+
Siconc,
7+
Sos,
8+
Tos,
9+
)
310
from esmvalcore.cmor._fixes.common import (
411
ClFixHybridPressureCoord,
512
OceanFixGrid,
@@ -60,3 +67,14 @@ def test_get_siconc_fix():
6067
def test_siconc_fix():
6168
"""Test fix for ``siconc``."""
6269
assert Siconc is OceanFixGrid
70+
71+
72+
def test_get_sos_fix():
73+
"""Test getting of fix."""
74+
fix = Fix.get_fixes('CMIP6', 'BCC-CSM2-MR', 'Omon', 'sos')
75+
assert fix == [Sos(None)]
76+
77+
78+
def test_sos_fix():
79+
"""Test fix for ``sos``."""
80+
assert Sos is OceanFixGrid

tests/integration/cmor/_fixes/cmip6/test_bcc_esm1.py

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
"""Test fixes for BCC-ESM1."""
2-
from esmvalcore.cmor._fixes.cmip6.bcc_esm1 import Cl, Cli, Clw, Tos
2+
from esmvalcore.cmor._fixes.cmip6.bcc_esm1 import (
3+
Cl,
4+
Cli,
5+
Clw,
6+
Siconc,
7+
Sos,
8+
Tos,
9+
)
310
from esmvalcore.cmor._fixes.common import (
411
ClFixHybridPressureCoord,
512
OceanFixGrid,
@@ -40,6 +47,28 @@ def test_clw_fix():
4047
assert Clw is ClFixHybridPressureCoord
4148

4249

50+
def test_get_siconc_fix():
51+
"""Test getting of fix."""
52+
fix = Fix.get_fixes('CMIP6', 'BCC-ESM1', 'SImon', 'siconc')
53+
assert fix == [Siconc(None)]
54+
55+
56+
def test_siconc_fix():
57+
"""Test fix for ``siconc``."""
58+
assert Siconc is OceanFixGrid
59+
60+
61+
def test_get_sos_fix():
62+
"""Test getting of fix."""
63+
fix = Fix.get_fixes('CMIP6', 'BCC-ESM1', 'Omon', 'sos')
64+
assert fix == [Sos(None)]
65+
66+
67+
def test_sos_fix():
68+
"""Test fix for ``sos``."""
69+
assert Sos is OceanFixGrid
70+
71+
4372
def test_get_tos_fix():
4473
"""Test getting of fix."""
4574
fix = Fix.get_fixes('CMIP6', 'BCC-ESM1', 'Omon', 'tos')

0 commit comments

Comments
 (0)