ESMF_AttributeGetInfoByNumSciComp Subroutine

private subroutine ESMF_AttributeGetInfoByNumSciComp(target, attributeIndex, name, convention, purpose, attnestflag, typekind, itemCount, isPresent, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_SciComp), intent(in) :: target
integer, intent(in) :: attributeIndex
character(len=*), intent(out) :: name
character(len=*), intent(in), optional :: convention
character(len=*), intent(in), optional :: purpose
type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
integer, intent(out), optional :: itemCount
logical, intent(out), optional :: isPresent
integer, intent(out), optional :: rc

Calls

proc~~esmf_attributegetinfobynumscicomp~~CallsGraph proc~esmf_attributegetinfobynumscicomp ESMF_AttributeGetInfoByNumSciComp interface~esmf_infoget ESMF_InfoGet proc~esmf_attributegetinfobynumscicomp->interface~esmf_infoget none~getinfo ESMF_InfoDescribe%GetInfo proc~esmf_attributegetinfobynumscicomp->none~getinfo proc~esmf_imerr ESMF_IMErr proc~esmf_attributegetinfobynumscicomp->proc~esmf_imerr proc~esmf_infoformatkey ESMF_InfoFormatKey proc~esmf_attributegetinfobynumscicomp->proc~esmf_infoformatkey proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_attributegetinfobynumscicomp->proc~esmf_logfounderror proc~esmf_scicompgetinit ESMF_SciCompGetInit proc~esmf_attributegetinfobynumscicomp->proc~esmf_scicompgetinit

Called by

proc~~esmf_attributegetinfobynumscicomp~~CalledByGraph proc~esmf_attributegetinfobynumscicomp ESMF_AttributeGetInfoByNumSciComp interface~esmf_attributeget ESMF_AttributeGet interface~esmf_attributeget->proc~esmf_attributegetinfobynumscicomp proc~checkcomponentattribute checkComponentAttribute proc~checkcomponentattribute->interface~esmf_attributeget proc~checkfieldattribute checkFieldAttribute proc~checkfieldattribute->interface~esmf_attributeget proc~checkstateattribute checkStateAttribute proc~checkstateattribute->interface~esmf_attributeget proc~nuopc_checkcplcomponentattribute NUOPC_CheckCplComponentAttribute proc~nuopc_checkcplcomponentattribute->interface~esmf_attributeget proc~nuopc_checkfieldattribute NUOPC_CheckFieldAttribute proc~nuopc_checkfieldattribute->interface~esmf_attributeget proc~nuopc_checkgridcomponentattribute NUOPC_CheckGridComponentAttribute proc~nuopc_checkgridcomponentattribute->interface~esmf_attributeget proc~nuopc_checkstateattribute NUOPC_CheckStateAttribute proc~nuopc_checkstateattribute->interface~esmf_attributeget proc~nuopc_cplcompattributeege NUOPC_CplCompAttributeEge proc~nuopc_cplcompattributeege->interface~esmf_attributeget proc~nuopc_cplcompsearchphasemapbyindex NUOPC_CplCompSearchPhaseMapByIndex proc~nuopc_cplcompsearchphasemapbyindex->interface~esmf_attributeget proc~nuopc_gridcompattributeege NUOPC_GridCompAttributeEge proc~nuopc_gridcompattributeege->interface~esmf_attributeget proc~nuopc_gridcompsearchphasemapbyindex NUOPC_GridCompSearchPhaseMapByIndex proc~nuopc_gridcompsearchphasemapbyindex->interface~esmf_attributeget proc~user_init~15 user_init proc~user_init~15->interface~esmf_attributeget proc~user_init~39 user_init proc~user_init~39->interface~esmf_attributeget proc~user_init~79 user_init proc~user_init~79->interface~esmf_attributeget proc~user_init~82 user_init proc~user_init~82->interface~esmf_attributeget program~attributeupdatereconcile AttributeUpdateReconcile program~attributeupdatereconcile->interface~esmf_attributeget program~esmf_arraycreategetutest ESMF_ArrayCreateGetUTest program~esmf_arraycreategetutest->interface~esmf_attributeget program~esmf_attributeprofileutest ESMF_AttributeProfileUTest program~esmf_attributeprofileutest->interface~esmf_attributeget program~esmf_attributeutilutest ESMF_AttributeUtilUTest program~esmf_attributeutilutest->interface~esmf_attributeget program~esmf_infosyncutest ESMF_InfoSyncUTest program~esmf_infosyncutest->interface~esmf_attributeget program~esmf_statereconcileutest ESMF_StateReconcileUTest program~esmf_statereconcileutest->interface~esmf_attributeget interface~nuopc_checkcomponentattribute NUOPC_CheckComponentAttribute interface~nuopc_checkcomponentattribute->proc~nuopc_checkcplcomponentattribute interface~nuopc_checkcomponentattribute->proc~nuopc_checkgridcomponentattribute interface~nuopc_compattributeegest NUOPC_CompAttributeEgest interface~nuopc_compattributeegest->proc~nuopc_cplcompattributeege interface~nuopc_compattributeegest->proc~nuopc_gridcompattributeege interface~nuopc_compsearchphasemapbyindex NUOPC_CompSearchPhaseMapByIndex interface~nuopc_compsearchphasemapbyindex->proc~nuopc_cplcompsearchphasemapbyindex interface~nuopc_compsearchphasemapbyindex->proc~nuopc_gridcompsearchphasemapbyindex proc~checkcomponentmetadata checkComponentMetadata proc~checkcomponentmetadata->proc~checkcomponentattribute proc~checkfieldmetaafteradvertise checkFieldMetaAfterAdvertise proc~checkfieldmetaafteradvertise->proc~nuopc_checkfieldattribute proc~checkfieldmetaafterrealize checkFieldMetaAfterRealize proc~checkfieldmetaafterrealize->proc~nuopc_checkfieldattribute proc~checkfieldmetadata checkFieldMetadata proc~checkfieldmetadata->proc~checkfieldattribute proc~checkstate checkState proc~checkstate->proc~checkstateattribute proc~nuopc_checkstate NUOPC_CheckState proc~nuopc_checkstate->proc~nuopc_checkstateattribute

