private subroutine ocean_wave_speed_init(this, grid)
Allocate the persistent (nx, ny) fields. Always allocates
(configure runs after init, so enable is not known yet);
the off-state footprint is four 2D arrays.
Type Bound
ocean_wave_speed_t
Arguments
Variables
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer,
|
private |
|
:: |
nx |
|
|
|
|
integer,
|
private |
|
:: |
ny |
|
|
|
Source Code
subroutine ocean_wave_speed_init(this, grid)
!! Allocate the persistent (nx, ny) fields. Always allocates
!! (configure runs after init, so `enable` is not known yet);
!! the off-state footprint is four 2D arrays.
class(ocean_wave_speed_t), intent(inout) :: this
type(hgrid_t), intent(in) :: grid
integer :: nx, ny
nx = grid%nx_total
ny = grid%ny_total
allocate (this%f_centre(nx, ny), source=0.0_wp)
allocate (this%beta_centre(nx, ny), source=0.0_wp)
allocate (this%cg1(nx, ny), source=0.0_wp)
allocate (this%rd(nx, ny), source=0.0_wp)
allocate (this%rd_over_dx(nx, ny), source=0.0_wp)
this%is_init = .true.
end subroutine ocean_wave_speed_init