ESMF_UtilStringInt2String Function

public function ESMF_UtilStringInt2String(i, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Return Value character(len=int2str_len(i))


Calls

proc~~esmf_utilstringint2string~~CallsGraph proc~esmf_utilstringint2string ESMF_UtilStringInt2String proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_utilstringint2string->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_utilstringint2string~~CalledByGraph proc~esmf_utilstringint2string ESMF_UtilStringInt2String proc~esmf_geomdeserialize ESMF_GeomDeserialize proc~esmf_geomdeserialize->proc~esmf_utilstringint2string proc~esmf_fielddeserialize ESMF_FieldDeserialize proc~esmf_fielddeserialize->proc~esmf_geomdeserialize proc~esmf_reconciledeserialize ESMF_ReconcileDeserialize proc~esmf_reconciledeserialize->proc~esmf_fielddeserialize proc~esmf_reconciledeserializeall ESMF_ReconcileDeserializeAll proc~esmf_reconciledeserializeall->proc~esmf_fielddeserialize proc~test7d4_generic test7d4_generic proc~test7d4_generic->proc~esmf_fielddeserialize proc~esmf_reconcilebruteforce ESMF_ReconcileBruteForce proc~esmf_reconcilebruteforce->proc~esmf_reconciledeserialize proc~esmf_reconcilesinglecompcase ESMF_ReconcileSingleCompCase proc~esmf_reconcilesinglecompcase->proc~esmf_reconciledeserializeall

Source Code

    function ESMF_UtilStringInt2String (i, keywordEnforcer, rc)
!
! !ARGUMENTS:
      integer, intent(in) :: i
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      integer, intent(out), optional  :: rc
! !RETURN VALUE:
      character(int2str_len (i)) :: ESMF_UtilStringInt2String

!
! !DESCRIPTION:
!   Converts given an integer to string representation.  The returned string is
!   sized such that it does not contain leading or trailing blanks.
!
!   This procedure may fail when used in an expression in a {\tt write} statement
!   with some older, pre-Fortran 2003, compiler environments that do not support
!   re-entrant I/O calls.
!
!     The arguments are:
!     \begin{description}
!     \item[i]
!       An integer.
!     \item[{[rc]}]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!
!EOP

    integer :: ioerr

    write (ESMF_UtilStringInt2String,'(i0)', iostat=ioerr) i
    if (ioerr /= 0) then
      if (ESMF_LogFoundError (ESMF_RC_VAL_OUTOFRANGE, msg=ESMF_METHOD // ': conversion error',  &
          ESMF_CONTEXT, rcToReturn=rc))  &
        return
    end if

    if (present(rc)) rc = ESMF_SUCCESS

  end function ESMF_UtilStringInt2String