ty_gas_optics_rrtmgp Derived Type

type, public, extends(ty_gas_optics) :: ty_gas_optics_rrtmgp


Inherits

type~~ty_gas_optics_rrtmgp~~InheritsGraph type~ty_gas_optics_rrtmgp ty_gas_optics_rrtmgp ty_gas_optics ty_gas_optics type~ty_gas_optics_rrtmgp->ty_gas_optics

Contents


Components

TypeVisibilityAttributesNameInitial
integer, public, dimension(:,:), allocatable:: flavor
character(len=32), public, dimension(:), allocatable:: gas_names
integer, public, dimension(:,:), allocatable:: gpoint_flavor
integer, public, dimension(:), allocatable:: idx_minor_lower
integer, public, dimension(:), allocatable:: idx_minor_scaling_lower
integer, public, dimension(:), allocatable:: idx_minor_scaling_upper
integer, public, dimension(:), allocatable:: idx_minor_upper
logical, public, dimension(:), allocatable:: is_key
real(kind=wp), public, dimension(:,:,:,:), allocatable:: kmajor
real(kind=wp), public, dimension(:,:,:), allocatable:: kminor_lower
integer, public, dimension(:), allocatable:: kminor_start_lower
integer, public, dimension(:), allocatable:: kminor_start_upper
real(kind=wp), public, dimension(:,:,:), allocatable:: kminor_upper
real(kind=wp), public, dimension(:,:,:,:), allocatable:: krayl
integer, public, dimension(:,:), allocatable:: minor_limits_gpt_lower
integer, public, dimension(:,:), allocatable:: minor_limits_gpt_upper
logical(kind=wl), public, dimension(:), allocatable:: minor_scales_with_density_lower
logical(kind=wl), public, dimension(:), allocatable:: minor_scales_with_density_upper
real(kind=wp), public, dimension(:,:), allocatable:: optimal_angle_fit
real(kind=wp), public, dimension(:,:,:,:), allocatable:: planck_frac
real(kind=wp), public, dimension(:), allocatable:: press_ref
real(kind=wp), public, dimension(:), allocatable:: press_ref_log
real(kind=wp), public :: press_ref_log_delta
real(kind=wp), public :: press_ref_max
real(kind=wp), public :: press_ref_min
real(kind=wp), public :: press_ref_trop_log
logical(kind=wl), public, dimension(:), allocatable:: scale_by_complement_lower
logical(kind=wl), public, dimension(:), allocatable:: scale_by_complement_upper
real(kind=wp), public, dimension(:), allocatable:: solar_source
real(kind=wp), public, dimension(:), allocatable:: solar_source_facular
real(kind=wp), public, dimension(:), allocatable:: solar_source_quiet
real(kind=wp), public, dimension(:), allocatable:: solar_source_sunspot
real(kind=wp), public, dimension(:), allocatable:: temp_ref
real(kind=wp), public :: temp_ref_delta
real(kind=wp), public :: temp_ref_max
real(kind=wp), public :: temp_ref_min
real(kind=wp), public, dimension(:,:), allocatable:: totplnk
real(kind=wp), public :: totplnk_delta
real(kind=wp), public, dimension(:,:,:), allocatable:: vmr_ref

Type-Bound Procedures

procedure, public :: compute_optimal_angles

  • private function compute_optimal_angles(this, optical_props, optimal_angles) result(err_msg)

    Compute a transport angle that minimizes flux errors at surface and TOA based on empirical fits

    Arguments

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

    Optical properties

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

    Secant of optical transport angle

    Return Value character(len=128)

    Empty if successful

procedure, public :: finalize

  • private subroutine finalize(this)

    Arguments

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

procedure, public :: gas_optics_ext

  • private function gas_optics_ext(this, play, plev, tlay, gas_desc, optical_props, toa_src, col_dry) result(error_msg)

    Compute gas optical depth given temperature, pressure, and composition Top-of-atmosphere stellar insolation is also reported

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_optics_rrtmgp), intent(in) :: this
    real(kind=wp), intent(in), dimension(:,:):: play

    layer pressures [Pa, mb]; (ncol,nlay) level pressures [Pa, mb]; (ncol,nlay+1) layer temperatures [K]; (ncol,nlay)

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

    layer pressures [Pa, mb]; (ncol,nlay) level pressures [Pa, mb]; (ncol,nlay+1) layer temperatures [K]; (ncol,nlay)

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

    layer pressures [Pa, mb]; (ncol,nlay) level pressures [Pa, mb]; (ncol,nlay+1) layer temperatures [K]; (ncol,nlay)

    type(ty_gas_concs), intent(in) :: gas_desc

    Gas volume mixing ratios

    class(ty_optical_props_arry), intent(inout) :: optical_props
    real(kind=wp), intent(out), dimension(:,:):: toa_src

    Incoming solar irradiance(ncol,ngpt)

    real(kind=wp), intent(in), optional dimension(:,:), target:: col_dry

    Return Value character(len=128)

    Empty if successful

