ESMF_ClockPrint Subroutine

public subroutine ESMF_ClockPrint(clock, keywordEnforcer, options, preString, unit, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Clock), intent(in) :: clock
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
character(len=*), intent(in), optional :: options
character(len=*), intent(in), optional :: preString
character(len=*), intent(out), optional :: unit
integer, intent(out), optional :: rc

Calls

proc~~esmf_clockprint~~CallsGraph proc~esmf_clockprint ESMF_ClockPrint c_esmc_clockprint c_esmc_clockprint proc~esmf_clockprint->c_esmc_clockprint proc~esmf_clockget ESMF_ClockGet proc~esmf_clockprint->proc~esmf_clockget proc~esmf_clockgetinit ESMF_ClockGetInit proc~esmf_clockprint->proc~esmf_clockgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_clockprint->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_clockprint->proc~esmf_logfounderror proc~esmf_logseterror ESMF_LogSetError proc~esmf_clockprint->proc~esmf_logseterror proc~esmf_timeprint ESMF_TimePrint proc~esmf_clockprint->proc~esmf_timeprint proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_clockprint->proc~esmf_utiliounitflush proc~esmf_clockget->proc~esmf_clockgetinit proc~esmf_clockget->proc~esmf_imerr proc~esmf_clockget->proc~esmf_logfounderror c_esmc_clockget c_esmc_clockget proc~esmf_clockget->c_esmc_clockget proc~esmf_calendarsetinitcreated ESMF_CalendarSetInitCreated proc~esmf_clockget->proc~esmf_calendarsetinitcreated proc~esmf_timeinit ESMF_TimeInit proc~esmf_clockget->proc~esmf_timeinit proc~esmf_timeintervalinit ESMF_TimeIntervalInit proc~esmf_clockget->proc~esmf_timeintervalinit proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep 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 proc~esmf_logseterror->esmf_breakpoint proc~esmf_logseterror->proc~esmf_logrc2msg proc~esmf_logseterror->proc~esmf_logwrite proc~esmf_timeprint->proc~esmf_logfounderror proc~esmf_timeprint->proc~esmf_utiliounitflush c_esmc_timeprint c_esmc_timeprint proc~esmf_timeprint->c_esmc_timeprint proc~esmf_imerrs ESMF_IMErrS proc~esmf_timeprint->proc~esmf_imerrs proc~esmf_timeget ESMF_TimeGet proc~esmf_timeprint->proc~esmf_timeget proc~esmf_timegetinit ESMF_TimeGetInit proc~esmf_timeprint->proc~esmf_timegetinit proc~esmf_imerrs->proc~esmf_logfounderror proc~esmf_initcheckshallow ESMF_InitCheckShallow proc~esmf_imerrs->proc~esmf_initcheckshallow c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg proc~esmf_logwrite->proc~esmf_utiliounitflush 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_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_timeget->proc~esmf_logfounderror proc~esmf_timeget->proc~esmf_calendarsetinitcreated proc~esmf_timeget->proc~esmf_imerrs proc~esmf_timeget->proc~esmf_timegetinit proc~esmf_timeget->proc~esmf_timeinit proc~esmf_timeget->proc~esmf_timeintervalinit c_esmc_timeget c_esmc_timeget proc~esmf_timeget->c_esmc_timeget 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_clockprint~~CalledByGraph proc~esmf_clockprint ESMF_ClockPrint proc~advance Advance proc~advance->proc~esmf_clockprint proc~advance~2 Advance proc~advance~2->proc~esmf_clockprint proc~finalizereset FinalizeReset proc~finalizereset->proc~esmf_clockprint proc~finalize~10 Finalize proc~finalize~10->proc~esmf_clockprint proc~finalize~2 Finalize proc~finalize~2->proc~esmf_clockprint proc~json_cplcomplogctrlflow JSON_CplCompLogCtrlFlow proc~json_cplcomplogctrlflow->proc~esmf_clockprint proc~json_gridcomplogctrlflow JSON_GridCompLogCtrlFlow proc~json_gridcomplogctrlflow->proc~esmf_clockprint proc~json_logctrlflow JSON_LogCtrlFlow proc~json_logctrlflow->proc~esmf_clockprint proc~modeladvance ModelAdvance proc~modeladvance->proc~esmf_clockprint proc~mycplfinalinfortran myCplFinalInFortran proc~mycplfinalinfortran->proc~esmf_clockprint proc~mycplinitinfortran myCplInitInFortran proc~mycplinitinfortran->proc~esmf_clockprint proc~mycplruninfortran myCplRunInFortran proc~mycplruninfortran->proc~esmf_clockprint proc~myfinalinfortran myFinalInFortran proc~myfinalinfortran->proc~esmf_clockprint proc~myinitinfortran myInitInFortran proc~myinitinfortran->proc~esmf_clockprint proc~myruninfortran myRunInFortran proc~myruninfortran->proc~esmf_clockprint proc~nuopc_comphandleverbosityextro NUOPC_CompHandleVerbosityExtro proc~nuopc_comphandleverbosityextro->proc~esmf_clockprint proc~nuopc_comphandleverbosityintro NUOPC_CompHandleVerbosityIntro proc~nuopc_comphandleverbosityintro->proc~esmf_clockprint proc~nuopc_runsequencehandleevent NUOPC_RunSequenceHandleEvent proc~nuopc_runsequencehandleevent->proc~esmf_clockprint proc~routine_run routine_Run proc~routine_run->proc~esmf_clockprint proc~routine_run~2 routine_Run proc~routine_run~2->proc~esmf_clockprint program~esmf_alarmex ESMF_AlarmEx program~esmf_alarmex->proc~esmf_clockprint program~esmf_clockex ESMF_ClockEx program~esmf_clockex->proc~esmf_clockprint program~esmf_concurrentensemblestest ESMF_ConcurrentEnsembleSTest program~esmf_concurrentensemblestest->proc~esmf_clockprint program~esmf_nuopc_utest ESMF_NUOPC_UTest program~esmf_nuopc_utest->proc~esmf_clockprint program~esmf_sequentialensemblestest ESMF_SequentialEnsembleSTest program~esmf_sequentialensemblestest->proc~esmf_clockprint

