ocean_surfflux_set_p_surf_const Subroutine

private subroutine ocean_surfflux_set_p_surf_const(this, p_surf_val)

Seed the atmospheric surface-pressure INPUT component p_surf_atm (Pa) uniformly from a scalar namelist value (PR-17 &ocean_psurf_nml p_surf_const). Full overwrite of the pristine atmospheric base; the assembled total p_surf is built from it once per outer step in p_surf_update_seam. No-op when the component set is not allocated (use_components=.false.) — the &ocean_psurf_nml enable guard in validate_config already requires enable_components=.true., so a live consumer never hits the no-op. Host only — call enter_data afterwards (or !$acc update device if already mapped) to sync to the GPU.

Also seeds the assembled total p_surf to the same value — with no ice mass-loading p_surf == p_surf_atm and the atmospheric base is static, so this configure-time seed IS the assembly (PR-17 reads p_surf read-only in the dyn step). PR-18’s ice path overwrites p_surf per outer step via its own inout access.

Type Bound

ocean_surface_flux_t

Arguments

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

Called by

proc~~ocean_surfflux_set_p_surf_const~~CalledByGraph proc~ocean_surfflux_set_p_surf_const ocean_surface_flux_t%ocean_surfflux_set_p_surf_const proc~engine_setup engine_setup proc~engine_setup->proc~ocean_surfflux_set_p_surf_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_p_surf_const(this, p_surf_val)
      !! Seed the atmospheric surface-pressure INPUT component
      !! `p_surf_atm` (Pa) uniformly from a scalar namelist value (PR-17
      !! `&ocean_psurf_nml p_surf_const`).  Full overwrite of the pristine
      !! atmospheric base; the assembled total `p_surf` is built from it
      !! once per outer step in `p_surf_update_seam`.  No-op when the
      !! component set is not allocated (`use_components=.false.`) — the
      !! `&ocean_psurf_nml enable` guard in `validate_config` already
      !! requires `enable_components=.true.`, so a live consumer never hits
      !! the no-op.  Host only — call `enter_data` afterwards (or `!$acc
      !! update device` if already mapped) to sync to the GPU.
      !!
      !! Also seeds the assembled total `p_surf` to the same value — with no
      !! ice mass-loading `p_surf == p_surf_atm` and the atmospheric base is
      !! static, so this configure-time seed IS the assembly (PR-17 reads
      !! `p_surf` read-only in the dyn step).  PR-18's ice path overwrites
      !! `p_surf` per outer step via its own `inout` access.
      class(ocean_surface_flux_t), intent(inout) :: this
      real(wp), intent(in) :: p_surf_val
      if (.not. allocated(this%p_surf_atm)) return
      this%p_surf_atm = p_surf_val
      this%p_surf = p_surf_val
   end subroutine ocean_surfflux_set_p_surf_const