ocean_surfstress_set_const Subroutine

private subroutine ocean_surfstress_set_const(this, tau_x_val, tau_y_val)

Fill tau_x / tau_y uniformly with the given scalar values. Convenience helper for the spatially-constant wind case (the Tier-1 default and most unit tests). Host only — call enter_data afterwards (or !$acc update device if already mapped) to sync to GPU. Refreshes stress_mag in step (PR-12) so every existing caller — production and unit test alike — gets a consistent stress_mag with no separate call required.

Type Bound

ocean_surface_stress_t

Arguments

Type IntentOptional Attributes Name
class(ocean_surface_stress_t), intent(inout) :: this
real(kind=wp), intent(in) :: tau_x_val
real(kind=wp), intent(in) :: tau_y_val

Calls

proc~~ocean_surfstress_set_const~~CallsGraph proc~ocean_surfstress_set_const ocean_surface_stress_t%ocean_surfstress_set_const proc~ocean_surfstress_refresh_stress_mag ocean_surfstress_refresh_stress_mag proc~ocean_surfstress_set_const->proc~ocean_surfstress_refresh_stress_mag proc~ocean_surface_stress_refresh_mag ocean_surface_stress_refresh_mag proc~ocean_surfstress_refresh_stress_mag->proc~ocean_surface_stress_refresh_mag proc~ocean_surfstress_derived_impl ocean_surfstress_derived_impl proc~ocean_surface_stress_refresh_mag->proc~ocean_surfstress_derived_impl local local proc~ocean_surfstress_derived_impl->local

Called by

proc~~ocean_surfstress_set_const~~CalledByGraph proc~ocean_surfstress_set_const ocean_surface_stress_t%ocean_surfstress_set_const proc~configure_ocean_forcing configure_ocean_forcing proc~configure_ocean_forcing->proc~ocean_surfstress_set_const proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_forcing proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   subroutine ocean_surfstress_set_const(this, tau_x_val, tau_y_val)
      !! Fill `tau_x` / `tau_y` uniformly with the given scalar
      !! values.  Convenience helper for the spatially-constant
      !! wind case (the Tier-1 default and most unit tests).  Host
      !! only — call `enter_data` afterwards (or `!$acc update
      !! device` if already mapped) to sync to GPU.  Refreshes
      !! `stress_mag` in step (PR-12) so every existing caller —
      !! production and unit test alike — gets a consistent
      !! `stress_mag` with no separate call required.
      class(ocean_surface_stress_t), intent(inout) :: this
      real(wp), intent(in) :: tau_x_val, tau_y_val
      this%tau_x = tau_x_val
      this%tau_y = tau_y_val
      call ocean_surfstress_refresh_stress_mag(this)
   end subroutine ocean_surfstress_set_const