plante.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\special\plante.f
00002 !
00050                      SUBROUTINE PLANTE
00051 !                    *****************
00052 !
00053      &(IVAL)
00054 !
00055 !***********************************************************************
00056 ! SPECIAL   V6P1                                   21/08/2010
00057 !***********************************************************************
00058 !
00059 !
00060 !
00061 !
00062 !
00063 !
00064 !
00065 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00066 !| IVAL           |-->| INTEGER VALUE, OPTION, SEE CODE BELOW
00067 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00068 !
00069       IMPLICIT NONE
00070       INTEGER LNG,LU
00071       COMMON/INFO/LNG,LU
00072 !
00073 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00074 !
00075       INTEGER IVAL
00076 !
00077 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00078 !
00079       INTEGER ICODE
00080 !
00081 !-----------------------------------------------------------------------
00082 !
00083       IF(LNG.EQ.1) WRITE(LU,10)
00084       IF(LNG.EQ.2) WRITE(LU,20)
00085 10    FORMAT(1X,///,1X,'PLANTE : ARRET DU PROGRAMME APRES ERREUR')
00086 20    FORMAT(1X,///,1X,'PLANTE: PROGRAM STOPPED AFTER AN ERROR')
00087 !
00088 !-----------------------------------------------------------------------
00089 ! PARALLEL MODE
00090 !
00091 !JAJ SETTING EXIT VALUES ACCORDING TO THE IVAL VALUE
00092 !    IN CODE IVAL=0 OR IVAL=1 ARE USED NON-CONSEQUENTLY
00093 !
00094 !     STANDARD F90 :  STOP [n] WHERE N IS A STRING OF NOT MORE
00095 !     THAN FIVE DIGITS OR IS A CHARACTER CONSTANT.
00096 !     HOWEVER, CODE IS NOT ALWAYS SENT TO STDERR
00097 !     (COMPILER DEPENDENT, NAG DOESN'T FOR INSTANCE)
00098 !     ICODE MIGHT BE USED IN A POSSIBLE SYSTEM DEPENDENT EXIT PROCEDURE
00099       IF(IVAL.LT.0) THEN
00100         ICODE = 0      ! JUST ASSUMED FOR NON-ERROR STOP
00101       ELSEIF(IVAL.EQ.0.OR.IVAL.EQ.1) THEN
00102         ICODE = 2      ! EXIT IVAL 0 OR 1 INDICATING A "CONTROLLED" ERROR
00103         STOP 2
00104       ELSE
00105         ICODE = 1     ! SOMETHING ELSE? BUT AN ERROR!
00106         STOP 1
00107       ENDIF
00108       WRITE(LU,*) 'RETURNING EXIT CODE: ', ICODE
00109 !
00110 !     POSSIBLE SYSTEM DEPENDENT EXIT PROCEDURE
00111 !     YA: THIS CALL IS OBSOLETE
00112 !      CALL SPECIAL_PLANTE(IVAL,NCSIZE,LNG,LU)
00113 !
00114       STOP 0   ! WHICH IS USUALLY EQUIVALENT TO CALL EXIT(0)
00115 !
00116 !-----------------------------------------------------------------------
00117 !
00118       END SUBROUTINE PLANTE

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0