ice_ocean_stress_cleanup Subroutine

public subroutine ice_ocean_stress_cleanup()

Release the persistent tau-blend scratch. Idempotent (safe on an already-clean workspace — the driver calls it unconditionally at ocean teardown, next to ice_evp_cleanup).

Arguments

None

Called by

proc~~ice_ocean_stress_cleanup~~CalledByGraph proc~ice_ocean_stress_cleanup ice_ocean_stress_cleanup proc~engine_exit_data engine_exit_data proc~engine_exit_data->proc~ice_ocean_stress_cleanup proc~stress_scratch_ensure stress_scratch_ensure proc~stress_scratch_ensure->proc~ice_ocean_stress_cleanup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_exit_data proc~engine_step_ice engine_step_ice proc~driver_run_ocean->proc~engine_step_ice proc~ice_ocean_stress_flux ice_ocean_stress_flux proc~ice_ocean_stress_flux->proc~stress_scratch_ensure proc~rdb_ocean_destroy rdb_ocean_destroy proc~rdb_ocean_destroy->proc~engine_exit_data proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~engine_step_ice->proc~ice_ocean_stress_flux proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice

Source Code

   subroutine ice_ocean_stress_cleanup()
      !! Release the persistent tau-blend scratch. Idempotent (safe on an
      !! already-clean workspace — the driver calls it unconditionally at
      !! ocean teardown, next to `ice_evp_cleanup`).
      if (.not. stress_scratch_ready) return
      !$acc exit data delete(ci_scratch, mis_scratch, mice_scratch)
      deallocate (ci_scratch, mis_scratch, mice_scratch)
      ss_nx = 0
      ss_ny = 0
      stress_scratch_ready = .false.
   end subroutine ice_ocean_stress_cleanup