ESMF_InfoCreateEmpty Function

private function ESMF_InfoCreateEmpty(rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), optional :: rc

Return Value type(ESMF_Info)


Source Code

function ESMF_InfoCreateEmpty(rc)
! !ARGUMENTS:
  integer, intent(out), optional :: rc
! !RETURN VALUE:
  type(ESMF_Info) :: ESMF_InfoCreateEmpty
!
! !DESCRIPTION:
!     Create an \texttt{ESMF\_Info} object. This object must be destroyed using
!     \texttt{ESMF\_InfoDestroy} to free its memory allocation
!
!     The arguments are:
!     \begin{description}
!     \item [{[rc]}]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!EOP

  integer :: localrc

  localrc = ESMF_FAILURE
  if (present(rc)) rc = ESMF_FAILURE

  ESMF_InfoCreateEmpty%ptr = c_info_create(localrc)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return

  if (present(rc)) rc = ESMF_SUCCESS
end function ESMF_InfoCreateEmpty