mod_grid Module

module~~mod_grid~~UsesGraph module~mod_grid mod_grid module~mod_precision mod_precision module~mod_precision->module~mod_grid module~mod_utility mod_utility module~mod_precision->module~mod_utility module~mod_utility->module~mod_grid iso_fortran_env iso_fortran_env iso_fortran_env->module~mod_precision
Help

Used By

module~~mod_grid~~UsedByGraph module~mod_grid mod_grid module~mod_domain mod_domain module~mod_grid->module~mod_domain module~mod_time_integration mod_time_integration module~mod_domain->module~mod_time_integration
Help


Variables

TypeVisibility AttributesNameInitial
integer(kind=intkind), public, parameter:: stdout =6
integer(kind=intkind), public, parameter:: stderr =0

Interfaces

public interface grid_type

  • private function constructor_1d(lb, ub, x, dx) result(grid)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=intkind), intent(in) :: lb

    Lower bound indices of the grid array

    integer(kind=intkind), intent(in) :: ub

    Upper bound indices of the grid array

    real(kind=realkind), intent(in), optional dimension(:):: x

    Distance in x-direction [m]

    real(kind=realkind), intent(in), optional dimension(:):: dx

    Grid spacing in x-direction [m]

    Return Value type(grid_type)

  • private function constructor_2d(lb, ub, x, y, dx, dy, lon, lat) result(grid)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=intkind), intent(in), dimension(:):: lb

    Lower bound indices of the grid array

    integer(kind=intkind), intent(in), dimension(:):: ub

    Upper bound indices of the grid array

    real(kind=realkind), intent(in), optional dimension(:,:):: x

    Distance in x-direction [m]

    real(kind=realkind), intent(in), optional dimension(:,:):: y

    Distance in y-direction [m]

    real(kind=realkind), intent(in), optional dimension(:,:):: dx

    Grid spacing in x-direction [m]

    real(kind=realkind), intent(in), optional dimension(:,:):: dy

    Grid spacing in y-direction [m]

    real(kind=realkind), intent(in), optional dimension(:,:):: lon

    Longitude [rad]

    real(kind=realkind), intent(in), optional dimension(:,:):: lat

    Latitude [rad]

    Return Value type(grid_type)


Derived Types

type, public :: grid_type

Components

TypeVisibility AttributesNameInitial
integer(kind=intkind), private, dimension(2):: lb

Lower bounds of the grid

integer(kind=intkind), private, dimension(2):: ub

Upper bounds of the grid

real(kind=realkind), private, dimension(:,:), allocatable:: x

Distance in x-direction [m]

real(kind=realkind), private, dimension(:,:), allocatable:: y

Distance in y-direction [m]

real(kind=realkind), private, dimension(:,:), allocatable:: dx

Grid spacing in x-direction [m]

real(kind=realkind), private, dimension(:,:), allocatable:: dy

Grid spacing in y-direction [m]

real(kind=realkind), private, dimension(:,:), allocatable:: lon

Longitude [rad]

real(kind=realkind), private, dimension(:,:), allocatable:: lat

Latitude [rad]

real(kind=realkind), private, dimension(:,:), allocatable:: alpha

Grid rotation angle [rad]

Constructor

private function constructor_1d(lb, ub, x, dx)
private function constructor_2d(lb, ub, x, y, dx, dy, lon, lat)

Type-Bound Procedures

procedure, public, pass(self) :: getLowerBounds
procedure, public, pass(self) :: getUpperBounds
procedure, public, pass(self) :: getAxisX
procedure, public, pass(self) :: getAxisY
procedure, public, pass(self) :: getGridSpacingX
procedure, public, pass(self) :: getGridSpacingY
procedure, public, pass(self) :: getGridRotation
procedure, public, pass(self) :: getLongitude
procedure, public, pass(self) :: getLatitude

Functions

private function constructor_1d(lb, ub, x, dx) result(grid)

Arguments

Type IntentOptional AttributesName
integer(kind=intkind), intent(in) :: lb

Lower bound indices of the grid array

integer(kind=intkind), intent(in) :: ub

Upper bound indices of the grid array

real(kind=realkind), intent(in), optional dimension(:):: x

Distance in x-direction [m]

real(kind=realkind), intent(in), optional dimension(:):: dx

Grid spacing in x-direction [m]

Return Value type(grid_type)

private function constructor_2d(lb, ub, x, y, dx, dy, lon, lat) result(grid)

Arguments

Type IntentOptional AttributesName
integer(kind=intkind), intent(in), dimension(:):: lb

Lower bound indices of the grid array

integer(kind=intkind), intent(in), dimension(:):: ub

Upper bound indices of the grid array

real(kind=realkind), intent(in), optional dimension(:,:):: x

Distance in x-direction [m]

real(kind=realkind), intent(in), optional dimension(:,:):: y

Distance in y-direction [m]

real(kind=realkind), intent(in), optional dimension(:,:):: dx

Grid spacing in x-direction [m]

real(kind=realkind), intent(in), optional dimension(:,:):: dy

Grid spacing in y-direction [m]

real(kind=realkind), intent(in), optional dimension(:,:):: lon

Longitude [rad]

real(kind=realkind), intent(in), optional dimension(:,:):: lat

Latitude [rad]

Return Value type(grid_type)

private pure function getLowerBounds(self) result(lb)

Returns the lower bounds of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value integer(kind=intkind), dimension(2)

Upper bound indices

private pure function getUpperBounds(self) result(ub)

Returns the upper bounds of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value integer(kind=intkind), dimension(2)

Lower bound indices

private pure function getAxisX(self) result(x)

Returns the x-coordinate of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

x-coordinate [m]

private pure function getAxisY(self) result(y)

Returns the y-coordinate [m] of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

y-coordinate [m]

private pure function getGridSpacingX(self) result(dx)

Returns the grid spacing in x [m] of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

Grid spacing in x [m]

private pure function getGridSpacingY(self) result(dy)

Returns the grid spacing in y [m] of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

Grid spacing in y [m]

private pure function getGridRotation(self) result(alpha)

Returns the grid rotation angle [rad] of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

Grid rotation [rad]

private pure function getLongitude(self) result(lon)

Returns the longitude array [rad] of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

Longitude [rad]

private pure function getLatitude(self) result(lat)

Returns the latitude array [rad] of the grid instance.

Arguments

Type IntentOptional AttributesName
class(grid_type), intent(in) :: self

Grid instance

Return Value real(kind=realkind), dimension(:,:), allocatable

Latitude [rad]