Oasis3 4.0.2
|
00001 MODULE errioipsl_psmile 00002 !--------------------------------------------------------------------- 00003 CONTAINS 00004 != 00005 SUBROUTINE histerr (plev, pcname, pstr1, pstr2, pstr3) 00006 !--------------------------------------------------------------------- 00007 !- INPUT 00008 !- plev : Category of message to be reported to the user 00009 !- 1 = Note to the user 00010 !- 2 = Warning to the user 00011 !- 3 = Fatal error 00012 !- pcname : Name of subroutine which has called histerr 00013 !- pstr1 00014 !- pstr2 : String containing the explanations to the user 00015 !- pstr3 00016 !--------------------------------------------------------------------- 00017 USE mod_comprism_proto 00018 IMPLICIT NONE 00019 !- 00020 INTEGER (kind=ip_intwp_p) :: plev 00021 CHARACTER(LEN=*) :: pcname,pstr1,pstr2,pstr3 00022 !- 00023 CHARACTER(LEN=30),DIMENSION(3) :: pemsg = 00024 (/ "NOTE TO THE USER FROM ROUTINE ", & 00025 "WARNING FROM ROUTINE ", & 00026 "FATAL ERROR FROM ROUTINE " /) 00027 !--------------------------------------------------------------------- 00028 ! 00029 #ifdef __VERBOSE 00030 WRITE(nulprt,*)'Entering routine histerr' 00031 call flush(nulprt) 00032 #endif 00033 ! 00034 IF ( (plev >= 1).AND.(plev <= 3) ) THEN 00035 WRITE(nulprt,'(" ")') 00036 WRITE(nulprt,'(A," ",A)') TRIM(pemsg(plev)),TRIM(pcname) 00037 WRITE(nulprt,'(" --> ",a)') pstr1 00038 WRITE(nulprt,'(" --> ",a)') pstr2 00039 WRITE(nulprt,'(" --> ",a)') pstr3 00040 ENDIF 00041 IF (plev == 3) THEN 00042 STOP 'Fatal error from IOIPSL. See stdout for more details' 00043 ENDIF 00044 ! 00045 #ifdef __VERBOSE 00046 WRITE(nulprt,*)'Leaving routine histerr' 00047 call flush(nulprt) 00048 #endif 00049 ! 00050 !------------------------ 00051 END SUBROUTINE histerr 00052 != 00053 !------------------- 00054 END MODULE errioipsl_psmile