esmf_errormod.f

来自「CCSM Research Tools: Community Atmospher」· F 代码 · 共 95 行

F
95
字号
! $Id: ESMF_ErrorMod.F,v 1.1.6.1 2002/04/24 03:25:33 erik Exp $	module ESMF_ErrorMod!===============================================================================!BOP! !MODULE: ESMF_ErrorMod!! !USES:!! !PUBLIC TYPES:	implicit none!! !PUBLIC MEMBER FUNCTIONS:!     ESMF_ErrHandlerSetType    !     ESMF_GetErrString!     ESMF_ErrorTest! !DESCRIPTION:! Simple error handling routines for setting the type of handler, and! retrieving error messages.!!EOP!===============================================================================	contains!===============================================================================!BOP!! !IROUTINE:  ESMF_ErrHandlerSetType!! !INTERFACE:      subroutine ESMF_ErrHandlerSetType(type)    ! !PARAMETERS:      integer, intent(in) :: type        ! Type of error handling desired ! !DESCRIPTION:!     Sets the type of error handling to either {\tt ESMF\_ERR\_RETURN} or!     {\tt ESMF\_ERR\_EXIT}.  The type of error handling is independent of !     whether the optional return code is included in a the argument list !     of a procedure call.!!EOP!-------------------------------------------------------------------------------      call ESMC_ErrHandlerSetType(type)       end subroutine ESMF_ErrHandlerSetType!===============================================================================!BOP!! !IROUTINE:  ESMF_ErrPrint!! !INTERFACE:      subroutine ESMF_ErrPrint(rc)    ! !PARAMETERS:      integer, intent(in) :: rc        ! Return code to be translated ! !DESCRIPTION:!     Prints an error message corresponding to an integer return code.!!EOP!-------------------------------------------------------------------------------      call ESMC_ErrPrint(rc)       end subroutine ESMF_ErrPrint!===============================================================================!BOP!! !IROUTINE:  ESMF_ErrorTest!! !INTERFACE:      subroutine ESMF_ErrorTest(test, str)      ! !PARAMETERS:      logical, intent(in) :: test          ! evaluated expression      character(60), intent(in) :: str     ! string description of test! !DESCRIPTION:!     Prints a {\tt PASS TEST} message to stdout if {\tt test} is {\tt .TRUE.}, !     and a {\tt FAIL TEST} message if {\tt test} is false.  !!EOP!-------------------------------------------------------------------------------      if(test) then        print *, "PASS TEST: ", str      else        print *, "FAIL TEST: ", str      end if      end subroutine ESMF_ErrorTest!===============================================================================	end module ESMF_ErrorMod

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?