ty_source_func_lw Derived Type

type, public, extends(ty_optical_props) :: ty_source_func_lw

Type representing Planck source functions in computed at layer center, at layer edges using spectral mapping in each direction separately, and at the surface


Inherits

type~~ty_source_func_lw~~InheritsGraph type~ty_source_func_lw ty_source_func_lw type~ty_optical_props ty_optical_props type~ty_source_func_lw->type~ty_optical_props

Contents


Components

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

Planck source at layer average temperature (ncol, nlay, ngpt)

real(kind=wp), public, allocatable, dimension(:,:,:):: lev_source

Planck source at layer edge (ncol, nlay+1, ngpt)

real(kind=wp), public, allocatable, dimension(:,: ):: sfc_source

Planck function at surface temperature

real(kind=wp), public, allocatable, dimension(:,: ):: sfc_source_Jac

surface source Jacobian


Type-Bound Procedures

generic, public :: alloc => alloc_lw, copy_and_alloc_lw

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

    Arguments

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

    Return Value character(len=128)

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

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_source_func_lw), intent(inout) :: this
    integer, intent(in) :: ncol
    integer, intent(in) :: nlay
    class(ty_optical_props), intent(in) :: spectral_desc

    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 :: 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_lw

  • private subroutine finalize_lw(this)

    Arguments

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

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 => get_ncol_lw

  • private pure function get_ncol_lw(this)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_source_func_lw), 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 => get_nlay_lw

  • private pure function get_nlay_lw(this)

    Arguments

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

    Return Value integer

procedure, public :: get_subset => get_subset_range_lw

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

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_source_func_lw), intent(inout) :: full
    integer, intent(in) :: start
    integer, intent(in) :: n
    class(ty_source_func_lw), 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

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_allocated => is_allocated_lw

  • private pure function is_allocated_lw(this)

    Arguments

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

    Return Value logical

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