mo_optical_props Module

Encapsulate optical properties defined on a spectral grid of N bands.

The bands are described by their limiting wavenumbers. They need not be contiguous or complete. A band may contain more than one spectral sub-point (g-point) in which case a mapping must be supplied. A name may be provided and will be prepended to error messages. The base class (ty_optical_props) encapsulates only this spectral discretization and must be initialized with the spectral information before use.

Optical properties may be represented as arrays with dimensions ncol, nlay, ngpt (abstract class ty_optical_props_arry). The type holds arrays depending on how much information is needed There are three possibilites

  • ty_optical_props_1scl holds absorption optical depth tau, used in calculations accounting for extinction and emission
  • ty_optical_props_2str holds extincion optical depth tau, single-scattering albedo ssa, and asymmetry parameter g. These fields are what's needed for two-stream calculations.
  • ty_optical_props_nstr holds extincion optical depth tau, single-scattering albedo ssa, and phase function moments p with leading dimension nmom. These fields are what's needed for multi-stream calculations.

These classes must be allocated before use. Initialization and allocation can be combined. The classes have a validate() function that checks all arrays for valid values (e.g. tau > 0.)

Optical properties can be delta-scaled (though this is currently implemented only for two-stream arrays)

Optical properties can increment or "add themselves to" a set of properties represented with arrays as long as both sets have the same underlying band structure. Properties defined by band may be added to properties defined by g-point; the same value is assumed for all g-points with each band.

Subsets of optical properties held as arrays may be extracted along the column dimension.



Uses

  • module~~mo_optical_props~~UsesGraph module~mo_optical_props mo_optical_props module~mo_rte_config mo_rte_config module~mo_optical_props->module~mo_rte_config module~mo_rte_util_array_validation mo_rte_util_array_validation module~mo_optical_props->module~mo_rte_util_array_validation mo_optical_props_kernels mo_optical_props_kernels module~mo_optical_props->mo_optical_props_kernels module~mo_rte_kind mo_rte_kind module~mo_optical_props->module~mo_rte_kind module~mo_rte_config->module~mo_rte_kind module~mo_rte_util_array_validation->module~mo_rte_kind iso_c_binding iso_c_binding module~mo_rte_kind->iso_c_binding

Used by

  • module~~mo_optical_props~~UsedByGraph module~mo_optical_props mo_optical_props module~mo_source_functions mo_source_functions module~mo_source_functions->module~mo_optical_props module~mo_rte_sw mo_rte_sw module~mo_rte_sw->module~mo_optical_props module~mo_fluxes mo_fluxes module~mo_rte_sw->module~mo_fluxes module~mo_fluxes->module~mo_optical_props module~mo_rte_lw mo_rte_lw module~mo_rte_lw->module~mo_optical_props module~mo_rte_lw->module~mo_source_functions module~mo_rte_lw->module~mo_fluxes

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, public, parameter:: name_len =32

Derived Types

type, public :: ty_optical_props

Describes the spectral discretization including the wavenumber limits of each band (spectral region) and the mapping between g-points and bands

Read more…

Type-Bound Procedures

procedure, public :: bands_are_equal
procedure, public :: convert_band2gpt
procedure, public :: convert_gpt2band
procedure, public :: expand
procedure, public :: finalize => finalize_base
procedure, public :: get_band_lims_gpoint
procedure, public :: get_band_lims_wavelength
procedure, public :: get_band_lims_wavenumber
procedure, public :: get_gpoint_bands
procedure, public :: get_name
procedure, public :: get_nband
procedure, public :: get_ngpt
procedure, public :: gpoints_are_equal
generic, public :: init => init_base, init_base_from_copy
procedure, public :: is_initialized => is_initialized_base
procedure, public :: set_name

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

Read more…

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
procedure, public :: bands_are_equal
procedure, public :: convert_band2gpt
procedure, public :: convert_gpt2band
procedure, public :: delta_scale => delta_scale_1scl
procedure, public :: expand
procedure, public :: finalize => finalize_base
procedure, public :: finalize_1scl
procedure, public :: get_band_lims_gpoint
procedure, public :: get_band_lims_wavelength
procedure, public :: get_band_lims_wavenumber
procedure, public :: get_gpoint_bands
procedure, public :: get_name
procedure, public :: get_nband
procedure, public :: get_ncol
procedure, public :: get_ngpt
procedure, public :: get_nlay
procedure, public :: get_subset => subset_1scl_range
procedure, public :: gpoints_are_equal
procedure, public :: increment

