dm_unit Module

Unit definitions and conversion functions.


Uses

  • module~~dm_unit~~UsesGraph module~dm_unit dm_unit module~dm_error dm_error module~dm_unit->module~dm_error module~dm_kind dm_kind module~dm_unit->module~dm_kind module~dm_util dm_util module~dm_unit->module~dm_util module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_util->module~dm_error module~dm_util->module~dm_kind

Used by

  • module~~dm_unit~~UsedByGraph module~dm_unit dm_unit module~dmpack dmpack module~dmpack->module~dm_unit

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: UNIT_NONE = 0

No unit.

integer, public, parameter :: UNIT_RAD = 1

Radiants [rad].

integer, public, parameter :: UNIT_GON = 2

Gradians [gon].

integer, public, parameter :: UNIT_DEG = 3

Degrees [deg].


Derived Types

type, public ::  unit_type

Generic unit type.

Components

Type Visibility Attributes Name Initial
real(kind=r8), public :: value = 0.0_r8

Value.

integer, public :: type = UNIT_NONE

Unit of value.

integer, public :: error = E_NONE

Convert error.

type, public, extends(unit_type) ::  angle_type

Angle type.

Components

Type Visibility Attributes Name Initial
real(kind=r8), public :: value = 0.0_r8

Value.

integer, public :: type = UNIT_NONE

Unit of value.

integer, public :: error = E_NONE

Convert error.


Functions

public pure elemental function dm_unit_to_deg(a) result(b)

Converts angle to degrees.

Arguments

Type IntentOptional Attributes Name
type(angle_type), intent(in) :: a

Input angle.

Return Value type(angle_type)

Output angle [deg].

public pure elemental function dm_unit_to_gon(a) result(b)

Converts angle to gradians.

Arguments

Type IntentOptional Attributes Name
type(angle_type), intent(in) :: a

Input angle.

Return Value type(angle_type)

Output angle [gon].

public pure elemental function dm_unit_to_rad(a) result(b)

Converts angle to radiants.

Arguments

Type IntentOptional Attributes Name
type(angle_type), intent(in) :: a

Input angle.

Return Value type(angle_type)

Output angle [rad].

public pure elemental function dm_unit_type(a) result(type)

Returns unit type.

Arguments

Type IntentOptional Attributes Name
type(unit_type), intent(in) :: a

Angle type.

Return Value integer(kind=i8)

Unit of angle.

public pure elemental function dm_unit_value(a) result(value)

Returns unit value.

Arguments

Type IntentOptional Attributes Name
type(unit_type), intent(in) :: a

Angle type.

Return Value real(kind=r8)

Unit of angle.