Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_State), | intent(in) | :: | object | |||
type(ESMF_KeywordEnforcer), | optional | :: | keywordEnforcer | |||
character(len=*), | intent(in), | optional | :: | name | ||
integer, | intent(out), | optional | :: | rc |
function ESMF_NamedAliasState(object, keywordEnforcer, name, rc) ! ! !RETURN VALUE: type(ESMF_State) :: ESMF_NamedAliasState ! ! !ARGUMENTS: type(ESMF_State),intent(in) :: object type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below character(len = *), intent(in), optional :: name integer, intent(out), optional :: rc !EOPI !------------------------------------------------------------------------------ integer :: localrc character(ESMF_MAXSTR) :: nameDefault if (present(rc)) rc = ESMF_SUCCESS ! first create regular alias ESMF_NamedAliasState = object ! next mark as namedAlias ESMF_NamedAliasState%isNamedAlias = .true. ! finally set name if (present(name)) then ESMF_NamedAliasState%name = trim(name) else call ESMF_StateGet(object, name=nameDefault, rc=localrc) if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & ESMF_CONTEXT, rcToReturn=rc)) return ESMF_NamedAliasState%name = trim(nameDefault) endif end function ESMF_NamedAliasState