ty_optical_props_1scl Derived Type

type, public, extends(ty_optical_props_arry) :: ty_optical_props_1scl

ty_optical_props_arry represents optical properties as arrays with dimensions column, height, spectral point - Class 1-scalar only (extinction) optical depth - Class two-stream adds arrays for single scattering albedo ssa and asymmetry parameter needed in two-stream methods - Class n-stream adds arrays for single scattering albedo ssa and phase function moments (index 1 = g) for use with discrete ordinate methods



Inherits

type~~ty_optical_props_1scl~~InheritsGraph type~ty_optical_props_1scl ty_optical_props_1scl type~ty_optical_props_arry ty_optical_props_arry type~ty_optical_props_1scl->type~ty_optical_props_arry type~ty_optical_props ty_optical_props type~ty_optical_props_arry->type~ty_optical_props

Contents


Components

TypeVisibilityAttributesNameInitial
real(kind=wp), public, dimension(:,:,:), allocatable:: tau

optical depth (ncol, nlay, ngpt)


Type-Bound Procedures

generic, public :: alloc_1scl => alloc_only_1scl, init_and_alloc_1scl, copy_and_alloc_1scl

  • private function alloc_only_1scl(this, ncol, nlay) result(err_message)

    Straight allocation routines

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_1scl) :: this
    integer, intent(in) :: ncol
    integer, intent(in) :: nlay

    Return Value character(len=128)

  • private function init_and_alloc_1scl(this, ncol, nlay, band_lims_wvn, band_lims_gpt, name) result(err_message)

    Initialization by specifying band limits and possibly g-point/band mapping

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_1scl) :: this
    integer, intent(in) :: ncol
    integer, intent(in) :: nlay
    real(kind=wp), intent(in), dimension(:,:):: band_lims_wvn
    integer, intent(in), optional dimension(:,:):: band_lims_gpt
    character(len=*), intent(in), optional :: name

    Return Value character(len=128)

  • private function copy_and_alloc_1scl(this, ncol, nlay, spectral_desc, name) result(err_message)

    Initialization from an existing spectral discretization/ty_optical_props

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_1scl) :: this
    integer, intent(in) :: ncol
    integer, intent(in) :: nlay
    class(ty_optical_props), intent(in) :: spectral_desc
    character(len=*), intent(in), optional :: name

    Return Value character(len=128)

procedure, public :: bands_are_equal

  • private pure function bands_are_equal(this, that)

    Are the bands of two objects the same? (same number, same wavelength limits)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(in) :: this
    class(ty_optical_props), intent(in) :: that

    Return Value logical

procedure, public :: convert_band2gpt

  • private pure function convert_band2gpt(this, band)

    First and last g-point of a specific band

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(in) :: this
    integer, intent(in) :: band

    Return Value integer,dimension(2)

procedure, public :: convert_gpt2band

  • private pure function convert_gpt2band(this, gpt)

    Band associated with a specific g-point

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(in) :: this
    integer, intent(in) :: gpt

    Return Value integer

procedure, public :: delta_scale => delta_scale_1scl

  • private function delta_scale_1scl(this, for) result(err_message)

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_1scl), intent(inout) :: this
    real(kind=wp), intent(in), optional dimension(:,:,:):: for

    Return Value character(len=128)

procedure, public :: expand

  • private pure function expand(this, arr_in) result(arr_out)

    Expand an array of dimension arr_in(nband) to dimension arr_out(ngpt)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(in) :: this
    real(kind=wp), intent(in), dimension(:):: arr_in

    Return Value real(kind=wp),dimension(size(this%gpt2band))

procedure, public :: finalize => finalize_base

  • private subroutine finalize_base(this)

    Base class: finalize (deallocate memory)

    Read more…

    Arguments

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

procedure, public :: finalize_1scl

  • private function finalize_1scl(this) result(err_message)

    Finalize routines

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_1scl) :: this

    Return Value character(len=128)

