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