get_var_attr_string Function

public function get_var_attr_string(this, var_name, attr_name, rc) result(attr_string)

Type Bound

FileMetadataUtils

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


Calls

proc~~get_var_attr_string~~CallsGraph proc~get_var_attr_string FileMetadataUtils%get_var_attr_string interface~mapl_assert MAPL_Assert proc~get_var_attr_string->interface~mapl_assert none~get_attribute_string Variable%get_attribute_string proc~get_var_attr_string->none~get_attribute_string none~get_variable FileMetadata%get_variable proc~get_var_attr_string->none~get_variable proc~get_file_name FileMetadataUtils%get_file_name proc~get_var_attr_string->proc~get_file_name proc~mapl_return MAPL_Return proc~get_var_attr_string->proc~mapl_return proc~mapl_verify MAPL_Verify proc~get_var_attr_string->proc~mapl_verify none~get_attribute_string->interface~mapl_assert none~get_attribute_string->proc~mapl_return none~get_attribute_string->proc~mapl_verify none~get_attribute~2 Variable%get_attribute none~get_attribute_string->none~get_attribute~2 none~get_value UnlimitedEntity%get_value none~get_attribute_string->none~get_value none~get_variable->proc~mapl_return none~at~88 StringVariableMap%at none~get_variable->none~at~88 proc~get_file_name->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception none~find~14 StringVariableMap%find none~at~88->none~find~14 none~get_attribute~2->interface~mapl_assert none~get_attribute~2->proc~mapl_return none~at~346 StringAttributeMap%at none~get_attribute~2->none~at~346 none~get_value->proc~mapl_return none~find~72 StringAttributeMap%find none~at~346->none~find~72

Called by

proc~~get_var_attr_string~~CalledByGraph proc~get_var_attr_string FileMetadataUtils%get_var_attr_string proc~mapl_create_bundle_from_metdata_id MAPL_create_bundle_from_metdata_id proc~mapl_create_bundle_from_metdata_id->proc~get_var_attr_string proc~mapl_read_bundle MAPL_read_bundle proc~mapl_read_bundle->proc~mapl_create_bundle_from_metdata_id proc~main main proc~main->proc~mapl_read_bundle program~time_ave time_ave program~time_ave->proc~mapl_read_bundle program~ut_regridding ut_ReGridding program~ut_regridding->proc~mapl_read_bundle program~regrid_util Regrid_Util program~regrid_util->proc~main

Source Code

   function get_var_attr_string(this,var_name,attr_name,rc) result(attr_string)
      character(len=:), allocatable :: attr_string
      class(FileMetadataUtils), intent(inout) :: this
      character(len=*), intent(in) :: var_name
      character(len=*), intent(in) :: attr_name
      integer, optional, intent(out) :: rc

      integer :: status
      character(:), allocatable :: fname
      type(Variable), pointer :: var

      fname = this%get_file_name(_RC)
      var => this%get_variable(var_name,_RC)
      _ASSERT(associated(var),"no variable named "//var_name//" in "//fname)
      attr_string = var%get_attribute_string(attr_name, rc=status)
      _ASSERT(status == _SUCCESS, 'failed to get attribute named '//attr_name//' in '//var_name//' in '//fname)

      _RETURN(_SUCCESS)
   end function get_var_attr_string