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
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.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | name_len | = | 32 |
Describes the spectral discretization including the wavenumber limits of each band (spectral region) and the mapping between g-points and bands
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 |
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
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public, | dimension(:,:,:), allocatable | :: | tau | optical depth (ncol, nlay, ngpt) |
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 | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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) |
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 |
The abstract base class for arrays defines what procedures will be available
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public, | dimension(:,:,:), allocatable | :: | tau | optical depth (ncol, nlay, ngpt) |
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 | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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) |
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 |