sampler Derived Type

type, public :: sampler


Inherits

type~~sampler~~InheritsGraph type~sampler sampler ESMF_FieldBundle ESMF_FieldBundle type~sampler->ESMF_FieldBundle output_bundle, input_bundle, acc_bundle ESMF_Grid ESMF_Grid type~sampler->ESMF_Grid output_grid ESMF_Time ESMF_Time type~sampler->ESMF_Time startTime type~abstractregridder AbstractRegridder type~sampler->type~abstractregridder regrid_handle type~filemetadata FileMetadata type~sampler->type~filemetadata metadata type~filemetadatautils FileMetadataUtils type~sampler->type~filemetadatautils current_file_metadata type~griddedioitemvector GriddedIOitemVector type~sampler->type~griddedioitemvector items type~timedata timeData type~sampler->type~timedata timeInfo type~verticaldata verticalData type~sampler->type~verticaldata vdata type~regridderspec RegridderSpec type~abstractregridder->type~regridderspec spec StringIntegerMap StringIntegerMap type~filemetadata->StringIntegerMap dimensions StringVector StringVector type~filemetadata->StringVector order type~stringvariablemap StringVariableMap type~filemetadata->type~stringvariablemap variables type~variable Variable type~filemetadata->type~variable global_var type~filemetadatautils->type~filemetadata type~v_wrapper v_Wrapper type~griddedioitemvector->type~v_wrapper elements ESMF_Clock ESMF_Clock type~timedata->ESMF_Clock clock ESMF_TimeInterval ESMF_TimeInterval type~timedata->ESMF_TimeInterval offset type~esmftimevector ESMFTimeVector type~timedata->type~esmftimevector tvec ESMF_Field ESMF_Field type~verticaldata->ESMF_Field interp_var type~esmftimevector->ESMF_Time elements type~regridderspec->ESMF_Grid grid_in, grid_out type~set2~13 set2 type~stringvariablemap->type~set2~13 tree type~griddedioitem GriddedIOitem type~v_wrapper->type~griddedioitem item type~variable->StringVector dimensions type~stringattributemap StringAttributeMap type~variable->type~stringattributemap attributes type~unlimitedentity UnlimitedEntity type~variable->type~unlimitedentity const_value type~griddedioitem->ESMF_Field xfield, yfield, xfield_out, yfield_out type~ivector~12 iVector type~set2~13->type~ivector~12 parents, lefts, rights, heights type~tvector~12 tVector type~set2~13->type~tvector~12 items type~set2~11 set2 type~stringattributemap->type~set2~11 tree

Inherited by

type~~sampler~~InheritedByGraph type~sampler sampler type~historycollection~2 HistoryCollection type~historycollection~2->type~sampler xsampler type~historycollectionvectoriterator~2 HistoryCollectionVectorIterator type~historycollectionvectoriterator~2->type~historycollection~2 elements type~historycollectionvectorriterator~2 HistoryCollectionVectorRIterator type~historycollectionvectorriterator~2->type~historycollection~2 elements type~historycollectionvector~2 HistoryCollectionVector type~historycollectionvector~2->type~historycollection~2 elements

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: chunking(:)
integer, public :: deflateLevel = 0
integer, public :: epoch_sec
integer, public :: fraction
integer, public :: metadata_collection_id
integer, public :: nbits_to_keep = MAPL_NBITS_NOT_SET
integer, public :: quantizeAlgorithm = 1
integer, public :: quantizeLevel = 0
integer, public :: read_collection_id
integer, public :: regrid_method = REGRID_METHOD_BILINEAR
integer, public :: write_collection_id
integer, public :: zstandardLevel = 0
logical, public :: doVertRegrid = .false.
logical, public :: have_initalized
logical, public :: itemOrderAlphabetical = .true.
real, public, allocatable :: corner_lats(:,:)
real, public, allocatable :: corner_lons(:,:)
real, public, allocatable :: lats(:,:)
real, public, allocatable :: lons(:,:)
real, public, allocatable :: times(:)
type(ESMF_Grid), public :: output_grid
type(ESMF_Time), public :: startTime
class(AbstractRegridder), public, pointer :: regrid_handle => null()
type(ESMF_FieldBundle), public :: acc_bundle
type(ESMF_FieldBundle), public :: input_bundle
type(ESMF_FieldBundle), public :: output_bundle
type(FileMetadata), public, allocatable :: metadata
type(FileMetadataUtils), public, pointer :: current_file_metadata
type(GriddedIOitemVector), public :: items
type(timeData), public :: timeInfo
type(verticalData), public :: vdata

Constructor

public interface sampler

  • private function new_sampler(metadata, input_bundle, output_bundle, write_collection_id, read_collection_id, metadata_collection_id, regrid_method, fraction, items, rc) result(GriddedIO)

    Arguments

    Type IntentOptional Attributes Name
    type(FileMetadata), intent(in), optional :: metadata
    type(ESMF_FieldBundle), intent(in), optional :: input_bundle
    type(ESMF_FieldBundle), intent(in), optional :: output_bundle
    integer, intent(in), optional :: write_collection_id
    integer, intent(in), optional :: read_collection_id
    integer, intent(in), optional :: metadata_collection_id
    integer, intent(in), optional :: regrid_method
    integer, intent(in), optional :: fraction
    type(GriddedIOitemVector), intent(in), optional :: items
    integer, intent(out), optional :: rc

    Return Value type(sampler)


