FileMetadata Derived Type

type, public :: FileMetadata


Inherits

type~~filemetadata~~InheritsGraph type~filemetadata FileMetadata 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 type~ivector~9 iVector type~set2~10->type~ivector~9 parents, lefts, rights, heights type~tvector~9 tVector type~set2~10->type~tvector~9 items

Inherited by

type~~filemetadata~~InheritedByGraph type~filemetadata FileMetadata type~addwritedatacollectionmessage AddWriteDataCollectionMessage type~addwritedatacollectionmessage->type~filemetadata fmd type~cfiocollection CFIOCollection type~cfiocollection->type~filemetadata file type~extdatafilestream ExtDataFileStream type~extdatafilestream->type~filemetadata metadata type~filemetadatautils FileMetadataUtils type~filemetadatautils->type~filemetadata metadata type~filemetadatavector FileMetadataVector type~filemetadatavector->type~filemetadata elements type~filemetadatavectoriterator FileMetadataVectorIterator type~filemetadatavectoriterator->type~filemetadata elements type~filemetadatavectorriterator FileMetadataVectorRIterator type~filemetadatavectorriterator->type~filemetadata elements type~historycollection HistoryCollection type~historycollection->type~filemetadata fmd type~mapl_griddedio MAPL_GriddedIO type~mapl_griddedio->type~filemetadata metadata type~masksamplergeosat MaskSamplerGeosat type~masksamplergeosat->type~filemetadata metadata type~obs_unit obs_unit type~obs_unit->type~filemetadata metadata type~pfio_vector PFIO_Vector type~pfio_vector->type~filemetadata elements type~pfio_vectoriterator PFIO_VectorIterator type~pfio_vectoriterator->type~filemetadata elements type~pfio_vectorriterator PFIO_VectorRIterator type~pfio_vectorriterator->type~filemetadata elements type~regridsupport RegridSupport type~regridsupport->type~filemetadata cfio_cubed_sphere, cfio_lat_lon type~replacemetadatamessage ReplaceMetadataMessage type~replacemetadatamessage->type~filemetadata fmd type~sampler sampler type~sampler->type~filemetadata metadata type~stationsampler StationSampler type~stationsampler->type~filemetadata metadata

Constructor

public interface FileMetadata

  • private function new_FileMetadata(unusable, dimensions, global, variables, order) result(fmd)

    Arguments

    Type IntentOptional Attributes Name
    class(KeywordEnforcer), intent(in), optional :: unusable
    type(StringIntegerMap), intent(in), optional :: dimensions
    type(Variable), intent(in), optional :: global
    type(StringVariableMap), intent(in), optional :: variables
    type(StringVector), intent(in), optional :: order

    Return Value type(FileMetadata)


Type-Bound Procedures

generic, public :: add_attribute => add_attribute_0d, add_attribute_1d

  • private subroutine add_attribute_0d(this, attr_name, attr_value, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(inout), target :: this
    character(len=*), intent(in) :: attr_name
    class(*), intent(in) :: attr_value
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc
  • private subroutine add_attribute_1d(this, attr_name, values, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(inout), target :: this
    character(len=*), intent(in) :: attr_name
    class(*), intent(in) :: values(:)
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure, public :: add_attribute_0d

  • private subroutine add_attribute_0d(this, attr_name, attr_value, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(inout), target :: this
    character(len=*), intent(in) :: attr_name
    class(*), intent(in) :: attr_value
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure, public :: add_attribute_1d

  • private subroutine add_attribute_1d(this, attr_name, values, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(inout), target :: this
    character(len=*), intent(in) :: attr_name
    class(*), intent(in) :: values(:)
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure, public :: add_dimension

  • private subroutine add_dimension(this, dim_name, extent, unusable, rc)

    Arguments

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

procedure, public :: add_variable

  • private subroutine add_variable(this, var_name, var, unusable, rc)

    Arguments

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

procedure, public :: equal

  • private function equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in), target :: a
    class(FileMetadata), intent(in), target :: b

    Return Value logical

procedure, public :: get_attribute

  • private function get_attribute(this, attr_name, unusable, rc) result(ref)

    Arguments

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

    Return Value type(Attribute), pointer

procedure, public :: get_attributes

  • private function get_attributes(this, rc) result(attributes)

    Arguments

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

    Return Value type(StringAttributeMap), pointer

procedure, public :: get_coordinate_variable

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

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), 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(FileMetadata), 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(FileMetadata), intent(in), target :: this

    Return Value type(StringIntegerMap), pointer

procedure, public :: get_global_var

  • private function get_global_var(this) result(global_var)

    Arguments

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

    Return Value type(Variable), pointer

procedure, public :: get_order

  • private function get_order(this, unusable, rc) result(order)

    Arguments

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

    Return Value type(StringVector)

procedure, public :: get_source_file

  • private function get_source_file(this, rc) result(source_file)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in) :: this
    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(FileMetadata), 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_variables

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

    Arguments

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

    Return Value type(StringVariableMap), pointer

procedure, public :: has_attribute

  • private function has_attribute(this, attr_name)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in), target :: this
    character(len=*), intent(in) :: attr_name

    Return Value logical

