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 MAPL_FileMetadataUtilsMod::FileMetadataUtils%var_has_attr interface~mapl_assert MAPL_ErrorHandlingMod::MAPL_Assert proc~var_has_attr->interface~mapl_assert none~get_variable pFIO_FileMetadataMod::FileMetadata%get_variable proc~var_has_attr->none~get_variable none~is_attribute_present pFIO_VariableMod::Variable%is_attribute_present proc~var_has_attr->none~is_attribute_present proc~get_file_name MAPL_FileMetadataUtilsMod::FileMetadataUtils%get_file_name proc~var_has_attr->proc~get_file_name proc~mapl_return MAPL_ErrorHandlingMod::MAPL_Return proc~var_has_attr->proc~mapl_return proc~mapl_verify MAPL_ErrorHandlingMod::MAPL_Verify proc~var_has_attr->proc~mapl_verify none~get_variable->proc~mapl_return none~at~3 pFIO_StringVariableMapMod::StringVariableMap%at none~get_variable->none~at~3 none~is_attribute_present->proc~mapl_return none~at~4 pFIO_StringAttributeMapMod::StringAttributeMap%at none~is_attribute_present->none~at~4 proc~get_file_name->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception none~find~2 pFIO_StringVariableMapMod::StringVariableMap%find none~at~3->none~find~2 none~find~3 pFIO_StringAttributeMapMod::StringAttributeMap%find none~at~4->none~find~3

Called by

proc~~var_has_attr~~CalledByGraph proc~var_has_attr MAPL_FileMetadataUtilsMod::FileMetadataUtils%var_has_attr proc~get_coordinate_info MAPL_FileMetadataUtilsMod::FileMetadataUtils%get_coordinate_info proc~get_coordinate_info->proc~var_has_attr proc~var_get_missing_value MAPL_FileMetadataUtilsMod::FileMetadataUtils%var_get_missing_value proc~var_get_missing_value->proc~var_has_attr none~swap_undef_value MAPL_GriddedIOMod::MAPL_GriddedIO%swap_undef_value none~swap_undef_value->proc~var_get_missing_value proc~get_file_levels Regrid_Util::get_file_levels proc~get_file_levels->proc~get_coordinate_info proc~get_file_levels~2 time_ave::get_file_levels proc~get_file_levels~2->proc~get_coordinate_info proc~get_time_info MAPL_FileMetadataUtilsMod::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 time_ave::get_file_times program~time_ave->proc~get_file_times~2 proc~mapl_read_bundle MAPL_ESMFFieldBundleRead::MAPL_read_bundle program~time_ave->proc~mapl_read_bundle none~detect_metadata MAPL_ExtDataFileStream::ExtDataFileStream%detect_metadata none~detect_metadata->proc~get_time_info none~process_data_from_file MAPL_GriddedIOMod::MAPL_GriddedIO%process_data_from_file none~process_data_from_file->none~swap_undef_value proc~get_file_times Regrid_Util::get_file_times proc~get_file_times->proc~get_time_info proc~get_file_times~2->proc~get_time_info proc~main~2 Regrid_Util::main proc~main~2->proc~get_file_levels proc~main~2->proc~get_file_times proc~main~2->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 comp_testing_driver::run_component_driver proc~run_component_driver->proc~get_time_info proc~fillin_primary MAPL_ExtDataOldTypesCreator::ExtDataOldTypesCreator%fillin_primary proc~fillin_primary->none~detect_metadata proc~main comp_testing_driver::main proc~main->proc~run_component_driver program~regrid_util Regrid_Util program~regrid_util->proc~main~2 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