Skip to content

Commit

Permalink
Forgot to run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
karen-garciaperdomo committed Nov 28, 2024
1 parent 88f557d commit ded933f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 30 deletions.
6 changes: 1 addition & 5 deletions esmvalcore/cmor/_fixes/cmip6/cesm2_waccm_fv2.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
"""Fixes for CESM2-WACCM-FV2 model."""

import iris
import numpy as np

from ..common import SiconcFixScalarCoord
from ..fix import Fix
from .cesm2 import Fgco2 as BaseFgco2
from .cesm2 import Omon as BaseOmon
from .cesm2 import Tas as BaseTas
from .cesm2 import Pr as BasePr
from .cesm2 import Tas as BaseTas
from .cesm2_waccm import Cl as BaseCl
from .cesm2_waccm import Cli as BaseCli
from .cesm2_waccm import Clw as BaseClw
Expand Down
14 changes: 8 additions & 6 deletions tests/integration/cmor/_fixes/cmip6/test_cesm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,14 @@ def test_tasmin_fix_metadata(tasmin_cubes):
for cube in tasmin_cubes:
with pytest.raises(iris.exceptions.CoordinateNotFoundError):
cube.coord("height")
height_coord = iris.coords.AuxCoord(2.0,
var_name="height",
standard_name="height",
long_name="height",
units=Unit("m"),
attributes={"positive": "up"})
height_coord = iris.coords.AuxCoord(
2.0,
var_name="height",
standard_name="height",
long_name="height",
units=Unit("m"),
attributes={"positive": "up"},
)
vardef = get_var_info("CMIP6", "day", "tasmin")
fix = Tasmin(vardef)

Expand Down
7 changes: 4 additions & 3 deletions tests/integration/cmor/_fixes/cmip6/test_cesm2_fv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

from esmvalcore.cmor._fixes.cmip6.cesm2 import Cl as BaseCl
from esmvalcore.cmor._fixes.cmip6.cesm2 import Fgco2 as BaseFgco2
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tas as BaseTas
from esmvalcore.cmor._fixes.cmip6.cesm2 import Pr as BasePr
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tas as BaseTas
from esmvalcore.cmor._fixes.cmip6.cesm2_fv2 import (
Cl,
Cli,
Clw,
Fgco2,
Omon,
Pr,
Siconc,
Tas,
Pr
)
from esmvalcore.cmor._fixes.common import SiconcFixScalarCoord
from esmvalcore.cmor._fixes.fix import GenericFix
Expand Down Expand Up @@ -81,6 +81,7 @@ def test_get_tas_fix():
fix = Fix.get_fixes("CMIP6", "CESM2-FV2", "day", "tas")
assert fix == [Tas(None), GenericFix(None)]


def test_tas_fix():
"""Test fix for ``tas``."""
assert Tas is BaseTas
Expand All @@ -94,4 +95,4 @@ def test_get_pr_fix():

def test_pr_fix():
"""Test fix for ``Pr``."""
assert Pr is BasePr
assert Pr is BasePr
14 changes: 6 additions & 8 deletions tests/integration/cmor/_fixes/cmip6/test_cesm2_waccm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@
import iris
import numpy as np
import pytest
import pandas as pd

from esmvalcore.cmor._fixes.cmip6.cesm2 import Cl as BaseCl
from esmvalcore.cmor._fixes.cmip6.cesm2 import Fgco2 as BaseFgco2
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tas as BaseTas
from esmvalcore.cmor._fixes.cmip6.cesm2 import Pr as BasePr
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tasmin as BaseTasmin
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tas as BaseTas
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tasmax as BaseTasmax
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tasmin as BaseTasmin
from esmvalcore.cmor._fixes.cmip6.cesm2_waccm import (
Cl,
Cli,
Clw,
Fgco2,
Omon,
Pr,
Siconc,
Tas,
Pr,
Tasmin,
Tasmax,
Tasmin,
)
from esmvalcore.cmor._fixes.common import SiconcFixScalarCoord
from esmvalcore.cmor._fixes.fix import GenericFix
from esmvalcore.cmor.fix import Fix
from esmvalcore.cmor.table import get_var_info


def test_get_cl_fix():
Expand Down Expand Up @@ -128,7 +126,7 @@ def test_get_tas_fix():
fix = Fix.get_fixes("CMIP6", "CESM2-WACCM", "Amon", "tas")
assert fix == [Tas(None), GenericFix(None)]
fix = Fix.get_fixes("CMIP6", "CESM2-WACCM", "day", "tas")
assert fix == [Tas(None), GenericFix(None)]
assert fix == [Tas(None), GenericFix(None)]


def test_tas_fix():
Expand Down Expand Up @@ -166,4 +164,4 @@ def test_get_tasmax_fix():

def test_tasmax_fix():
"""Test fix for ``Tasmax``."""
assert Tasmax is BaseTasmax
assert Tasmax is BaseTasmax
10 changes: 2 additions & 8 deletions tests/integration/cmor/_fixes/cmip6/test_cesm2_waccm_fv2.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
"""Tests for the fixes of CESM2-WACCM-FV2."""

import iris
import numpy as np
import pytest
import pandas as pd

from esmvalcore.cmor._fixes.cmip6.cesm2 import Fgco2 as BaseFgco2
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tas as BaseTas
from esmvalcore.cmor._fixes.cmip6.cesm2 import Pr as BasePr
from esmvalcore.cmor._fixes.cmip6.cesm2 import Tas as BaseTas
from esmvalcore.cmor._fixes.cmip6.cesm2_waccm import Cl as BaseCl
from esmvalcore.cmor._fixes.cmip6.cesm2_waccm_fv2 import (
Cl,
Expand All @@ -22,7 +17,6 @@
from esmvalcore.cmor._fixes.common import SiconcFixScalarCoord
from esmvalcore.cmor._fixes.fix import GenericFix
from esmvalcore.cmor.fix import Fix
from esmvalcore.cmor.table import get_var_info


def test_get_cl_fix():
Expand Down Expand Up @@ -101,4 +95,4 @@ def test_get_pr_fix():

def test_pr_fix():
"""Test fix for ``Pr``."""
assert Pr is BasePr
assert Pr is BasePr

0 comments on commit ded933f

Please sign in to comment.