Increment another set of values

generic, public :: init => init_base, init_base_from_copy
procedure, public :: is_initialized => is_initialized_base
procedure, public :: set_name
procedure, public :: validate => validate_1scalar

type, public, extends(ty_optical_props_arry) :: ty_optical_props_2str

Components

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

asymmetry parameter (ncol, nlay, ngpt)

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

single-scattering albedo (ncol, nlay, ngpt)

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

optical depth (ncol, nlay, ngpt)

Type-Bound Procedures

generic, public :: alloc_2str => alloc_only_2str, init_and_alloc_2str, copy_and_alloc_2str
procedure, public :: bands_are_equal
procedure, public :: convert_band2gpt
procedure, public :: convert_gpt2band
procedure, public :: delta_scale => delta_scale_2str
procedure, public :: expand
procedure, public :: finalize => finalize_base
procedure, public :: finalize_2str
procedure, public :: get_band_lims_gpoint
procedure, public :: get_band_lims_wavelength
procedure, public :: get_band_lims_wavenumber
procedure, public :: get_gpoint_bands
procedure, public :: get_name
procedure, public :: get_nband
procedure, public :: get_ncol
procedure, public :: get_ngpt
procedure, public :: get_nlay
procedure, public :: get_subset => subset_2str_range
procedure, public :: gpoints_are_equal
procedure, public :: increment

Increment another set of values

generic, public :: init => init_base, init_base_from_copy
procedure, public :: is_initialized => is_initialized_base
procedure, public :: set_name
procedure, public :: validate => validate_2stream

type, public, abstract, extends(ty_optical_props) :: ty_optical_props_arry

The abstract base class for arrays defines what procedures will be available

Read more…

Components

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

optical depth (ncol, nlay, ngpt)

Type-Bound Procedures

procedure, public :: bands_are_equal
procedure, public :: convert_band2gpt
procedure, public :: convert_gpt2band
procedure(delta_scale_abstract), public :: delta_scale
procedure, public :: expand
procedure, public :: finalize => finalize_base
procedure, public :: get_band_lims_gpoint
procedure, public :: get_band_lims_wavelength
procedure, public :: get_band_lims_wavenumber
procedure, public :: get_gpoint_bands
procedure, public :: get_name
procedure, public :: get_nband
procedure, public :: get_ncol
procedure, public :: get_ngpt
procedure, public :: get_nlay
procedure(subset_range_abstract), public :: get_subset
procedure, public :: gpoints_are_equal
procedure, public :: increment

Increment another set of values

generic, public :: init => init_base, init_base_from_copy
procedure, public :: is_initialized => is_initialized_base
procedure, public :: set_name
procedure(validate_abstract), public :: validate

Deferred procedures -- each must be implemented in each child class with arguments following the abstract interface (defined below)

type, public, extends(ty_optical_props_arry) :: ty_optical_props_nstr

Components

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

phase-function moments (nmom, ncol, nlay, ngpt)

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

single-scattering albedo (ncol, nlay, ngpt)

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

optical depth (ncol, nlay, ngpt)

Type-Bound Procedures

generic, public :: alloc_nstr => alloc_only_nstr, init_and_alloc_nstr, copy_and_alloc_nstr
procedure, public :: bands_are_equal
procedure, public :: convert_band2gpt
procedure, public :: convert_gpt2band
procedure, public :: delta_scale => delta_scale_nstr
procedure, public :: expand
procedure, public :: finalize => finalize_base
procedure, public :: finalize_nstr
procedure, public :: get_band_lims_gpoint
procedure, public :: get_band_lims_wavelength
procedure, public :: get_band_lims_wavenumber
procedure, public :: get_gpoint_bands
procedure, public :: get_name
procedure, public :: get_nband
procedure, public :: get_ncol
procedure, public :: get_ngpt
procedure, public :: get_nlay
procedure, public :: get_nmom
procedure, public :: get_subset => subset_nstr_range
procedure, public :: gpoints_are_equal
procedure, public :: increment

Increment another set of values

generic, public :: init => init_base, init_base_from_copy
procedure, public :: is_initialized => is_initialized_base
procedure, public :: set_name
procedure, public :: validate => validate_nstream