chksum_state Subroutine

public subroutine chksum_state(grid, ms, probe, label, stage, step)

Sample the prognostics (h, u, v, every tracer) at a phase seam. Call AFTER the phase named by label; drains device queues first so the async apply chain has landed. Bounds come from the location-aware API (LOC_H / LOC_U / LOC_V), not hand-written.

Arguments

Type IntentOptional Attributes Name
type(hgrid_t), intent(in) :: grid
type(multilayer_state_t), intent(in) :: ms
type(chksum_probe_t), intent(inout) :: probe
character(len=*), intent(in) :: label
integer, intent(in) :: stage
integer, intent(in) :: step

Calls

proc~~chksum_state~~CallsGraph proc~chksum_state chksum_state interface~rdb_debug_chksum rdb_debug_chksum proc~chksum_state->interface~rdb_debug_chksum proc~chksum_active chksum_active proc~chksum_state->proc~chksum_active proc~rdb_debug_chksum_2d rdb_debug_chksum_2d interface~rdb_debug_chksum->proc~rdb_debug_chksum_2d proc~rdb_debug_chksum_3d rdb_debug_chksum_3d interface~rdb_debug_chksum->proc~rdb_debug_chksum_3d proc~rdb_debug_chksum_2d->proc~chksum_active proc~chksum_loc_extents chksum_loc_extents proc~rdb_debug_chksum_2d->proc~chksum_loc_extents proc~chksum_loc_interior chksum_loc_interior proc~rdb_debug_chksum_2d->proc~chksum_loc_interior proc~chksum_row chksum_row proc~rdb_debug_chksum_2d->proc~chksum_row proc~chksum_stats_2d chksum_stats_2d proc~rdb_debug_chksum_2d->proc~chksum_stats_2d proc~rdb_debug_chksum_3d->proc~chksum_active proc~rdb_debug_chksum_3d->proc~chksum_loc_extents proc~rdb_debug_chksum_3d->proc~chksum_loc_interior proc~rdb_debug_chksum_3d->proc~chksum_row proc~chksum_stats_3d chksum_stats_3d proc~rdb_debug_chksum_3d->proc~chksum_stats_3d proc~halo_allreduce_sum_i8 halo_allreduce_sum_i8 proc~chksum_row->proc~halo_allreduce_sum_i8 allreduce allreduce proc~halo_allreduce_sum_i8->allreduce proc~comm_env_compute_comm comm_env_compute_comm proc~halo_allreduce_sum_i8->proc~comm_env_compute_comm

Called by

proc~~chksum_state~~CalledByGraph proc~chksum_state chksum_state proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~chksum_state proc~run_stage_split run_stage_split proc~ocean_dyn_step_split->proc~run_stage_split proc~run_stage_split->proc~chksum_state proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
integer, private :: it
character(len=16), private :: tname

Source Code

   subroutine chksum_state(grid, ms, probe, label, stage, step)
      !! Sample the prognostics (h, u, v, every tracer) at a phase seam.  Call
      !! AFTER the phase named by `label`; drains device queues first so
      !! the async apply chain has landed.  Bounds come from the
      !! location-aware API (LOC_H / LOC_U / LOC_V), not hand-written.
      type(hgrid_t), intent(in) :: grid
      type(multilayer_state_t), intent(in) :: ms
      type(chksum_probe_t), intent(inout) :: probe
      character(len=*), intent(in) :: label
      integer, intent(in) :: stage, step

      integer :: it
      character(len=16) :: tname

      if (.not. chksum_active(probe, step)) return
      !$acc wait
      call rdb_debug_chksum(grid, ms%h_layer, label, "h_layer", stage, step, probe, LOC_H)
      call rdb_debug_chksum(grid, ms%u_face_x_layer, label, "u_face", stage, step, probe, LOC_U)
      call rdb_debug_chksum(grid, ms%v_face_y_layer, label, "v_face", stage, step, probe, LOC_V)
      ! Every registered tracer (thickness-weighted content), named by its
      ! registry slot.
      if (allocated(ms%tracers)) then
         do it = 1, size(ms%tracers)
            if (.not. allocated(ms%tracers(it)%hTr)) cycle
            write (tname, "(a,i0)") "hTr_", it
            call rdb_debug_chksum(grid, ms%tracers(it)%hTr, label, trim(tname), stage, step, &
                                  probe, LOC_H)
         end do
      end if
   end subroutine chksum_state