Skip to content

Commit

Permalink
Moved translate_driver into Pace/tests
Browse files Browse the repository at this point in the history
Fix physics local import
  • Loading branch information
FlorianDeconinck committed Jan 30, 2024
1 parent 19be0f3 commit 4aefdc7
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 37 deletions.
7 changes: 1 addition & 6 deletions physics/tests/savepoint/translate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# flake8: noqa: F401
from physics.tests.savepoint.translate.translate_update_dwind_phys import (
TranslateUpdateDWindsPhys,
)

from .translate_atmos_phy_statein import TranslateAtmosPhysDriverStatein
from .translate_driver import TranslateDriver
from .translate_fillgfs import TranslateFillGFS
from .translate_fv_update_phys import TranslateFVUpdatePhys
from .translate_gfs_physics_driver import TranslateGFSPhysicsDriver
from .translate_microphysics import TranslateMicroph
from .translate_phifv3 import TranslatePhiFV3
from .translate_prsfv3 import TranslatePrsFV3
from .translate_update_dwind_phys import TranslateUpdateDWindsPhys
from .translate_update_pressure_sfc_winds_phys import (
TranslatePhysUpdatePressureSurfaceWinds,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import numpy as np
from translate_physics import TranslatePhysicsFortranData2Py

import ndsl.dsl.gt4py_utils as utils
from ndsl.util.constants import KAPPA
from pace.physics.stencils.physics import atmos_phys_driver_statein
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslateAtmosPhysDriverStatein(TranslatePhysicsFortranData2Py):
Expand Down
4 changes: 1 addition & 3 deletions physics/tests/savepoint/translate/translate_fillgfs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import numpy as np
from translate_physics import TranslatePhysicsFortranData2Py

import ndsl.dsl.gt4py_utils as utils
from ndsl.util.utils import safe_assign_array
from pace.physics.update.update_atmos_state import fill_gfs_delp
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslateFillGFS(TranslatePhysicsFortranData2Py):
Expand Down
8 changes: 4 additions & 4 deletions physics/tests/savepoint/translate/translate_fv_update_phys.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import dataclasses

import numpy as np
from translate_physics import (
ParallelPhysicsTranslate2Py,
transform_dwind_serialized_data,
)

import ndsl.dsl
import ndsl.dsl.gt4py_utils as utils
import ndsl.util
from ndsl.dsl.typing import FloatField, FloatFieldIJ
from ndsl.util.utils import safe_assign_array
from pace.physics.update.fv_update_phys import ApplyPhysicsToDycore
from physics.tests.savepoint.translate.translate_physics import (
ParallelPhysicsTranslate2Py,
transform_dwind_serialized_data,
)


try:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import copy

from translate_physics import TranslatePhysicsFortranData2Py

import ndsl.dsl.gt4py_utils as utils
import ndsl.util as util
from pace.physics import PHYSICS_PACKAGES
from pace.physics.stencils.physics import Physics, PhysicsState
from pace.physics.update import update_atmos_state
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslateGFSPhysicsDriver(TranslatePhysicsFortranData2Py):
Expand Down
4 changes: 1 addition & 3 deletions physics/tests/savepoint/translate/translate_microphysics.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import copy

import numpy as np
from translate_physics import TranslatePhysicsFortranData2Py

import ndsl.dsl.gt4py_utils as utils
import ndsl.util
from ndsl.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 physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslateMicroph(TranslatePhysicsFortranData2Py):
Expand Down
5 changes: 2 additions & 3 deletions physics/tests/savepoint/translate/translate_phifv3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from translate_physics import TranslatePhysicsFortranData2Py

from pace.physics.stencils.get_phi_fv3 import get_phi_fv3
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslatePhiFV3(TranslatePhysicsFortranData2Py):
Expand Down
5 changes: 2 additions & 3 deletions physics/tests/savepoint/translate/translate_prsfv3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from translate_physics import TranslatePhysicsFortranData2Py

from pace.physics.stencils.get_prs_fv3 import get_prs_fv3
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslatePrsFV3(TranslatePhysicsFortranData2Py):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import numpy as np
from translate_physics import TranslatePhysicsFortranData2Py

import ndsl.util
from ndsl.util.utils import safe_assign_array
from pace.physics.update.update_dwind_phys import AGrid2DGridPhysics
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslateUpdateDWindsPhys(TranslatePhysicsFortranData2Py):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from translate_physics import TranslatePhysicsFortranData2Py

from ndsl.util.constants import KAPPA
from pace.physics.update.fv_update_phys import update_pressure_and_surface_winds
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslatePhysUpdatePressureSurfaceWinds(TranslatePhysicsFortranData2Py):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from translate_physics import TranslatePhysicsFortranData2Py

from pace.physics.update.update_atmos_state import prepare_tendencies_and_update_tracers
from physics.tests.savepoint.translate.translate_physics import (
TranslatePhysicsFortranData2Py,
)


class TranslatePhysUpdateTracers(TranslatePhysicsFortranData2Py):
Expand Down
1 change: 1 addition & 0 deletions tests/savepoint/translate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .translate_driver import TranslateDriver

0 comments on commit 4aefdc7

Please sign in to comment.