grid_type Derived Type

type, public :: grid_type

Inherited By

type~~grid_type~~InheritedByGraph type~grid_type grid_type type~domain_type domain_type type~grid_type->type~domain_type grid
Help

Source Code


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

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)


Type-Bound Procedures

procedure, public, pass(self) :: getLowerBounds

  • 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

procedure, public, pass(self) :: getUpperBounds

  • 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

procedure, public, pass(self) :: getAxisX

  • 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]

procedure, public, pass(self) :: getAxisY

  • 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]

procedure, public, pass(self) :: getGridSpacingX

  • 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]

procedure, public, pass(self) :: getGridSpacingY

  • 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]

procedure, public, pass(self) :: getGridRotation

  • 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]

procedure, public, pass(self) :: getLongitude

  • 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]

procedure, public, pass(self) :: getLatitude

  • 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]

Source Code

type :: grid_type

  private

  integer(kind=intkind),dimension(2) :: lb
    !! Lower bounds of the grid
  integer(kind=intkind),dimension(2) :: ub
    !! Upper bounds of the grid
  real(kind=realkind),dimension(:,:),allocatable :: x
    !! Distance in x-direction [m]
  real(kind=realkind),dimension(:,:),allocatable :: y
    !! Distance in y-direction [m]
  real(kind=realkind),dimension(:,:),allocatable :: dx
    !! Grid spacing in x-direction [m]
  real(kind=realkind),dimension(:,:),allocatable :: dy
    !! Grid spacing in y-direction [m]
  real(kind=realkind),dimension(:,:),allocatable :: lon
    !! Longitude [rad]
  real(kind=realkind),dimension(:,:),allocatable :: lat
    !! Latitude [rad]
  real(kind=realkind),dimension(:,:),allocatable :: alpha
    !! Grid rotation angle [rad]

  contains

  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

endtype grid_type