ocean_surfflux_set_const Subroutine

private subroutine ocean_surfflux_set_const(this, q_heat_val, q_salt_val)

Fill Q_heat / Q_salt uniformly from scalar values and set the has_heat / has_salt flags so the apply-tracers kernel fires. Mirrors set_wind_stress_const on the stress side. Host only — call enter_data afterwards (or !$acc update device if already mapped) to sync to the GPU.

Type Bound

ocean_surface_flux_t

Arguments

Type IntentOptional Attributes Name
class(ocean_surface_flux_t), intent(inout) :: this
real(kind=wp), intent(in) :: q_heat_val
real(kind=wp), intent(in) :: q_salt_val

Called by

proc~~ocean_surfflux_set_const~~CalledByGraph proc~ocean_surfflux_set_const ocean_surface_flux_t%ocean_surfflux_set_const proc~engine_setup engine_setup proc~engine_setup->proc~ocean_surfflux_set_const 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_surfflux_set_const(this, q_heat_val, q_salt_val)
      !! Fill `Q_heat` / `Q_salt` uniformly from scalar values and set
      !! the `has_heat` / `has_salt` flags so the apply-tracers kernel
      !! fires.  Mirrors `set_wind_stress_const` on the stress side.
      !! Host only — call `enter_data` afterwards (or `!$acc update
      !! device` if already mapped) to sync to the GPU.
      class(ocean_surface_flux_t), intent(inout) :: this
      real(wp), intent(in) :: q_heat_val, q_salt_val
      this%Q_heat_const = q_heat_val
      this%Q_salt_const = q_salt_val
      this%Q_heat = q_heat_val
      this%Q_salt = q_salt_val
      this%has_heat = (q_heat_val /= 0.0_wp)
      this%has_salt = (q_salt_val /= 0.0_wp)
   end subroutine ocean_surfflux_set_const