Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
halungge committed Sep 4, 2024
1 parent 607613a commit 4ba50d1
Showing 1 changed file with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def init(
nrdmax=self.vertical_grid.end_index_of_damping_layer,
)
self._determine_horizontal_domains()

self._initialized = True

@property
Expand Down Expand Up @@ -437,8 +437,6 @@ def _allocate_temporary_fields(self):
xp.zeros((self.grid.num_cells, self.grid.num_levels + 1), dtype=float),
)



def _determine_horizontal_domains(self):
cell_domain = h_grid.domain(dims.CellDim)
edge_domain = h_grid.domain(dims.EdgeDim)
Expand All @@ -451,29 +449,28 @@ def _get_start_index_for_w_diffusion() -> gtx.int32:
else self.grid.start_index(cell_domain(h_grid.Zone.LATERAL_BOUNDARY_LEVEL_4))
)



self._cell_start_interior = self.grid.start_index(cell_domain(h_grid.Zone.INTERIOR))
self._cell_start_nudging = self.grid.start_index(cell_domain(h_grid.Zone.NUDGING))
self._cell_end_local = self.grid.end_index(cell_domain(h_grid.Zone.LOCAL))
self._cell_end_halo = self.grid.end_index(cell_domain(h_grid.Zone.HALO))

self._edge_start_nudging_level_2 = self.grid.start_index(
edge_domain(h_grid.Zone.NUDGING_LEVEL_2))
self._edge_start_nudging = self.grid.start_index(edge_domain(h_grid.Zone.NUDGING))

self._edge_start_lateral_boundary_level_5 = self.grid.start_index(
edge_domain(h_grid.Zone.LATERAL_BOUNDARY_LEVEL_5)
)
self._edge_start_nudging = self.grid.start_index(edge_domain(h_grid.Zone.NUDGING))
self._edge_start_nudging_level_2 = self.grid.start_index(
edge_domain(h_grid.Zone.NUDGING_LEVEL_2)
)
self._edge_end_local = self.grid.end_index(edge_domain(h_grid.Zone.LOCAL))
self._edge_end_halo_level_2 = self.grid.end_index(edge_domain(h_grid.Zone.HALO_LEVEL_2))
self._edge_end_halo = self.grid.end_index(edge_domain(h_grid.Zone.HALO))

self._edge_end_halo_level_2 = self.grid.end_index(edge_domain(h_grid.Zone.HALO_LEVEL_2))

self._vertex_start_lateral_boundary_level_2 = self.grid.start_index(
vertex_domain(h_grid.Zone.LATERAL_BOUNDARY_LEVEL_2)
)
self._vertex_end_local = self.grid.end_index(vertex_domain(h_grid.Zone.LOCAL))

self._horizontal_start_index_w_diffusion = _get_start_index_for_w_diffusion()


def initial_run(
self,
Expand Down Expand Up @@ -809,5 +806,3 @@ def _do_diffusion_step(
log.debug("running stencil 16 (update_theta_and_exner): end")
handle_edge_comm.wait() # need to do this here, since we currently only use 1 communication object.
log.debug("communication of prognogistic.vn - end")


0 comments on commit 4ba50d1

Please sign in to comment.