private subroutine ocean_kappa_shear_set_f_centre(this, grid, f_0, beta, y_ref)
Fill f_centre with the beta-plane Coriolis magnitude at cell
centres: |f_0 + beta*(y - y_ref)|. Mirrors EPBL’s
set_f_centre. Call after init, before enter_data.
Type Bound
ocean_kappa_shear_t
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
class(ocean_kappa_shear_t),
|
intent(inout) |
|
|
:: |
this |
|
|
type(hgrid_t),
|
intent(in) |
|
|
:: |
grid |
|
|
real(kind=wp),
|
intent(in) |
|
|
:: |
f_0 |
|
|
real(kind=wp),
|
intent(in) |
|
|
:: |
beta |
|
|
real(kind=wp),
|
intent(in) |
|
|
:: |
y_ref |
|
Variables
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer,
|
private |
|
:: |
i |
|
|
|
|
integer,
|
private |
|
:: |
j |
|
|
|
|
integer,
|
private |
|
:: |
ng |
|
|
|
|
real(kind=wp),
|
private |
|
:: |
y |
|
|
|
Source Code
subroutine ocean_kappa_shear_set_f_centre(this, grid, f_0, beta, y_ref)
!! Fill `f_centre` with the beta-plane Coriolis magnitude at cell
!! centres: |f_0 + beta*(y - y_ref)|. Mirrors EPBL's
!! `set_f_centre`. Call after `init`, before `enter_data`.
class(ocean_kappa_shear_t), intent(inout) :: this
type(hgrid_t), intent(in) :: grid
real(wp), intent(in) :: f_0, beta, y_ref
integer :: i, j, ng
real(wp) :: y
ng = grid%nghost
do j = 1, size(this%f_centre, 2)
y = (real(j + grid%j_offset_global - ng, wp) - 0.5_wp)*grid%dy
do i = 1, size(this%f_centre, 1)
this%f_centre(i, j) = abs(f_0 + beta*(y - y_ref))
end do
end do
end subroutine ocean_kappa_shear_set_f_centre