Source Code

      subroutine ESMF_ClockPrint(clock, keywordEnforcer, options, preString, unit, rc)

! !ARGUMENTS:
      type(ESMF_Clock),  intent(in)            :: clock
      type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      character (len=*), intent(in),  optional :: options
      character(*),      intent(in),  optional :: preString
      character(*),      intent(out), optional :: unit
      integer,           intent(out), optional :: rc

!
! !DESCRIPTION:
!     Prints out an {\tt ESMF\_Clock}'s properties to {\tt stdout}, in
!     support of testing and debugging.  The options control the type of
!     information and level of detail. \\
!
!     The arguments are:
!     \begin{description}
!     \item[clock]
!          {\tt ESMF\_Clock} to be printed out.
!     \item[{[options]}]
!          Print options. If none specified, prints all {\tt clock} property
!          values.\\
!          "advanceCount" - print the number of times the clock has been
!                           advanced. \\
!          "alarmCount"   - print the number of alarms in the clock's list. \\
!          "alarmList"    - print the clock's alarm list. \\
!          "currTime"     - print the current clock time. \\
!          "direction"    - print the clock's timestep direction. \\
!          "name"         - print the clock's name. \\
!          "prevTime"     - print the previous clock time. \\
!          "refTime"      - print the clock's reference time. \\
!          "startTime"    - print the clock's start time. \\
!          "stopTime"     - print the clock's stop time. \\
!          "timeStep"     - print the clock's time step. \\
!     \item[{[preString]}]
!          Optionally prepended string. Default to empty string.
!     \item[{[unit]}]
!          Internal unit, i.e. a string. Default to printing to stdout.
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOP
! !REQUIREMENTS:
!     TMGn.n.n
      integer :: localrc                        ! local return code
      character(len=80)       :: optionsOpt
      type(ESMF_Time)         :: time

      ! Assume failure until success
      if (present(rc)) rc = ESMF_RC_NOT_IMPL
      localrc = ESMF_RC_NOT_IMPL

      ! check input
      ESMF_INIT_CHECK_DEEP(ESMF_ClockGetInit,clock,rc)

      if (present(unit).or.present(preString)) then
        ! simple, single line print format

        if (present(options)) then
          optionsOpt=trim(options)
        else
          optionsOpt="currTime"
        endif

        if (trim(optionsOpt)=="currTime") then
          call ESMF_ClockGet(clock, currTime=time, rc=localrc)
          if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
          call ESMF_TimePrint(time, preString=preString, unit=unit, rc=localrc)
          if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
        else if (trim(optionsOpt)=="startTime") then
          call ESMF_ClockGet(clock, startTime=time, rc=localrc)
          if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
          call ESMF_TimePrint(time, preString=preString, unit=unit, rc=localrc)
          if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
        else if (trim(optionsOpt)=="stopTime") then
          call ESMF_ClockGet(clock, stopTime=time, rc=localrc)
          if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
          call ESMF_TimePrint(time, preString=preString, unit=unit, rc=localrc)
          if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
            ESMF_CONTEXT, rcToReturn=rc)) return
        else
          call ESMF_LogSetError(ESMF_RC_ARG_BAD, &
            msg="Unknown selection requested.", &
            ESMF_CONTEXT, rcToReturn=rc)
          return
        endif

      else
        ! print to STDOUT

        ! invoke C to C++ entry point
        call ESMF_UtilIOUnitFlush (ESMF_UtilIOStdout, rc=localrc)
        if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return

        call c_ESMC_ClockPrint(clock, options, localrc)
        if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return
      endif

      ! Return success
      if (present(rc)) rc = ESMF_SUCCESS
      end subroutine ESMF_ClockPrint