procedure, public :: has_dimension

  • private function has_dimension(this, dim_name, unusable, rc) result(isPresent)

    Arguments

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

    Return Value logical

procedure, public :: has_variable

  • private function has_variable(this, var_name, unusable, rc) result(has)

    Arguments

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

    Return Value logical

procedure, public :: is_coordinate_variable

  • private function is_coordinate_variable(this, var_name, unusable, rc)

    Arguments

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

    Return Value logical

procedure, public :: merge

  • private subroutine merge(this, meta, rc)

    Arguments

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

procedure, public :: modify_dimension

  • private subroutine modify_dimension(this, dim_name, extent, unusable, rc)

    Arguments

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

procedure, public :: modify_variable

  • private subroutine modify_variable(this, var_name, var, unusable, rc)

    Arguments

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

procedure, public :: not_equal

  • private function not_equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in), target :: a
    class(FileMetadata), intent(in), target :: b

    Return Value logical

generic, public :: operator(/=) => not_equal

  • private function not_equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in), target :: a
    class(FileMetadata), intent(in), target :: b

    Return Value logical

generic, public :: operator(==) => equal

  • private function equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in), target :: a
    class(FileMetadata), intent(in), target :: b

    Return Value logical

procedure, public :: remove_attribute

  • private subroutine remove_attribute(this, attr_name)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(inout), target :: this
    character(len=*), intent(in) :: attr_name

procedure, public :: remove_variable

  • private subroutine remove_variable(this, var_name, unusable, rc)

    Arguments

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

procedure, public :: serialize

  • private subroutine serialize(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(in) :: this
    integer, intent(inout), allocatable :: buffer(:)
    integer, intent(out), optional :: rc

procedure, public :: set_order

  • private subroutine set_order(this, newOrder, unusable, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), intent(inout), target :: this
    type(StringVector), intent(in) :: newOrder
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure, public :: set_source_file

  • private subroutine set_source_file(this, source_file, rc)

    Arguments

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

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

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

    Arguments

    Type IntentOptional Attributes Name
    class(FileMetadata), 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(FileMetadata), 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 :: FileMetadata
      private
      type (StringIntegerMap) :: dimensions
      type (Variable) :: global_var
      type (StringVariableMap) :: variables
      type (StringVector) :: order
      character(len=:), allocatable :: source_file
   contains

      procedure :: get_dimensions
      procedure :: get_global_var
      procedure :: add_dimension
      procedure :: get_dimension
      procedure :: modify_dimension

      procedure :: get_attributes
      generic :: add_attribute => add_attribute_0d, add_attribute_1d
      procedure :: add_attribute_0d
      procedure :: add_attribute_1d
      procedure :: get_attribute
      procedure :: has_attribute
      procedure :: remove_attribute

      procedure :: get_variable
      procedure :: get_coordinate_variable
      procedure :: add_variable
      procedure :: get_variables
      procedure :: remove_variable
      procedure :: get_order
      procedure :: set_order
      procedure :: modify_variable
      procedure :: has_dimension
      procedure :: has_variable
      procedure :: merge

      generic :: operator(==) => equal
      generic :: operator(/=) => not_equal
      procedure :: equal
      procedure :: not_equal

      procedure :: serialize
      procedure :: is_coordinate_variable
      procedure :: get_source_file
      procedure :: set_source_file

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

   end type FileMetadata