MAPL_GriddedIO Derived Type

type, public :: MAPL_GriddedIO


Inherits

type~~mapl_griddedio~~InheritsGraph type~mapl_griddedio MAPL_GriddedIO ESMF_FieldBundle ESMF_FieldBundle type~mapl_griddedio->ESMF_FieldBundle output_bundle, input_bundle ESMF_Grid ESMF_Grid type~mapl_griddedio->ESMF_Grid output_grid ESMF_Time ESMF_Time type~mapl_griddedio->ESMF_Time startTime type~abstractregridder AbstractRegridder type~mapl_griddedio->type~abstractregridder regrid_handle type~filemetadata FileMetadata type~mapl_griddedio->type~filemetadata metadata type~filemetadatautils FileMetadataUtils type~mapl_griddedio->type~filemetadatautils current_file_metadata type~griddedioitemvector GriddedIOitemVector type~mapl_griddedio->type~griddedioitemvector items type~timedata timeData type~mapl_griddedio->type~timedata timeInfo type~verticaldata verticalData type~mapl_griddedio->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~~mapl_griddedio~~InheritedByGraph type~mapl_griddedio MAPL_GriddedIO type~extdata_iobundle ExtData_IoBundle type~extdata_iobundle->type~mapl_griddedio cfio type~extdatang_iobundle ExtDataNG_IOBundle type~extdatang_iobundle->type~mapl_griddedio grid_io type~fieldbundlewriter FieldBundleWriter type~fieldbundlewriter->type~mapl_griddedio cfio type~historycollection~2 HistoryCollection type~historycollection~2->type~mapl_griddedio mGriddedIO 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 type~iobundlengvector IoBundleNGVector type~iobundlengvector->type~extdatang_iobundle elements type~iobundlengvectoriterator IoBundleNGVectorIterator type~iobundlengvectoriterator->type~extdatang_iobundle elements type~iobundlengvectorriterator IoBundleNGVectorRIterator type~iobundlengvectorriterator->type~extdatang_iobundle elements type~iobundlevector IoBundleVector type~iobundlevector->type~extdata_iobundle elements type~iobundlevectoriterator IoBundleVectorIterator type~iobundlevectoriterator->type~extdata_iobundle elements type~iobundlevectorriterator IoBundleVectorRIterator type~iobundlevectorriterator->type~extdata_iobundle elements

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: chunking(:)
integer, public :: deflateLevel = 0
integer, public :: fraction
integer, public :: metadata_collection_id
integer, public :: nbits_to_keep = MAPL_NBITS_NOT_SET
integer, public :: quantizeAlgorithm = MAPL_NOQUANTIZE
integer, public :: quantizeLevel = 0
integer, public :: read_collection_id
integer, public :: regrid_hints = 0
integer, public :: regrid_method = REGRID_METHOD_BILINEAR
integer, public :: write_collection_id
integer, public :: zstandardLevel = 0
logical, public :: doVertRegrid = .false.
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 :: 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 MAPL_GriddedIO

  • private function new_MAPL_GriddedIO(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(MAPL_GriddedIO)


Type-Bound Procedures

procedure, public :: CreateFileMetaData

  • private subroutine CreateFileMetaData(this, items, bundle, timeInfo, vdata, ogrid, global_attributes, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), intent(inout), target :: this
    type(GriddedIOitemVector), intent(inout), target :: items
    type(ESMF_FieldBundle), intent(inout) :: bundle
    type(timeData), intent(inout) :: timeInfo
    type(verticalData), intent(inout), optional :: vdata
    type(ESMF_Grid), intent(inout), optional, pointer :: ogrid
    type(StringStringMap), intent(in), optional, target :: global_attributes
    integer, intent(out), optional :: rc

procedure, public :: CreateQuantizationInfo

  • private subroutine CreateQuantizationInfo(this, rc)

    Arguments

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

procedure, public :: CreateVariable

  • private subroutine CreateVariable(this, itemName, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), 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(MAPL_GriddedIO), intent(inout) :: this
    integer, intent(in) :: nFixedVars
    integer, intent(out), optional :: rc

procedure, public :: bundlePost => bundlepost

  • private subroutine bundlepost(this, filename, oClients, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), intent(inout), target :: this
    character(len=*), intent(in) :: filename
    type(ClientManager), intent(inout), optional :: oClients
    integer, intent(out), optional :: rc

procedure, public :: check_chunking

  • private subroutine check_chunking(this, lev_size, rc)

    Arguments

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

procedure, public :: destroy

  • private subroutine destroy(this, rc)

    Arguments

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

procedure, public :: modifyTime

  • private subroutine modifyTime(this, oClients, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), intent(inout) :: this
    type(ClientManager), intent(inout), optional :: oClients
    integer, intent(out), optional :: rc

procedure, public :: modifyTimeIncrement

  • private subroutine modifyTimeIncrement(this, frequency, rc)

    Arguments

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

procedure, public :: process_data_from_file

  • private subroutine process_data_from_file(this, rc)

    Arguments

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

procedure, public :: regridScalar => RegridScalar

  • private subroutine RegridScalar(this, itemName, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), 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(MAPL_GriddedIO), intent(inout) :: this
    character(len=*), intent(in) :: xName
    character(len=*), intent(in) :: yName
    integer, intent(out), optional :: rc

procedure, public :: request_data_from_file

  • private subroutine request_data_from_file(this, filename, timeindex, rc)

    Arguments

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

procedure, public :: set_default_chunking

  • private subroutine set_default_chunking(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), 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, regrid_hints, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), 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(in), optional :: regrid_hints
    integer, intent(out), optional :: rc

procedure, public :: stage2DLatLon

  • private subroutine stage2DLatLon(this, fileName, oClients, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), intent(inout), target :: this
    character(len=*), intent(in) :: fileName
    type(ClientManager), intent(inout), optional, target :: oClients
    integer, intent(out), optional :: rc

procedure, public :: stageData

  • private subroutine stageData(this, field, fileName, tIndex, oClients, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MAPL_GriddedIO), intent(inout) :: this
    type(ESMF_Field), intent(inout) :: field
    character(len=*), intent(in) :: fileName
    integer, intent(in) :: tIndex
    type(ClientManager), intent(inout), optional :: oClients
    integer, intent(out), optional :: rc

procedure, public :: swap_undef_value

  • private subroutine swap_undef_value(this, fname, rc)

    Arguments

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

Source Code

  type, public :: MAPL_GriddedIO
     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_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 = MAPL_NOQUANTIZE
     integer :: quantizeLevel = 0
     integer :: zstandardLevel = 0
     integer, allocatable :: chunking(:)
     logical :: itemOrderAlphabetical = .true.
     integer :: fraction
     integer :: regrid_hints = 0
     contains
        procedure :: CreateFileMetaData
        procedure :: CreateVariable
        procedure :: CreateQuantizationInfo
        procedure :: modifyTime
        procedure :: modifyTimeIncrement
        procedure :: bundlePost
        procedure :: stageData
        procedure :: stage2DLatLon
        procedure :: regridScalar
        procedure :: regridVector
        procedure :: set_param
        procedure :: set_default_chunking
        procedure :: check_chunking
        procedure :: alphabatize_variables
        procedure :: request_data_from_file
        procedure :: process_data_from_file
        procedure :: swap_undef_value
        procedure :: destroy
  end type MAPL_GriddedIO