FileMetadataUtils Derived Type

type, public :: FileMetadataUtils


Inherits

type~~filemetadatautils~~InheritsGraph type~filemetadatautils FileMetadataUtils type~filemetadata FileMetadata type~filemetadatautils->type~filemetadata metadata 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~map_set~15 map_Set type~stringvariablemap->type~map_set~15 tree type~variable->StringVector dimensions type~stringattributemap StringAttributeMap type~variable->type~stringattributemap attributes type~unlimitedentity UnlimitedEntity type~variable->type~unlimitedentity const_value type~map_s_basenode~15 map_s_BaseNode type~map_set~15->type~map_s_basenode~15 root type~set2~10 set2 type~stringattributemap->type~set2~10 tree

Inherited by

type~~filemetadatautils~~InheritedByGraph type~filemetadatautils FileMetadataUtils type~filemetadatautilsvector FileMetadataUtilsVector type~filemetadatautilsvector->type~filemetadatautils elements type~filemetadatautilsvectoriterator FileMetadataUtilsVectorIterator type~filemetadatautilsvectoriterator->type~filemetadatautils elements type~filemetadatautilsvectorriterator FileMetadataUtilsVectorRIterator type~filemetadatautilsvectorriterator->type~filemetadatautils elements type~mapl_griddedio MAPL_GriddedIO type~mapl_griddedio->type~filemetadatautils current_file_metadata type~primaryexport PrimaryExport type~primaryexport->type~filemetadatautils file_metadata type~sampler sampler type~sampler->type~filemetadatautils current_file_metadata 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~historycollection~2->type~sampler xsampler type~mapldatacollection MAPLDataCollection type~mapldatacollection->type~filemetadatautilsvector metadatas type~vector_wrapper~28 vector_wrapper type~vector_wrapper~28->type~primaryexport item 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~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 type~maplcollectionvector MAPLCollectionVector type~maplcollectionvector->type~mapldatacollection elements type~maplcollectionvectoriterator MAPLCollectionVectorIterator type~maplcollectionvectoriterator->type~mapldatacollection elements type~maplcollectionvectorriterator MAPLCollectionVectorRIterator type~maplcollectionvectorriterator->type~mapldatacollection elements type~primaryexportvector PrimaryExportVector type~primaryexportvector->type~vector_wrapper~28 elements type~primaryexportvectoriterator PrimaryExportVectorIterator type~primaryexportvectoriterator->type~vector_wrapper~28 elements type~vector_wrapper~26 vector_wrapper type~vector_wrapper~26->type~extdatang_iobundle item type~iobundlengvector IoBundleNGVector type~iobundlengvector->type~vector_wrapper~26 elements type~iobundlengvectoriterator IoBundleNGVectorIterator type~iobundlengvectoriterator->type~vector_wrapper~26 elements type~vectorriterator~23 VectorRIterator type~vectorriterator~23->type~primaryexportvectoriterator iterator

Components

Type Visibility Attributes Name Initial
type(FileMetadata), public :: metadata

Constructor

public interface FileMetadataUtils

  • private function new_FilemetadataUtils(metadata, fName) result(metadata_utils)

    Arguments

    Type IntentOptional Attributes Name
    type(FileMetadata), intent(in) :: metadata
    character(len=*), intent(in) :: fName

    Return Value type(FileMetadataUtils)


Type-Bound Procedures

procedure, public :: create

  • private subroutine create(this, metadata, fName)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(inout) :: this
    type(FileMetadata), intent(in) :: metadata
    character(len=*), intent(in) :: fName

procedure, public :: get_coordinate_info

  • private subroutine get_coordinate_info(this, coordinate_name, coordSize, coordUnits, long_name, standard_name, coords, coordinate_attr, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(inout) :: this
    character(len=*), intent(in) :: coordinate_name
    integer, intent(out), optional :: coordSize
    character(len=*), intent(out), optional :: coordUnits
    character(len=*), intent(out), optional :: long_name
    character(len=*), intent(out), optional :: standard_name
    real, intent(inout), optional, allocatable :: coords(:)
    character(len=*), intent(out), optional :: coordinate_attr
    integer, intent(out), optional :: rc

procedure, public :: get_coordinate_variable

  • private function get_coordinate_variable(this, var_name, unusable, rc) result(var)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in), target :: this
    character(len=*), intent(in) :: var_name
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

    Return Value class(CoordinateVariable), pointer