procedure, public :: get_band_lims_gpoint

  • private pure function get_band_lims_gpoint(this)

    The first and last g-point of all bands at once dimension (2, nbands)

    Arguments

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

    Return Value integer,dimension(size(this%band2gpt,dim=1), size(this%band2gpt,dim=2))

procedure, public :: get_band_lims_wavelength

  • private pure function get_band_lims_wavelength(this)

    Lower and upper wavelength of all bands

    Arguments

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

    Return Value real(kind=wp),dimension(size(this%band_lims_wvn,1), size(this%band_lims_wvn,2))

procedure, public :: get_band_lims_wavenumber

  • private pure function get_band_lims_wavenumber(this)

    Lower and upper wavenumber of all bands (upper and lower wavenumber by band) = band_lims_wvn(2,band)

    Arguments

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

    Return Value real(kind=wp),dimension(size(this%band_lims_wvn,1), size(this%band_lims_wvn,2))

procedure, public :: get_gpoint_bands

  • private pure function get_gpoint_bands(this)

    Bands for all the g-points at once dimension (ngpt)

    Arguments

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

    Return Value integer,dimension(size(this%gpt2band,dim=1))

procedure, public :: get_name

  • private function get_name(this)

    Arguments

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

    Return Value character(len=name_len)

procedure, public :: get_nband

  • private pure function get_nband(this)

    Number of bands

    Arguments

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

    Return Value integer

procedure, public :: get_ncol

  • private pure function get_ncol(this)

    Arguments

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

    Return Value integer

procedure, public :: get_ngpt

  • private pure function get_ngpt(this)

    Number of g-points

    Arguments

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

    Return Value integer

procedure, public :: get_nlay

  • private pure function get_nlay(this)

    Arguments

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

    Return Value integer

procedure, public :: get_subset => subset_1scl_range

  • private function subset_1scl_range(full, start, n, subset) result(err_message)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_1scl), intent(inout) :: full
    integer, intent(in) :: start
    integer, intent(in) :: n
    class(ty_optical_props_arry), intent(inout) :: subset

    Return Value character(len=128)

procedure, public :: gpoints_are_equal

  • private pure function gpoints_are_equal(this, that)

    Is the g-point structure of two objects the same? (same bands, same number of g-points, same mapping between bands and g-points)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(in) :: this
    class(ty_optical_props), intent(in) :: that

    Return Value logical

procedure, public :: increment

Increment another set of values

  • private function increment(op_in, op_io) result(err_message)

    Routines for array classes: incrementing a%increment(b) adds the values of a to b, changing b and leaving a untouched

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props_arry), intent(in) :: op_in
    class(ty_optical_props_arry), intent(inout) :: op_io

    Return Value character(len=128)

generic, public :: init => init_base, init_base_from_copy

  • private function init_base(this, band_lims_wvn, band_lims_gpt, name) result(err_message)

    Base class: Initialization Values are assumed to be defined in bands a mapping between bands and g-points is provided

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(inout) :: this
    real(kind=wp), intent(in), dimension(:,:):: band_lims_wvn
    integer, intent(in), optional dimension(:,:):: band_lims_gpt
    character(len=*), intent(in), optional :: name

    Return Value character(len=128)

  • private function init_base_from_copy(this, spectral_desc) result(err_message)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(inout) :: this
    class(ty_optical_props), intent(in) :: spectral_desc

    Return Value character(len=128)

procedure, public :: is_initialized => is_initialized_base

  • private pure function is_initialized_base(this)

    Base class: return true if initialized, false otherwise

    Read more…

    Arguments

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

    Return Value logical

procedure, public :: set_name

  • private subroutine set_name(this, name)

    --- Setting/getting the name

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_optical_props), intent(inout) :: this
    character(len=*), intent(in) :: name

procedure, public :: validate => validate_1scalar

  • private function validate_1scalar(this) result(err_message)

    --- Validation

    Read more…

    Arguments

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

    Return Value character(len=128)