procedure, public :: gas_optics_int

  • private function gas_optics_int(this, play, plev, tlay, tsfc, gas_desc, optical_props, sources, col_dry, tlev) result(error_msg)

    Compute gas optical depth and Planck source functions, given temperature, pressure, and composition

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_optics_rrtmgp), intent(in) :: this
    real(kind=wp), intent(in), dimension(:,:):: play

    layer pressures [Pa, mb]; (ncol,nlay) level pressures [Pa, mb]; (ncol,nlay+1) layer temperatures [K]; (ncol,nlay)

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

    layer pressures [Pa, mb]; (ncol,nlay) level pressures [Pa, mb]; (ncol,nlay+1) layer temperatures [K]; (ncol,nlay)

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

    layer pressures [Pa, mb]; (ncol,nlay) level pressures [Pa, mb]; (ncol,nlay+1) layer temperatures [K]; (ncol,nlay)

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

    surface skin temperatures [K]; (ncol)

    type(ty_gas_concs), intent(in) :: gas_desc

    Gas volume mixing ratios

    class(ty_optical_props_arry), intent(inout) :: optical_props

    Optical properties

    class(ty_source_func_lw), intent(inout) :: sources

    Planck sources

    real(kind=wp), intent(in), optional dimension(:,:), target:: col_dry

    Column dry amount; dim(ncol,nlay) level temperatures [K]; (ncol,nlay+1)

    real(kind=wp), intent(in), optional dimension(:,:), target:: tlev

    Column dry amount; dim(ncol,nlay) level temperatures [K]; (ncol,nlay+1)

    Return Value character(len=128)

    Empty if succssful

procedure, public :: get_gases

  • private pure function get_gases(this)

    return the names of the gases known to the k-distributions

    Arguments

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

    Return Value character(len=32),dimension(get_ngas(this))

    names of the gases known to the k-distributions

procedure, public :: get_ngas

  • private pure function get_ngas(this)

    Two functions to define array sizes needed by gas_optics()

    Arguments

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

    Return Value integer

procedure, public :: get_press_max

  • private pure function get_press_max(this)

    return the maximum pressure on the interpolation grids

    Arguments

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

    Return Value real(kind=wp)

    maximum pressure for which the k-dsitribution is valid

procedure, public :: get_press_min

  • private pure function get_press_min(this)

    return the minimum pressure on the interpolation grids

    Arguments

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

    Return Value real(kind=wp)

    minimum pressure for which the k-dsitribution is valid

procedure, public :: get_temp_max

  • private pure function get_temp_max(this)

    return the maximum temparature on the interpolation grids

    Arguments

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

    Return Value real(kind=wp)

    maximum temperature for which the k-dsitribution is valid

procedure, public :: get_temp_min

  • private pure function get_temp_min(this)

    return the minimum temparature on the interpolation grids

    Arguments

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

    Return Value real(kind=wp)

    minimum temperature for which the k-dsitribution is valid

procedure, public :: is_loaded

  • private pure function is_loaded(this)

    Arguments

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

    Return Value logical(kind=wl)

