var_has_attr Function

public function var_has_attr(this, var_name, attr_name, rc)

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 logical


Calls

proc~~var_has_attr~~CallsGraph proc~var_has_attr FileMetadataUtils%var_has_attr interface~mapl_assert MAPL_Assert proc~var_has_attr->interface~mapl_assert none~get_variable FileMetadata%get_variable proc~var_has_attr->none~get_variable none~is_attribute_present Variable%is_attribute_present proc~var_has_attr->none~is_attribute_present proc~get_file_name FileMetadataUtils%get_file_name proc~var_has_attr->proc~get_file_name proc~mapl_return MAPL_Return proc~var_has_attr->proc~mapl_return proc~mapl_verify MAPL_Verify proc~var_has_attr->proc~mapl_verify none~get_variable->proc~mapl_return none~at~5 StringVariableMap%at none~get_variable->none~at~5 none~is_attribute_present->proc~mapl_return none~at~140 StringAttributeMap%at none~is_attribute_present->none~at~140 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~39 StringAttributeMap%find none~at~140->none~find~39 none~find~2 StringVariableMap%find none~at~5->none~find~2

Called by

proc~~var_has_attr~~CalledByGraph proc~var_has_attr FileMetadataUtils%var_has_attr proc~get_coordinate_info FileMetadataUtils%get_coordinate_info proc~get_coordinate_info->proc~var_has_attr proc~var_get_missing_value FileMetadataUtils%var_get_missing_value proc~var_get_missing_value->proc~var_has_attr none~swap_undef_value MAPL_GriddedIO%swap_undef_value none~swap_undef_value->proc~var_get_missing_value proc~get_file_levels get_file_levels proc~get_file_levels->proc~get_coordinate_info proc~get_file_levels~2 get_file_levels proc~get_file_levels~2->proc~get_coordinate_info proc~get_time_info FileMetadataUtils%get_time_info proc~get_time_info->proc~get_coordinate_info program~time_ave time_ave program~time_ave->proc~get_coordinate_info program~time_ave->proc~var_get_missing_value program~time_ave->proc~get_file_levels~2 proc~get_file_times~2 get_file_times program~time_ave->proc~get_file_times~2 proc~mapl_read_bundle MAPL_read_bundle program~time_ave->proc~mapl_read_bundle none~detect_metadata ExtDataFileStream%detect_metadata none~detect_metadata->proc~get_time_info none~process_data_from_file MAPL_GriddedIO%process_data_from_file none~process_data_from_file->none~swap_undef_value proc~get_file_times get_file_times proc~get_file_times->proc~get_time_info proc~get_file_times~2->proc~get_time_info proc~main main proc~main->proc~get_file_levels proc~main->proc~get_file_times proc~main->proc~mapl_read_bundle proc~mapl_read_bundle->proc~get_time_info proc~mapl_read_bundle->none~process_data_from_file proc~run_component_driver run_component_driver proc~run_component_driver->proc~get_time_info proc~fillin_primary ExtDataOldTypesCreator%fillin_primary proc~fillin_primary->none~detect_metadata proc~main~2 main proc~main~2->proc~run_component_driver program~regrid_util Regrid_Util program~regrid_util->proc~main program~ut_regridding ut_ReGridding program~ut_regridding->proc~mapl_read_bundle

Source Code

   logical function var_has_attr(this,var_name,attr_name,rc)
      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)
      var_has_attr = var%is_attribute_present(attr_name)
      _RETURN(_SUCCESS)
   end function var_has_attr