abl_t Derived Type

type, public :: abl_t


Inherits

type~~abl_t~~InheritsGraph type~abl_t abl_t type~abl_config_t abl_config_t type~abl_t->type~abl_config_t cfg type~allocator_t allocator_t type~abl_t->type~allocator_t host_allocator type~base_backend_t base_backend_t type~abl_t->type~base_backend_t backend type~field_t field_t type~abl_t->type~field_t damp_coeff type~mesh_t mesh_t type~abl_t->type~mesh_t mesh type~base_config_t base_config_t type~abl_config_t->type~base_config_t type~allocator_t->type~field_t first type~base_backend_t->type~allocator_t allocator type~base_backend_t->type~mesh_t mesh type~poisson_fft_t poisson_fft_t type~base_backend_t->type~poisson_fft_t poisson_fft type~field_t->type~field_t next type~geo_t geo_t type~mesh_t->type~geo_t geo type~grid_t grid_t type~mesh_t->type~grid_t grid type~par_t par_t type~mesh_t->type~par_t par type~poisson_fft_t->type~mesh_t mesh

Inherited by

type~~abl_t~~InheritedByGraph type~abl_t abl_t type~case_abl_t case_abl_t type~case_abl_t->type~abl_t abl

Components

Type Visibility Attributes Name Initial
class(base_backend_t), public, pointer :: backend => null()
class(mesh_t), public, pointer :: mesh => null()
type(allocator_t), public, pointer :: host_allocator => null()
type(abl_config_t), public :: cfg
class(field_t), public, pointer :: damp_coeff => null()
integer, public :: fringe_start = 0
integer, public :: fringe_offset = 0
integer, public :: fringe_nshift = 0
real(kind=dp), public, allocatable :: fringe_lambda(:)
integer, public, allocatable :: z_plane_rank(:)

Rank holding each global z plane


Constructor

public interface abl_t

  • private function init(backend, mesh, host_allocator, cfg) result(abl)

    Arguments

    Type IntentOptional Attributes Name
    class(base_backend_t), intent(inout), target :: backend
    type(mesh_t), intent(inout), target :: mesh
    type(allocator_t), intent(inout), target :: host_allocator
    type(abl_config_t), intent(in) :: cfg

    Return Value type(abl_t)


Type-Bound Procedures

procedure, public :: initialise

  • private subroutine initialise(self, u, v, w)

    Sets the t=0 velocity profile: log-law when the drive is pressure- gradient / mass-conserve, otherwise the geostrophic wind, plus noise (Incompact3d init_abl, 68-92).

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t) :: self
    class(field_t), intent(inout) :: u
    class(field_t), intent(inout) :: v
    class(field_t), intent(inout) :: w

procedure, public :: apply_forcing

  • private subroutine apply_forcing(self, du, dv, dw, u, v, w)

    Adds the ABL driving forces to the momentum RHS each substep (Incompact3d momentum_forcing_abl, 296-320).

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t) :: self
    class(field_t), intent(inout) :: du
    class(field_t), intent(inout) :: dv
    class(field_t), intent(inout) :: dw
    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w

procedure, public :: configure_shifted_periodic

  • private subroutine configure_shifted_periodic(self)

    Set up the Incompact3d shifted periodic fringe (fringe_region with ishiftedper = 1, iconcprec = 0). Over the last third of a periodic-x domain the flow is blended towards the flow a third of the domain upstream, shifted spanwise by Lz/8, so streaks cannot lock onto the periodic box. The ramp and band sizes follow the legacy code exactly.

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t), intent(inout) :: self

procedure, public :: apply_shifted_periodic

  • private subroutine apply_shifted_periodic(self, u, v, w)

    Apply the shifted periodic fringe to the velocity, at the start of each stage as Incompact3d does from boundary_conditions_abl.

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t) :: self
    class(field_t), intent(inout) :: u
    class(field_t), intent(inout) :: v
    class(field_t), intent(inout) :: w

procedure, public :: configure_wall_boundary_correction

  • private subroutine configure_wall_boundary_correction(self, les)

    Configure the neutral ABL wall model in the LES closure.

    The floor is no-slip, so the velocity driving the drag law is sampled at dsampling*dy above it, matching Incompact3d's wall_sgs_noslip.

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t), intent(in) :: self
    type(les_t), intent(inout) :: les

procedure, public :: apply_damping

  • private subroutine apply_damping(self, du, dv, dw, u, v, w)

    Rayleigh sponge relaxing the flow toward the reference profile over the top damping layer (Incompact3d damping_zone, neutral branch).

    As in Incompact3d, the target is the same whatever drives the flow: u relaxes to the log-law value at delta, and v, w to u_geo(2), u_geo(3). That suits the pressure-gradient and mass-conserve drives, whose profile is the log law. With only the Coriolis drive the free stream is u_geo, so the sponge pulls u toward a different value than the drive does. The layer is centred on delta and 0.1delta thick, so it acts only when the domain extends above delta - 0.05delta.

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t) :: self
    class(field_t), intent(inout) :: du
    class(field_t), intent(inout) :: dv
    class(field_t), intent(inout) :: dw
    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w

procedure, public :: build_damping

  • private subroutine build_damping(self)

    Precomputes the damping coefficient coeff*lambda(y), constant in x/z.

    Arguments

    Type IntentOptional Attributes Name
    class(abl_t) :: self