ESMF_BasePrint Subroutine

public subroutine ESMF_BasePrint(base, options, filename, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Base), intent(in) :: base
character(len=*), intent(in), optional :: options
character(len=*), intent(in), optional :: filename
integer, intent(out), optional :: rc

Calls

proc~~esmf_baseprint~~CallsGraph proc~esmf_baseprint ESMF_BasePrint c_esmc_baseprint c_esmc_baseprint proc~esmf_baseprint->c_esmc_baseprint proc~esmf_basegetinit ESMF_BaseGetInit proc~esmf_baseprint->proc~esmf_basegetinit proc~esmf_imerr ESMF_IMErr proc~esmf_baseprint->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_baseprint->proc~esmf_logfounderror proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_baseprint->proc~esmf_utiliounitflush 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 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_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_baseprint~~CalledByGraph proc~esmf_baseprint ESMF_BasePrint proc~esmf_fieldprint ESMF_FieldPrint proc~esmf_fieldprint->proc~esmf_baseprint proc~f_esmf_fieldprint f_esmf_fieldprint proc~f_esmf_fieldprint->proc~esmf_fieldprint proc~myruninfortran~2 myRunInFortran proc~myruninfortran~2->proc~esmf_fieldprint proc~test_regridxg test_regridxg proc~test_regridxg->proc~esmf_fieldprint proc~user_run~22 user_run proc~user_run~22->proc~esmf_fieldprint proc~user_run~51 user_run proc~user_run~51->proc~esmf_fieldprint proc~user_run~68 user_run proc~user_run~68->proc~esmf_fieldprint program~esmf_fieldhaloutest ESMF_FieldHaloUTest program~esmf_fieldhaloutest->proc~esmf_fieldprint program~esmf_fieldioutest ESMF_FieldIOUTest program~esmf_fieldioutest->proc~esmf_fieldprint

Source Code

  subroutine ESMF_BasePrint(base, options, filename, rc)
!
! !ARGUMENTS:
    type(ESMF_Base),  intent(in)              :: base
    character(len=*), intent(in),   optional  :: options
    character(len=*), intent(in),   optional  :: filename
    integer,          intent(out),  optional  :: rc
!
! !DESCRIPTION:
!     Interface to call through to C++ and print base object values. \\
!
!     The arguments are:
!     \begin{description}
!     \item[base]
!       Any ESMF type.
!     \item[options]
!       Print options.
!     \item[{[filename]}]
!       Used to determine whether to write to file or stdout.
!     \item[{[rc]}]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!
!EOPI
    integer                     :: localrc
    integer                     :: ignore_iostat
    character(len=ESMF_MAXSTR)  :: opts
    type(ESMF_Logical)          :: tofile

    ! Initialize return code; assume routine not implemented
    if (present(rc)) rc = ESMF_RC_NOT_IMPL
    localrc = ESMF_RC_NOT_IMPL

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP(ESMF_BaseGetInit, base, rc)

    if (present(options)) then
        opts = options
    else
        opts = ''
    endif

    tofile = present (filename)

    call ESMF_UtilIOUnitFlush (unit=ESMF_UtilIOstdout, rc=ignore_iostat)
    ! Ignore iostat, because sometimes stdout is not open at this point
    ! and some compilers FLUSH statements will complain.

    call c_ESMC_BasePrint(base, 0, opts, tofile, filename, ESMF_TRUE, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Return successfully
    if (present(rc)) rc = ESMF_SUCCESS
  end subroutine ESMF_BasePrint