@@ -89,6 +89,7 @@ module ESMF_ArrayBundleMod
89
89
public ESMF_ArrayBundleHaloRelease
90
90
public ESMF_ArrayBundleHaloStore
91
91
public ESMF_ArrayBundleIsCreated
92
+ public ESMF_ArrayBundleLog
92
93
public ESMF_ArrayBundlePrint
93
94
public ESMF_ArrayBundleRead
94
95
public ESMF_ArrayBundleRedist
@@ -1587,6 +1588,75 @@ function ESMF_ArrayBundleIsCreated(arraybundle, keywordEnforcer, rc)
1587
1588
!- -----------------------------------------------------------------------------
1588
1589
1589
1590
1591
+ ! -------------------------- ESMF-public method -----------------------------
1592
+ #undef ESMF_METHOD
1593
+ #define ESMF_METHOD "ESMF_ArrayBundleLog()"
1594
+ ! BOP
1595
+ ! !IROUTINE: ESMF_ArrayBundleLog - Log ArrayBundle information
1596
+
1597
+ ! !INTERFACE:
1598
+ subroutine ESMF_ArrayBundleLog (arraybundle , keywordEnforcer , prefix , logMsgFlag , deepFlag , rc )
1599
+ !
1600
+ ! !ARGUMENTS:
1601
+ type (ESMF_ArrayBundle), intent (in ) :: arraybundle
1602
+ type (ESMF_KeywordEnforcer), optional :: keywordEnforcer ! must use keywords below
1603
+ character (len=* ), intent (in ), optional :: prefix
1604
+ type (ESMF_LogMsg_Flag), intent (in ), optional :: logMsgFlag
1605
+ logical , intent (in ), optional :: deepFlag
1606
+ integer , intent (out ), optional :: rc
1607
+ !
1608
+ ! !DESCRIPTION:
1609
+ ! Write information about {\tt arraybundle} to the ESMF default Log.
1610
+ !
1611
+ ! The arguments are:
1612
+ ! \begin{description}
1613
+ ! \item[arraybundle]
1614
+ ! {\tt ESMF\_ArrayBundle} object logged.
1615
+ ! \item [{[prefix]}]
1616
+ ! String to prefix the log message. Default is no prefix.
1617
+ ! \item [{[logMsgFlag]}]
1618
+ ! Type of log message generated. See section \ref{const:logmsgflag} for
1619
+ ! a list of valid message types. Default is {\tt ESMF\_LOGMSG\_INFO}.
1620
+ ! \item[{[deepFlag]}]
1621
+ ! When set to {\tt .false.} (default), only log top level information for
1622
+ ! each item contained in the ArrayBundle.
1623
+ ! When set to {\tt .true.}, additionally log information for each item.
1624
+ ! \item[{[rc]}]
1625
+ ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
1626
+ ! \end{description}
1627
+ !
1628
+ ! EOP
1629
+ !- -----------------------------------------------------------------------------
1630
+ integer :: localrc ! local return code
1631
+ type (ESMF_LogMsg_Flag) :: logMsg
1632
+ type (ESMF_Logical) :: deep
1633
+
1634
+ ! initialize return code; assume routine not implemented
1635
+ localrc = ESMF_RC_NOT_IMPL
1636
+ if (present (rc)) rc = ESMF_RC_NOT_IMPL
1637
+
1638
+ ! Check init status of arguments
1639
+ ESMF_INIT_CHECK_DEEP_SHORT(ESMF_ArrayBundleGetInit, arraybundle, rc)
1640
+
1641
+ ! deal with optional logMsgFlag
1642
+ logMsg = ESMF_LOGMSG_INFO ! default
1643
+ if (present (logMsgFlag)) logMsg = logMsgFlag
1644
+
1645
+ ! deal with optional deepFlag
1646
+ deep = ESMF_FALSE ! default
1647
+ if (present (deepFlag)) deep = deepFlag
1648
+
1649
+ ! Call into the C++ interface.
1650
+ call c_esmc_arraybundlelog(arraybundle, prefix, logMsg, deep, localrc)
1651
+ if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
1652
+ ESMF_CONTEXT, rcToReturn= rc)) return
1653
+
1654
+ ! return successfully
1655
+ if (present (rc)) rc = ESMF_SUCCESS
1656
+
1657
+ end subroutine ESMF_ArrayBundleLog
1658
+ !- -----------------------------------------------------------------------------
1659
+
1590
1660
1591
1661
! -------------------------- ESMF-public method -------------------------------
1592
1662
#undef ESMF_METHOD
0 commit comments