ty_gas_concs Derived Type

type, public :: ty_gas_concs


Inherits

type~~ty_gas_concs~~InheritsGraph type~ty_gas_concs ty_gas_concs type~conc_field conc_field type~ty_gas_concs->type~conc_field concs

Contents


Components

TypeVisibilityAttributesNameInitial
character(len=32), public, dimension(:), allocatable:: gas_names

Finalization Procedures

final :: del

  • private subroutine del(this)

    Finalization - free all memory when the object goes out of scope

    Arguments

    TypeIntentOptionalAttributesName
    type(ty_gas_concs), intent(inout) :: this

Type-Bound Procedures

procedure, public :: get_gas_names

  • private pure function get_gas_names(this)

    Inquire function - what are the names of the known gases? (Not all concentrations need be set)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(in) :: this

    Return Value character(len=32),dimension(this%get_num_gases())

    names of the known gases

procedure, public :: get_num_gases

  • private pure function get_num_gases(this)

    Inquire function - how many gases are known? (Not all concentrations need be set)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(in) :: this

    Return Value integer

generic, public :: get_subset => get_subset_range

Extract a subset of columns

  • private function get_subset_range(this, start, n, subset) result(error_msg)

    Extract a subset of n columns starting with column start

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(in) :: this
    integer, intent(in) :: start

    Index of first column, number of columns to extract

    integer, intent(in) :: n

    Index of first column, number of columns to extract

    class(ty_gas_concs), intent(inout) :: subset

    Object to hold the subset of columns

    Return Value character(len=128)

    Error string, empty if successful

generic, public :: get_vmr => get_vmr_1d, get_vmr_2d

Get concentration values

  • private function get_vmr_1d(this, gas, array) result(error_msg)

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs) :: this
    character(len=*), intent(in) :: gas

    Name of the gas

    real(kind=wp), intent(out), dimension(:):: array

    Volume mixing ratio

    Return Value character(len=128)

    Error string, empty if successful

  • private function get_vmr_2d(this, gas, array) result(error_msg)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs) :: this
    character(len=*), intent(in) :: gas

    Name of the gas

    real(kind=wp), intent(out), dimension(:,:):: array

    Volume mixing ratio

    Return Value character(len=128)

    Error string, empty if successful

procedure, public :: init

  • private function init(this, gas_names) result(error_msg)

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(inout) :: this
    character(len=*), intent(in), dimension(:):: gas_names

    names of all gases which might be provided

    Return Value character(len=128)

    error string, empty when successful

procedure, public :: reset

  • private subroutine reset(this)

    Free memory and reset the object to an unititialzed state

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(inout) :: this

generic, public :: set_vmr => set_vmr_scalar, set_vmr_1d, set_vmr_2d

Set concentration values

  • private function set_vmr_scalar(this, gas, w) result(error_msg)

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(inout) :: this
    character(len=*), intent(in) :: gas

    Name of the gas being provided

    real(kind=wp), intent(in) :: w

    volume (molar) mixing ratio

    Return Value character(len=128)

    error string, empty when successful

  • private function set_vmr_1d(this, gas, w) result(error_msg)

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(inout) :: this
    character(len=*), intent(in) :: gas

    Name of the gas being provided

    real(kind=wp), intent(in), dimension(:):: w

    volume (molar) mixing ratio

    Return Value character(len=128)

    error string, empty when successful

  • private function set_vmr_2d(this, gas, w) result(error_msg)

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_concs), intent(inout) :: this
    character(len=*), intent(in) :: gas

    Name of the gas being provided

    real(kind=wp), intent(in), dimension(:,:):: w

    volume (molar) mixing ratio

    Return Value character(len=128)

    error string, empty when successful