Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Field), | intent(in) | :: | object | |||
type(ESMF_KeywordEnforcer), | optional | :: | keywordEnforcer | |||
character(len=*), | intent(in), | optional | :: | name | ||
integer, | intent(out), | optional | :: | rc |
function ESMF_NamedAliasField(object, keywordEnforcer, name, rc) ! ! !RETURN VALUE: type(ESMF_Field) :: ESMF_NamedAliasField ! ! !ARGUMENTS: type(ESMF_Field),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_NamedAliasField = object ! next mark as namedAlias ESMF_NamedAliasField%isNamedAlias = .true. ! finally set name if (present(name)) then ESMF_NamedAliasField%name = trim(name) else call ESMF_FieldGet(object, name=nameDefault, rc=localrc) if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & ESMF_CONTEXT, rcToReturn=rc)) return ESMF_NamedAliasField%name = trim(nameDefault) endif end function ESMF_NamedAliasField