pdf_sampler_type Derived Type

type, public :: pdf_sampler_type


Contents


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

  • 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

procedure, public :: sample => sample_from_pdf

  • 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

procedure, public :: masked_sample => sample_from_pdf_masked

  • 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)

procedure, public :: block_sample => sample_from_pdf_block

  • 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(:,:)

procedure, public :: masked_block_sample => sample_from_pdf_masked_block

  • 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)

procedure, public :: deallocate => deallocate_pdf_sampler