Source Code

subroutine ESMF_AttributeGetInfoByNumSciComp(target, attributeIndex, name, convention, purpose, attnestflag, typekind, itemCount, isPresent, rc)
  type(ESMF_SciComp), intent(in) :: target
  integer, intent(in) :: attributeIndex
  character(len=*), intent(out) :: name
  character(len=*), intent(in), optional :: convention
  character(len=*), intent(in), optional :: purpose
  type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag
  type(ESMF_TypeKind_Flag), intent(out), optional :: typekind
  integer, intent(out), optional :: itemCount
  logical, intent(out), optional :: isPresent
  integer, intent(out), optional :: rc

  integer :: localrc
  character(:), allocatable :: key
  type(ESMF_Info) :: info
  type(ESMF_InfoDescribe) :: eidesc
  type(ESMF_AttNest_Flag) :: local_attnestflag
  logical :: is_structured, is_null

  localrc = ESMF_FAILURE
  if (present(rc)) rc = ESMF_RC_NOT_IMPL
  ! Check object initialization
  ESMF_INIT_CHECK_DEEP(ESMF_SciCompGetInit, target, rc)

  if (present(attnestflag)) then
    local_attnestflag = attnestflag
  else
    local_attnestflag = ESMF_ATTR_DEFAULT_ATTNEST
  end if

  call ESMF_InfoFormatKey(key, "", localrc, convention=convention, purpose=purpose)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return

  info = eidesc%GetInfo(target, rc=localrc)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return

  call ESMF_InfoGet(info, key=key, size=itemCount, typekind=typekind, &
    idx=attributeIndex, ikey=name, isPresent=isPresent, isNull=is_null, attnestflag=local_attnestflag, &
    isStructured=is_structured, attrCompliance=.true., rc=localrc)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return
  if (.not. is_structured) then
    if (present(itemCount)) then
      if (is_null) then
        itemCount = 0
      else
        itemCount = 1
      endif
    end if
  end if

  if (present(rc)) rc = ESMF_SUCCESS
end subroutine ESMF_AttributeGetInfoByNumSciComp