📄 esmf_errormod.f
字号:
! $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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -