MAPL_IOGetNonDimVars Function

public function MAPL_IOGetNonDimVars(cf, rc) result(nondim_vars)

Arguments

Type IntentOptional Attributes Name
type(FileMetadata), intent(inout) :: cf
integer, intent(out), optional :: rc

Return Value type(StringVector)


Calls

proc~~mapl_iogetnondimvars~~CallsGraph proc~mapl_iogetnondimvars MAPL_IOGetNonDimVars at at proc~mapl_iogetnondimvars->at none~begin~52 StringVariableMap%begin proc~mapl_iogetnondimvars->none~begin~52 none~get_dimensions~2 FileMetadata%get_dimensions proc~mapl_iogetnondimvars->none~get_dimensions~2 none~get_variables FileMetadata%get_variables proc~mapl_iogetnondimvars->none~get_variables none~key~117 StringVariableMapIterator%key proc~mapl_iogetnondimvars->none~key~117 none~next~48 StringVariableMapIterator%next proc~mapl_iogetnondimvars->none~next~48 proc~mapl_return MAPL_Return proc~mapl_iogetnondimvars->proc~mapl_return push_back push_back proc~mapl_iogetnondimvars->push_back none~get_variables->proc~mapl_return proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

  function MAPL_IOGetNonDimVars(cf,rc) result(nondim_vars)
  type(FileMetadata), intent(inout) :: cf
  integer, intent(out), optional :: rc

  type(StringVector) :: nondim_vars
  type(StringVariableMap), pointer :: vars
  type(StringVariableMapIterator) :: iter
  type(StringIntegerMap), pointer :: dims
  integer, pointer :: dimsize => null()
  character(len=:), pointer :: name

  dims => cf%get_dimensions()
  vars => cf%get_variables()
  iter = vars%begin()
  do while(iter/=vars%end())

     name =>  iter%key()
     dimsize => dims%at(trim(name))
     if (.not.associated(dimsize)) call nondim_vars%push_back(trim(name))
     if (associated(dimsize)) nullify(dimsize)

     call iter%next()
  end do

  _RETURN(ESMF_SUCCESS)

  end function MAPL_IOGetNonDimVars