radiation_pdf_sampler Module


Uses

  • module~~radiation_pdf_sampler~~UsesGraph module~radiation_pdf_sampler radiation_pdf_sampler module~parkind1~2 PARKIND1 module~radiation_pdf_sampler->module~parkind1~2

Contents


Derived Types

type, public ::  pdf_sampler_type

Components

Type Visibility Attributes Name Initial
integer, public :: ncdf
integer, public :: nfsd
real(kind=jprb), public :: fsd1
real(kind=jprb), public :: inv_fsd_interval
real(kind=jprb), public, allocatable, dimension(:,:) :: val

Type-Bound Procedures

procedure , public :: setup => setup_pdf_sampler Subroutine
procedure , public :: sample => sample_from_pdf Subroutine
procedure , public :: masked_sample => sample_from_pdf_masked Subroutine
procedure , public :: block_sample => sample_from_pdf_block Subroutine
procedure , public :: masked_block_sample => sample_from_pdf_masked_block Subroutine
procedure , public :: deallocate => deallocate_pdf_sampler Subroutine

Subroutines

public subroutine setup_pdf_sampler(this, file_name, iverbose)

Arguments

Type IntentOptional Attributes Name
class(pdf_sampler_type), intent(inout) :: this
character(len=*), intent(in) :: file_name
integer, intent(in), optional :: iverbose

public subroutine deallocate_pdf_sampler(this)

Arguments

Type IntentOptional Attributes Name
class(pdf_sampler_type), intent(inout) :: this

publicelemental subroutine sample_from_pdf(this, fsd, cdf, val)

Arguments

Type IntentOptional Attributes Name
class(pdf_sampler_type), intent(in) :: this
real(kind=jprb), intent(in) :: fsd
real(kind=jprb), intent(in) :: cdf
real(kind=jprb), intent(out) :: val

public subroutine sample_from_pdf_masked(this, nsamp, fsd, cdf, val, mask)

Arguments

Type IntentOptional Attributes Name
class(pdf_sampler_type), intent(in) :: this
integer, intent(in) :: nsamp
real(kind=jprb), intent(in) :: fsd(nsamp)
real(kind=jprb), intent(in) :: cdf(nsamp)
real(kind=jprb), intent(out) :: val(:)
logical, intent(in) :: mask(nsamp)

public subroutine sample_from_pdf_block(this, nz, ng, fsd, cdf, val)

Arguments

Type IntentOptional Attributes Name
class(pdf_sampler_type), intent(in) :: this
integer, intent(in) :: nz
integer, intent(in) :: ng
real(kind=jprb), intent(in) :: fsd(nz)
real(kind=jprb), intent(in) :: cdf(ng,nz)
real(kind=jprb), intent(out) :: val(:,:)

public subroutine sample_from_pdf_masked_block(this, nz, ng, fsd, cdf, val, mask)

Arguments

Type IntentOptional Attributes Name
class(pdf_sampler_type), intent(in) :: this
integer, intent(in) :: nz
integer, intent(in) :: ng
real(kind=jprb), intent(in) :: fsd(nz)
real(kind=jprb), intent(in) :: cdf(ng,nz)
real(kind=jprb), intent(out) :: val(:,:)
logical, intent(in), optional :: mask(nz)