ESMF_InfoUpdate Subroutine

public subroutine ESMF_InfoUpdate(lhs, rhs, keywordEnforcer, recursive, overwrite, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Info), intent(inout) :: lhs
type(ESMF_Info), intent(in) :: rhs
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
logical, intent(in), optional :: recursive
logical, intent(in), optional :: overwrite
integer, intent(out), optional :: rc

Calls

proc~~esmf_infoupdate~~CallsGraph proc~esmf_infoupdate ESMF_InfoUpdate interface~c_info_update c_info_update proc~esmf_infoupdate->interface~c_info_update proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_infoupdate->proc~esmf_logfounderror esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_infoupdate~~CalledByGraph proc~esmf_infoupdate ESMF_InfoUpdate proc~esmf_gridcreatecopyfromnewdg ESMF_GridCreateCopyFromNewDG proc~esmf_gridcreatecopyfromnewdg->proc~esmf_infoupdate proc~esmf_reconciledeserializeall ESMF_ReconcileDeserializeAll proc~esmf_reconciledeserializeall->proc~esmf_infoupdate proc~esmf_reconcileexchgattributes ESMF_ReconcileExchgAttributes proc~esmf_reconcileexchgattributes->proc~esmf_infoupdate program~esmf_infoutest ESMF_InfoUTest program~esmf_infoutest->proc~esmf_infoupdate interface~esmf_gridcreate ESMF_GridCreate interface~esmf_gridcreate->proc~esmf_gridcreatecopyfromnewdg proc~esmf_gridcreatefrmncfile ESMF_GridCreateFrmNCFile proc~esmf_gridcreatefrmncfile->proc~esmf_gridcreatecopyfromnewdg proc~esmf_gridcreatefrmncfiledg ESMF_GridCreateFrmNCFileDG proc~esmf_gridcreatefrmncfiledg->proc~esmf_gridcreatecopyfromnewdg proc~esmf_reconcilebruteforce ESMF_ReconcileBruteForce proc~esmf_reconcilebruteforce->proc~esmf_reconcileexchgattributes proc~esmf_reconcilesinglecompcase ESMF_ReconcileSingleCompCase proc~esmf_reconcilesinglecompcase->proc~esmf_reconciledeserializeall program~esmf_statereconcileutest ESMF_StateReconcileUTest program~esmf_statereconcileutest->proc~esmf_reconcileexchgattributes

Source Code

subroutine ESMF_InfoUpdate(lhs, rhs, keywordEnforcer, recursive, overwrite, rc)
! !ARGUMENTS:
  type(ESMF_Info), intent(inout) :: lhs
  type(ESMF_Info), intent(in) :: rhs
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
  logical, intent(in), optional :: recursive
  logical, intent(in), optional :: overwrite
  integer, intent(out), optional :: rc
!
! !DESCRIPTION:
!     Update the contents of \textit{lhs} using the contents of \textit{rhs}. The
!     operation inserts or overwrites any key in \textit{lhs} if it exists in \textit{rhs}.
!     Otherwise, the contents of \textit{lhs} is left unaltered. See the JSON
!     documentation for implementation details \cite{json_for_modern_cpp_update}.
!     If \textit{recursive} is \textit{.true.} (default is \texttt{.false.}),
!     nested objects will be updated by their component key/values. Otherwise,
!     the first instance or top-level key is replaced without the child contents
!     being updated element-by-element.
!
!     The arguments are:
!     \begin{description}
!     \item [lhs]
!       The \texttt{ESMF\_Info} object to update.
!     \item [rhs]
!       The \texttt{ESMF\_Info} object whose contents are used to update \textit{lhs}.
!     \item [{[recursive]}]
!       Default is \texttt{.false.}. If \texttt{.true.}, descend into nested objects
!       and recursively update the contents.
!     \item [{[overwrite]}]
!       Default is \texttt{.false.}. If \texttt{.true.}, key-values that exist
!       in \textit{lhs} will be overwritten by key-values in \textit{rhs}. Flag
!       is only applicable when \textit{recursive} is \texttt{.true.}.
!     \item [{[rc]}]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!EOP

  integer :: localrc
  integer :: recursive_int, overwrite_int

  localrc = ESMF_FAILURE
  if (present(rc)) rc = ESMF_FAILURE
  recursive_int = 0  ! .false.
  if (present(recursive)) then
    if (recursive) then
      recursive_int = 1  ! .true.
    end if
  end if
  overwrite_int = 0  ! .false.
  if (present(overwrite)) then
    if (overwrite) then
      overwrite_int = 1  ! .true.
    end if
  end if

  call c_info_update(lhs%ptr, rhs%ptr, recursive_int, overwrite_int, localrc)
  if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return

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