Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oelbert committed Jan 3, 2024
1 parent b7d0de8 commit 139c92c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions physics/tests/savepoint/translate/translate_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# but also, driver tests should not be in physics
from pace.fv3core.testing.translate_fvdynamics import TranslateFVDynamics
from pace.fv3core.testing.validation import enable_selective_validation
from pace.physics import PhysicsConfig, PhysicsState
from pace.physics import PHYSICS_PACKAGES, PhysicsConfig, PhysicsState
from pace.util.namelist import Namelist


Expand Down Expand Up @@ -43,7 +43,8 @@ def compute_parallel(self, inputs, communicator):
sizer, backend=self.stencil_config.compilation_config.backend
)
physics_state = PhysicsState.init_zeros(
quantity_factory=quantity_factory, schemes=["GFS_microphysics"]
quantity_factory=quantity_factory,
schemes=[PHYSICS_PACKAGES["GFS_microphysics"]],
)
tendency_state = TendencyState.init_zeros(
quantity_factory=quantity_factory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pace.dsl.gt4py_utils as utils
import pace.util as util
from pace.physics import PHYSICS_PACKAGES
from pace.physics.stencils.physics import Physics, PhysicsState
from pace.stencils import update_atmos_state
from pace.stencils.testing.translate_physics import TranslatePhysicsFortranData2Py
Expand Down Expand Up @@ -129,7 +130,7 @@ def compute(self, inputs):
quantity_factory = util.QuantityFactory.from_backend(
sizer, self.stencil_factory.backend
)
schemes = ["GFS_microphysics"]
schemes = [PHYSICS_PACKAGES["GFS_microphysics"]]
physics_state = PhysicsState(
**inputs,
quantity_factory=quantity_factory,
Expand Down
3 changes: 2 additions & 1 deletion physics/tests/savepoint/translate/translate_microphysics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pace.dsl.gt4py_utils as utils
import pace.util
from pace.dsl.typing import Float
from pace.physics import PHYSICS_PACKAGES
from pace.physics.stencils.microphysics import Microphysics
from pace.physics.stencils.physics import PhysicsState
from pace.stencils.testing.translate_physics import TranslatePhysicsFortranData2Py
Expand Down Expand Up @@ -88,7 +89,7 @@ def compute(self, inputs):
inputs,
sizer=sizer,
quantity_factory=quantity_factory,
schemes=["GFS_microphysics"],
schemes=[PHYSICS_PACKAGES["GFS_microphysics"]],
)
microphysics = Microphysics(
self.stencil_factory, quantity_factory, self.grid.grid_data, self.namelist
Expand Down
2 changes: 1 addition & 1 deletion tests/main/physics/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def setup_physics():
physics_config,
)
physics_state = pace.physics.PhysicsState.init_zeros(
quantity_factory, schemes=["GFS_microphysics"]
quantity_factory, schemes=[pace.physics.PHYSICS_PACKAGES["GFS_microphysics"]]
)
random = np.random.RandomState(0)
for field in fields(pace.physics.PhysicsState):
Expand Down

0 comments on commit 139c92c

Please sign in to comment.