var_get_missing_value Function

public function var_get_missing_value(this, var_name, rc) result(missing_value)

Type Bound

FileMetadataUtils

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)


Calls

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

Called by

proc~~var_get_missing_value~~CalledByGraph proc~var_get_missing_value FileMetadataUtils%var_get_missing_value none~swap_undef_value MAPL_GriddedIO%swap_undef_value none~swap_undef_value->proc~var_get_missing_value program~time_ave time_ave program~time_ave->proc~var_get_missing_value proc~mapl_read_bundle MAPL_read_bundle program~time_ave->proc~mapl_read_bundle none~process_data_from_file MAPL_GriddedIO%process_data_from_file none~process_data_from_file->none~swap_undef_value proc~mapl_read_bundle->none~process_data_from_file proc~main main proc~main->proc~mapl_read_bundle program~ut_regridding ut_ReGridding program~ut_regridding->proc~mapl_read_bundle

Source Code

   function var_get_missing_value(this,var_name,rc) result(missing_value)
      real(REAL32) :: missing_value
      class(FileMetadataUtils), intent(inout) :: this
      character(len=*), intent(in) :: var_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)
      ! check _FillValue, we could do more, not sure what to do here like also check for missing_value ...
      if (this%var_has_attr(var_name,"_FillValue")) then
         missing_value = this%get_var_attr_real32(var_name,"_FillValue",_RC)
      end if

      _RETURN(_SUCCESS)
   end function var_get_missing_value