procedure, public :: get_dimension

  • private function get_dimension(this, dim_name, unusable, rc) result(extent)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in), target :: this
    character(len=*), intent(in) :: dim_name
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

    Return Value integer

procedure, public :: get_dimensions

  • private function get_dimensions(this) result(dimensions)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in), target :: this

    Return Value type(StringIntegerMap), pointer

procedure, public :: get_file_name

  • private function get_file_name(this, rc) result(fname)

    Arguments

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

    Return Value character(len=:), allocatable

procedure, public :: get_level_name

  • private function get_level_name(this, rc) result(lev_name)

    Arguments

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

    Return Value character(len=:), allocatable

procedure, public :: get_time_info

  • private subroutine get_time_info(this, startTime, startYear, startMonth, startDay, startHour, startMin, startSec, units, timeVector, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(inout) :: this
    type(ESMF_Time), intent(inout), optional :: startTime
    integer, intent(out), optional :: startYear
    integer, intent(out), optional :: startMonth
    integer, intent(out), optional :: startDay
    integer, intent(out), optional :: startHour
    integer, intent(out), optional :: startMin
    integer, intent(out), optional :: startSec
    character(len=*), intent(out), optional :: units
    type(ESMF_Time), optional, allocatable :: timeVector(:)
    integer, intent(out), optional :: rc

procedure, public :: get_var_attr_int32

  • private function get_var_attr_int32(this, var_name, attr_name, rc) result(attr_int32)

    Arguments

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

    Return Value integer(kind=INT32)

procedure, public :: get_var_attr_int64

  • private function get_var_attr_int64(this, var_name, attr_name, rc) result(attr_int64)

    Arguments

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

    Return Value integer(kind=INT64)

procedure, public :: get_var_attr_real32

  • private function get_var_attr_real32(this, var_name, attr_name, rc) result(attr_real32)

    Arguments

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

    Return Value real(kind=REAL32)

procedure, public :: get_var_attr_real64

  • private function get_var_attr_real64(this, var_name, attr_name, rc) result(attr_real64)

    Arguments

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

    Return Value real(kind=REAL64)

procedure, public :: get_var_attr_string

  • private function get_var_attr_string(this, var_name, attr_name, rc) result(attr_string)

    Arguments

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

    Return Value character(len=:), allocatable

procedure, public :: get_variable

  • private function get_variable(this, var_name, unusable, rc) result(var)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in), target :: this
    character(len=*), intent(in) :: var_name
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

    Return Value class(Variable), pointer

procedure, public :: get_variable_attribute

  • private function get_variable_attribute(this, var_name, attr_name, rc) result(units)

    Arguments

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

    Return Value character(len=:), pointer

procedure, public :: get_variables

  • private function get_variables(this, rc) result(variables)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value type(StringVariableMap), pointer

procedure, public :: is_var_present

  • private function is_var_present(this, var_name, rc) result(isPresent)

    Arguments

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

    Return Value logical

procedure, public :: var_get_missing_value

  • private function var_get_missing_value(this, var_name, rc) result(missing_value)

    Arguments

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

    Return Value real(kind=REAL32)

procedure, public :: var_has_attr

  • private function var_has_attr(this, var_name, attr_name, rc)

    Arguments

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

    Return Value logical

procedure, public :: var_has_missing_value

  • private function var_has_missing_value(this, var_name, rc)

    Arguments

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

    Return Value logical

generic, public :: write(formatted) => write_formatted

  • private subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in) :: this
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

procedure, public :: write_formatted

  • private subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadataUtils), intent(in) :: this
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

Source Code

   type :: FileMetadataUtils
      private
      type(FileMetadata), public :: metadata
      character(len=:), allocatable :: filename 
   contains
      procedure :: create
      procedure :: get_coordinate_info
      procedure :: get_variable_attribute
      procedure :: get_time_info
      procedure :: get_level_name
      procedure :: is_var_present
      procedure :: get_file_name
      procedure :: var_get_missing_value
      procedure :: var_has_missing_value
      procedure :: var_has_attr
      procedure :: get_var_attr_real32
      procedure :: get_var_attr_real64
      procedure :: get_var_attr_int32
      procedure :: get_var_attr_int64
      procedure :: get_var_attr_string

      procedure :: get_variable
      procedure :: get_coordinate_variable
      procedure :: get_variables
      procedure :: get_dimension
      procedure :: get_dimensions

      procedure :: write_formatted
      generic :: write(formatted) => write_formatted

   end type FileMetadataUtils