generic, public :: load => load_int, load_ext

  • private function load_int(this, available_gases, gas_names, key_species, band2gpt, band_lims_wavenum, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper, optimal_angle_fit) result(err_message)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_optics_rrtmgp), intent(inout) :: this
    class(ty_gas_concs), intent(in) :: available_gases
    character(len=*), intent(in), dimension(:):: gas_names
    integer, intent(in), dimension(:,:,:):: key_species
    integer, intent(in), dimension(:,:):: band2gpt
    real(kind=wp), intent(in), dimension(:,:):: band_lims_wavenum
    real(kind=wp), intent(in), dimension(:):: press_ref
    real(kind=wp), intent(in) :: press_ref_trop
    real(kind=wp), intent(in), dimension(:):: temp_ref
    real(kind=wp), intent(in) :: temp_ref_p
    real(kind=wp), intent(in) :: temp_ref_t
    real(kind=wp), intent(in), dimension(:,:,:):: vmr_ref
    real(kind=wp), intent(in), dimension(:,:,:,:):: kmajor
    real(kind=wp), intent(in), dimension(:,:,:):: kminor_lower
    real(kind=wp), intent(in), dimension(:,:,:):: kminor_upper
    character(len=*), intent(in), dimension(:):: gas_minor
    character(len=*), intent(in), dimension(:):: identifier_minor
    character(len=*), intent(in), dimension(:):: minor_gases_lower
    character(len=*), intent(in), dimension(:):: minor_gases_upper
    integer, intent(in), dimension(:,:):: minor_limits_gpt_lower
    integer, intent(in), dimension(:,:):: minor_limits_gpt_upper
    logical(kind=wl), intent(in), dimension(:):: minor_scales_with_density_lower
    logical(kind=wl), intent(in), dimension(:):: minor_scales_with_density_upper
    character(len=*), intent(in), dimension(:):: scaling_gas_lower
    character(len=*), intent(in), dimension(:):: scaling_gas_upper
    logical(kind=wl), intent(in), dimension(:):: scale_by_complement_lower
    logical(kind=wl), intent(in), dimension(:):: scale_by_complement_upper
    integer, intent(in), dimension(:):: kminor_start_lower
    integer, intent(in), dimension(:):: kminor_start_upper
    real(kind=wp), intent(in), dimension(:,:):: totplnk
    real(kind=wp), intent(in), dimension(:,:,:,:):: planck_frac
    real(kind=wp), intent(in), dimension(:,:,:), allocatable:: rayl_lower
    real(kind=wp), intent(in), dimension(:,:,:), allocatable:: rayl_upper
    real(kind=wp), intent(in), dimension(:,:):: optimal_angle_fit

    Return Value character(len=128)

  • private function load_ext(this, available_gases, gas_names, key_species, band2gpt, band_lims_wavenum, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, kminor_start_lower, kminor_start_upper, solar_quiet, solar_facular, solar_sunspot, tsi_default, mg_default, sb_default, rayl_lower, rayl_upper) result(err_message)

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_optics_rrtmgp), intent(inout) :: this
    class(ty_gas_concs), intent(in) :: available_gases
    character(len=*), intent(in), dimension(:):: gas_names
    integer, intent(in), dimension(:,:,:):: key_species
    integer, intent(in), dimension(:,:):: band2gpt
    real(kind=wp), intent(in), dimension(:,:):: band_lims_wavenum
    real(kind=wp), intent(in), dimension(:):: press_ref
    real(kind=wp), intent(in) :: press_ref_trop
    real(kind=wp), intent(in), dimension(:):: temp_ref
    real(kind=wp), intent(in) :: temp_ref_p
    real(kind=wp), intent(in) :: temp_ref_t
    real(kind=wp), intent(in), dimension(:,:,:):: vmr_ref
    real(kind=wp), intent(in), dimension(:,:,:,:):: kmajor
    real(kind=wp), intent(in), dimension(:,:,:):: kminor_lower
    real(kind=wp), intent(in), dimension(:,:,:):: kminor_upper
    character(len=*), intent(in), dimension(:):: gas_minor
    character(len=*), intent(in), dimension(:):: identifier_minor
    character(len=*), intent(in), dimension(:):: minor_gases_lower
    character(len=*), intent(in), dimension(:):: minor_gases_upper
    integer, intent(in), dimension(:,:):: minor_limits_gpt_lower
    integer, intent(in), dimension(:,:):: minor_limits_gpt_upper
    logical(kind=wl), intent(in), dimension(:):: minor_scales_with_density_lower
    logical(kind=wl), intent(in), dimension(:):: minor_scales_with_density_upper
    character(len=*), intent(in), dimension(:):: scaling_gas_lower
    character(len=*), intent(in), dimension(:):: scaling_gas_upper
    logical(kind=wl), intent(in), dimension(:):: scale_by_complement_lower
    logical(kind=wl), intent(in), dimension(:):: scale_by_complement_upper
    integer, intent(in), dimension(:):: kminor_start_lower
    integer, intent(in), dimension(:):: kminor_start_upper
    real(kind=wp), intent(in), dimension(:):: solar_quiet
    real(kind=wp), intent(in), dimension(:):: solar_facular
    real(kind=wp), intent(in), dimension(:):: solar_sunspot
    real(kind=wp), intent(in) :: tsi_default
    real(kind=wp), intent(in) :: mg_default
    real(kind=wp), intent(in) :: sb_default
    real(kind=wp), intent(in), dimension(:,:,:), allocatable:: rayl_lower
    real(kind=wp), intent(in), dimension(:,:,:), allocatable:: rayl_upper

    Return Value character(len=128)

procedure, public :: set_solar_variability

  • private function set_solar_variability(this, mg_index, sb_index, tsi) result(error_msg)

    Compute the spectral solar source function adjusted to account for solar variability following the NRLSSI2 model of Coddington et al. 2016, doi:10.1175/BAMS-D-14-00265.1. as specified by the facular brightening (mg_index) and sunspot dimming (sb_index) indices provided as input.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    class(ty_gas_optics_rrtmgp), intent(inout) :: this
    real(kind=wp), intent(in) :: mg_index

    facular brightening index (NRLSSI2 facular "Bremen" index)

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

    sunspot dimming index (NRLSSI2 sunspot "SPOT67" index)

    real(kind=wp), intent(in), optional :: tsi

    total solar irradiance

    Return Value character(len=128)

    Empty if successful

procedure, public :: set_tsi

  • private function set_tsi(this, tsi) result(error_msg)

    Arguments

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

    Scale the solar source function without changing the spectral distribution

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

    user-specified total solar irradiance;

    Return Value character(len=128)

    Empty if successful

procedure, public :: source_is_external

  • private pure function source_is_external(this)

    return true if initialized for external sources/shortwave, false otherwise

    Arguments

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

    Return Value logical

procedure, public :: source_is_internal

  • private pure function source_is_internal(this)

    return true if initialized for internal sources/longwave, false otherwise

    Arguments

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

    Return Value logical