bief_valida.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\bief_valida.f
00002 !
00076                      SUBROUTINE BIEF_VALIDA
00077 !                    **********************
00078 !
00079      &(VARREF,TEXTREF,UREF,REFFORMAT,VARRES,TEXTRES,URES,RESFORMAT,
00080      & MAXTAB,NP,IT,MAXIT,ACOMPARER)
00081 !
00082 !***********************************************************************
00083 ! BIEF   V6P3                                   21/08/2010
00084 !***********************************************************************
00085 !
00086 !
00087 !
00088 !
00089 !
00090 !
00091 !
00092 !
00093 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00094 !| ACOMPARER      |-->| INDICATES WHICH VARIABLE TO COMPARE
00095 !| IT             |-->| TIME STEP NUMBER
00096 !| MAXIT          |-->| MAXIMUM NUMBER OF ITERATIONS
00097 !| MAXTAB         |-->| TOTAL NUMBER OF VARIABLES
00098 !| NP             |-->| NUMBER OF POINTS TO BE CHECKED
00099 !| REFFORMAT      |-->| FORMAT OF REFERENCE FILE
00100 !| RESFORMAT      |-->| FORMAT OF RESULTS FILE
00101 !| TEXTREF        |-->| NAMES & UNITS OF VARIABLES IN THE REFERENCE FILE
00102 !| TEXTRES        |-->| NAMES & UNITS OF VARIABLES IN THE RESULTS FILE
00103 !| UREF           |-->| LOGICAL UNIT OF REFERENCE FILE
00104 !| URES           |-->| LOGICAL UNIT OF RESULTS FILE
00105 !| VARREF         |-->| BLOCK OF VARIABLES IN REFERENCE FILE
00106 !| VARRES         |-->| BLOCK OF VARIABLES IN RESULTS FILE
00107 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00108 !
00109       USE BIEF    !, EX_VALIDA => VALIDA
00110       USE DECLARATIONS_TELEMAC
00111 !
00112       IMPLICIT NONE
00113       INTEGER LNG,LU
00114       COMMON/INFO/LNG,LU
00115 !
00116 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00117 !
00118       INTEGER, INTENT(IN) :: NP,MAXTAB,IT,MAXIT,URES,UREF
00119       INTEGER, INTENT(IN) :: ACOMPARER(MAXTAB)
00120 !
00121       CHARACTER(LEN=32), INTENT(IN) :: TEXTREF(MAXTAB),TEXTRES(MAXTAB)
00122 !
00123       TYPE(BIEF_OBJ), INTENT(INOUT) :: VARREF,VARRES
00124       CHARACTER(LEN=*), INTENT(IN)  :: REFFORMAT,RESFORMAT
00125 !
00126 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00127 !
00128       INTEGER IVAR,I,IREF,IRES,IERMAX
00129 !
00130       DOUBLE PRECISION TIMEREF,TIMERES,ERMAX,HIST(1),ERR
00131 !
00132       DOUBLE PRECISION P_DMAX
00133       EXTERNAL         P_DMAX
00134 !
00135 !-----------------------------------------------------------------------
00136 !
00137       INTEGER FINDREF(500),FINDRES(500)
00138       IF(MAXTAB.GT.500) THEN
00139         WRITE(LU,*) 'WRONG SIZE OF FINDREF AND FINDRES IN BIEF_VALIDA'
00140         CALL PLANTE(1)
00141         STOP
00142       ENDIF
00143 !
00144 !-----------------------------------------------------------------------
00145 !
00146       IF(IT.EQ.MAXIT) THEN
00147 !
00148 !  CALLS SUITE TO READ THE REFERENCE FILE
00149 !
00150       IF(LNG.EQ.1) WRITE(LU,10) NAMECODE
00151       IF(LNG.EQ.2) WRITE(LU,11) NAMECODE
00152       CALL BIEF_SUITE(VARREF,VARREF,IREF,UREF,REFFORMAT,HIST,0,NP,
00153      &                TIMEREF,TEXTREF,TEXTREF,0,FINDREF,ACOMPARER,
00154      &                .TRUE.,.TRUE.,MAXTAB)
00155 !
00156 !  CALLS SUITE TO READ THE RESULTS FILE
00157 !
00158       IF(LNG.EQ.1) WRITE(LU,12)
00159       IF(LNG.EQ.2) WRITE(LU,13)
00160       CALL BIEF_SUITE(VARRES,VARRES,IRES,URES,RESFORMAT,HIST,0,NP,
00161      &                TIMERES,TEXTRES,TEXTRES,0,FINDRES,ACOMPARER,
00162      &                .TRUE.,.TRUE.,MAXTAB)
00163 !
00164 !-----------------------------------------------------------------------
00165 !
00166       IF(LNG.EQ.1) WRITE(LU,14)
00167       IF(LNG.EQ.2) WRITE(LU,15)
00168 !
00169       IF(ABS(TIMERES-TIMEREF)/MAX(TIMEREF,1.D-4).GT.1.D-2) THEN
00170         IF(LNG.EQ.1) WRITE(LU,16)
00171         IF(LNG.EQ.2) WRITE(LU,17)
00172       ENDIF
00173       IF(IRES.NE.IREF) THEN
00174         IF(LNG.EQ.1) WRITE(LU,18)
00175         IF(LNG.EQ.2) WRITE(LU,19)
00176       ENDIF
00177 !
00178 !-----------------------------------------------------------------------
00179 !
00180 !     LOOP ON THE VARIABLES TO COMPARE
00181 !
00182       DO IVAR=1,MAXTAB
00183 !
00184         IF(ACOMPARER(IVAR).EQ.1) THEN
00185 !
00186 !       COMPARES THE VARIABLE IVAR
00187 !
00188           IF(FINDREF(IVAR).EQ.1.AND.FINDRES(IVAR).EQ.1) THEN
00189 !
00190             ERMAX = 0.D0
00191             IERMAX = 1
00192             DO I = 1 , NP
00193               ERR=ABS(VARREF%ADR(IVAR)%P%R(I)-VARRES%ADR(IVAR)%P%R(I))
00194               IF(ERR.GT.ERMAX) THEN
00195                 ERMAX=ERR
00196                 IERMAX=I
00197               ENDIF
00198             ENDDO
00199 !
00200             IF(NCSIZE.GT.1) ERMAX=P_DMAX(ERMAX)
00201             IF(LNG.EQ.1) WRITE(LU,60) TEXTRES(IVAR)(1:16),ERMAX
00202             IF(LNG.EQ.2) WRITE(LU,61) TEXTRES(IVAR)(1:16),ERMAX
00203 !
00204           ELSEIF(FINDREF(IVAR).EQ.1) THEN
00205 !
00206             IF(LNG.EQ.1) WRITE(LU,70) TEXTRES(IVAR)(1:16)
00207             IF(LNG.EQ.2) WRITE(LU,71) TEXTRES(IVAR)(1:16)
00208 !
00209           ENDIF
00210 !
00211         ENDIF
00212 !
00213       ENDDO
00214 !
00215       IF(LNG.EQ.1) WRITE(LU,50)
00216       IF(LNG.EQ.2) WRITE(LU,51)
00217 !
00218       ENDIF
00219 !
00220 !-----------------------------------------------------------------------
00221 !
00222 10    FORMAT(1X,////,1X,80('='),/,
00223      &       25X,' PROCEDURE DE VALIDATION DE ',A24,/,
00224      &       1X,80('-'),//,
00225      &       1X,' 1) RELECTURE DU FICHIER DE REFERENCE :',/,
00226      &       1X,' --------------------------------------',/)
00227 11    FORMAT(1X,////,1X,80('='),/,
00228      &       25X,' VALIDATION PROCEDURE OF ',A24,/,
00229      &       1X,80('-'),//,
00230      &       1X,' 1) READING THE REFERENCE FILE :',/,
00231      &       1X,' ------------------------------',/)
00232 12    FORMAT(1X,///,
00233      &       1X,' 2) RELECTURE DU FICHIER DE RESULTATS :',/,
00234      &       1X,' --------------------------------------',/)
00235 13    FORMAT(1X,///,
00236      &       1X,' 2) READING THE RESULTS FILE :',/,
00237      &       1X,' --------------------------------',/)
00238 14    FORMAT(1X,///,
00239      &       1X,' 3) COMPARAISON :',/,
00240      &       1X,' ----------------',/)
00241 15    FORMAT(1X,///,
00242      &       1X,' 3) COMPARISON:',/,
00243      &       1X,' --------------',/)
00244 16    FORMAT(1X,///,
00245      &       1X,' ATTENTION : TEMPS DIFFERENTS',/,
00246      &       1X,' ----------------------------',/)
00247 17    FORMAT(1X,///,
00248      &       1X,' BEWARE: TIMES ARE DIFFERENT',/,
00249      &       1X,' ---------------------------',/)
00250 18    FORMAT(1X,///,
00251      &       1X,' ATTENTION : NUMEROS D''ENREGISTREMENT DIFFERENTS',/,
00252      &       1X,' ------------------------------------------------',/)
00253 19    FORMAT(1X,///,
00254      &       1X,' BEWARE: RECORD NUMBERS ARE DIFFERENT',/,
00255      &       1X,' ------------------------------------',/)
00256 !
00257 50    FORMAT(1X,80('-'),/,23X,'FIN DU COMPTE-RENDU DE VALIDATION',/,
00258      &       1X,80('='),////)
00259 51    FORMAT(1X,80('-'),/,23X,'END OF VALIDATION REPORT',/,
00260      &       1X,80('='),////)
00261 !
00262 60    FORMAT(1X,'VARIABLE : ',A16,'  DIFFERENCE : ',G16.7,/)
00263 61    FORMAT(1X,'VARIABLE: ' ,A16,'  DIFFERENCE: ',G16.7,/)
00264 !
00265 70    FORMAT(1X,'VARIABLE : ',A16,'  NON TROUVEE',/)
00266 71    FORMAT(1X,'VARIABLE: ' ,A16,'  NOT FOUND'  ,/)
00267 !
00268 !-----------------------------------------------------------------------
00269 !
00270       RETURN
00271       END

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