ocean_meke_set_f_centre Subroutine

private subroutine ocean_meke_set_f_centre(this, grid, f_centre)

Copy a pre-filled cell-centre Coriolis magnitude |f| (1/s) onto the MEKE slot, so beta = |grad f| for the Rhines length is live. The caller (setup) builds f_centre with the same metrics_fill_coriolis path the Coriolis / VarMix / EPBL slots use (handles beta-plane AND spherical). Host loop — call after init, before enter_data.

Type Bound

ocean_meke_t

Arguments

Type IntentOptional Attributes Name
class(ocean_meke_t), intent(inout) :: this
type(hgrid_t), intent(in) :: grid
real(kind=wp), intent(in) :: f_centre(grid%nx_total,grid%ny_total)

Called by

proc~~ocean_meke_set_f_centre~~CalledByGraph proc~ocean_meke_set_f_centre ocean_meke_t%ocean_meke_set_f_centre proc~configure_ocean_meke configure_ocean_meke proc~configure_ocean_meke->proc~ocean_meke_set_f_centre proc~configure_ocean_lateral configure_ocean_lateral proc~configure_ocean_lateral->proc~configure_ocean_meke proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_lateral 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

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j

Source Code

   subroutine ocean_meke_set_f_centre(this, grid, f_centre)
      !! Copy a pre-filled cell-centre Coriolis magnitude |f| (1/s) onto the
      !! MEKE slot, so `beta = |grad f|` for the Rhines length is live.  The
      !! caller (setup) builds `f_centre` with the same `metrics_fill_coriolis`
      !! path the Coriolis / VarMix / EPBL slots use (handles beta-plane AND
      !! spherical).  Host loop — call after `init`, before `enter_data`.
      class(ocean_meke_t), intent(inout) :: this
      type(hgrid_t), intent(in) :: grid
      real(wp), intent(in) :: f_centre(grid%nx_total, grid%ny_total)
      integer :: i, j

      if (.not. allocated(this%f_centre)) return
      do j = 1, grid%ny_total
         do i = 1, grid%nx_total
            this%f_centre(i, j) = f_centre(i, j)
         end do
      end do
   end subroutine ocean_meke_set_f_centre