Skip to content

RTE: Solvers

Robert Pincus edited this page Jan 12, 2021 · 5 revisions

The rte_lw() and rte_sw() routines in the RTE library compute radiative transfer on a user-specified problem. Both routines allow for an upper boundary condition for spectrally-resolved diffuse radiation.

  function rte_lw(optical_props, top_at_1, &
                  sources, sfc_emis,       &
                  fluxes,                  &
                  inc_flux, n_gauss_angles, use_2stream, &
                  lw_Ds, flux_up_Jac, flux_dn_Jac) result(error_msg)
    class(ty_optical_props_arry), intent(in   ) :: optical_props     ! Array of ty_optical_props. This type is abstract
                                                                     ! and needs to be made concrete, either as an array
                                                                     ! (class ty_optical_props_arry) or in some user-defined way
    logical,                      intent(in   ) :: top_at_1          ! Is the top of the domain at index 1?
                                                                     ! (if not, ordering is bottom-to-top)
    type(ty_source_func_lw),      intent(in   ) :: sources
    real(wp), dimension(:,:),     intent(in   ) :: sfc_emis       ! emissivity at surface [] (nband, ncol)
    class(ty_fluxes),             intent(inout) :: fluxes         ! Array of ty_fluxes. Default computes broadband fluxes at all levels
                                                                  ! if output arrays are defined. Can be extended per user desires.
    real(wp), dimension(:,:),   &
                target, optional, intent(in   ) :: inc_flux       ! incident flux at domain top [W/m2] (ncol, ngpts)
    integer,            optional, intent(in   ) :: n_gauss_angles ! Number of angles used in Gaussian quadrature
                                                                  ! (no-scattering solution)
    logical,            optional, intent(in   ) :: use_2stream    ! When 2-stream parameters (tau/ssa/g) are provided, use 2-stream methods
                                                                  ! Default is to use re-scaled longwave transport
    real(wp), dimension(:,:),   &
                      optional,   intent(in   ) :: lw_Ds          ! linear fit to column transmissivity (ncol,ngpt)
    real(wp), dimension(:,:),   &
                target, optional, intent(inout) :: flux_up_Jac    ! surface temperature flux  Jacobian [W/m2/K] (ncol, ngpts)
    real(wp), dimension(:,:),   &
                target, optional, intent(inout) :: flux_dn_Jac    ! surface temperature flux  Jacobian [W/m2/K] (ncol, ngpts)
    character(len=128)                          :: error_msg      ! If empty, calculation was successful

If optical properties are specified as variables of type ty_optical_props_1scl (meaning extinction optical depth alone) in the longwave, radiative transfer is computed accounting for only emission and absorption. If optical properties are specified as variables of type ty_optical_props_2str (optical depth, single-scattering albedo, and asymmetry parameter) the rescaling and refinement method of Tang et al. 2018 is used by default; two-stream and adding methods maybe be chosen by setting optional argument use_2stream to .TRUE.

The sensitivity of broadband flux (W/m2-K) to changes in surface temperature is available in optional output arguments flux_up_Jac and flux_up_Jac (the latter only when ty_optical_props_2str are provided). Jacobians are not available if use_2stream is .TRUE.

  function rte_sw(atmos, top_at_1,                 &
                  mu0, inc_flux,                   &
                  sfc_alb_dir, sfc_alb_dif,        &
                  fluxes, inc_flux_dif) result(error_msg)
    class(ty_optical_props_arry), intent(in   ) :: atmos           ! Optical property values
    logical,                      intent(in   ) :: top_at_1        ! Is the top of the domain at index 1?
                                                                   ! (if not, ordering is bottom-to-top)
    real(wp), dimension(:),       intent(in   ) :: mu0             ! cosine of solar zenith angle (ncol)
    real(wp), dimension(:,:),     intent(in   ) :: inc_flux,    &  ! incident flux at top of domain [W/m2] (ncol, ngpt)
                                                   sfc_alb_dir, &  ! surface albedo for direct and
                                                   sfc_alb_dif     ! diffuse radiation (nband, ncol)
    class(ty_fluxes),             intent(inout) :: fluxes          ! Class describing output calculations
    real(wp), dimension(:,:), optional, &
                                  intent(in   ) :: inc_flux_dif    ! incident diffuse flux at top of domain [W/m2] (ncol, ngpt)
    character(len=128)                          :: error_msg       ! If empty, calculation was successful
Clone this wiki locally