Type-Bound Procedures

procedure, public :: CreateVariable

  • private subroutine CreateVariable(this, itemName, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    character(len=*), intent(in) :: itemName
    integer, intent(out), optional :: rc

procedure, public :: Create_bundle_RH

  • private subroutine Create_bundle_RH(this, items, bundle, tunit, timeInfo, vdata, ogrid, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    type(GriddedIOitemVector), intent(inout), target :: items
    type(ESMF_FieldBundle), intent(inout) :: bundle
    character(len=*), intent(in) :: tunit
    type(timeData), intent(inout), optional :: timeInfo
    type(verticalData), intent(inout), optional :: vdata
    type(ESMF_Grid), intent(inout), optional, pointer :: ogrid
    integer, intent(out), optional :: rc

procedure, public :: addVariable_to_acc_bundle

  • private subroutine addVariable_to_acc_bundle(this, itemName, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    character(len=*), intent(in) :: itemName
    integer, intent(out), optional :: rc

procedure, public :: alphabatize_variables

  • private subroutine alphabatize_variables(this, nFixedVars, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    integer, intent(in) :: nFixedVars
    integer, intent(out), optional :: rc

procedure, public :: check_chunking

  • private subroutine check_chunking(this, lev_size, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    integer, intent(in) :: lev_size
    integer, intent(out), optional :: rc

procedure, public :: interp_accumulate_fields

  • private subroutine interp_accumulate_fields(this, xy_subset, rc)

    write(6,) ‘MAPL_GridGetInterior, ii1,iin,jj1,jjn’, ii1,iin,jj1,jjn print, ‘js,je ‘, js, je

    write(6,) ‘ck bundlepost_acc’ write(6,) ‘j1(localDe)’, j1(0:localDeCount-1) write(6,*) ‘j2(localDe)’, j2(0:localDeCount-1)

                  write(6,*) 'j, jj', j, jj
                  write(6,*) 'j, jj', j, jj
    

    Arguments

    Type IntentOptional Attributes Name
    class(sampler) :: this
    integer, intent(in) :: xy_subset(2,2)

    integer, intent(in) :: xy_mask(:,:)

    integer, intent(out), optional :: rc

procedure, public :: regridScalar => RegridScalar

  • private subroutine RegridScalar(this, itemName, rc)

    print , maxval(ptr2d) print , minval(ptr2d) print , maxval(outptr2d) print , minval(outptr2d)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    character(len=*), intent(in) :: itemName
    integer, intent(out), optional :: rc

procedure, public :: regridVector => RegridVector

  • private subroutine RegridVector(this, xName, yName, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    character(len=*), intent(in) :: xName
    character(len=*), intent(in) :: yName
    integer, intent(out), optional :: rc

procedure, public :: set_default_chunking

  • private subroutine set_default_chunking(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: set_param

  • private subroutine set_param(this, deflation, quantize_algorithm, quantize_level, zstandard_level, chunking, nbits_to_keep, regrid_method, itemOrder, write_collection_id, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(sampler), intent(inout) :: this
    integer, intent(in), optional :: deflation
    integer, intent(in), optional :: quantize_algorithm
    integer, intent(in), optional :: quantize_level
    integer, intent(in), optional :: zstandard_level
    integer, intent(in), optional :: chunking(:)
    integer, intent(in), optional :: nbits_to_keep
    integer, intent(in), optional :: regrid_method
    logical, intent(in), optional :: itemOrder
    integer, intent(in), optional :: write_collection_id
    integer, intent(out), optional :: rc

Source Code

  type, public :: sampler
     type(FileMetaData), allocatable :: metadata
     type(fileMetadataUtils), pointer :: current_file_metadata
     integer :: write_collection_id
     integer :: read_collection_id
     integer :: metadata_collection_id
     class (AbstractRegridder), pointer :: regrid_handle => null()
     type(ESMF_Grid) :: output_grid
     logical :: doVertRegrid = .false.
     type(ESMF_FieldBundle) :: output_bundle
     type(ESMF_FieldBundle) :: input_bundle
     type(ESMF_FieldBundle) :: acc_bundle
     type(ESMF_Time) :: startTime
     integer :: regrid_method = REGRID_METHOD_BILINEAR
     integer :: nbits_to_keep = MAPL_NBITS_NOT_SET
     real, allocatable :: lons(:,:),lats(:,:)
     real, allocatable :: corner_lons(:,:),corner_lats(:,:)
     real, allocatable :: times(:)
     type(TimeData) :: timeInfo
     type(VerticalData) :: vdata
     type(GriddedIOitemVector) :: items
     integer :: deflateLevel = 0
     integer :: quantizeAlgorithm = 1
     integer :: quantizeLevel = 0
     integer :: zstandardLevel = 0
     integer, allocatable :: chunking(:)
     logical :: itemOrderAlphabetical = .true.
     integer :: fraction
     logical :: have_initalized
     integer :: epoch_sec
   contains
     procedure :: Create_bundle_RH
     procedure :: CreateVariable
     procedure :: regridScalar
     procedure :: regridVector
     procedure :: set_param
     procedure :: set_default_chunking
     procedure :: check_chunking
     procedure :: alphabatize_variables
     procedure :: addVariable_to_acc_bundle
     procedure :: interp_accumulate_fields
  end type sampler