read_submit.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\read_submit.f
00002 !
00063                      SUBROUTINE READ_SUBMIT
00064 !                    **********************
00065 !
00066      &(FILES,NFILES,CODE,SUBMIT,NMOT)
00067 !
00068 !***********************************************************************
00069 ! BIEF   V6P1                                   21/08/2010
00070 !***********************************************************************
00071 !
00072 !         AND STORES THEM IN BIEF_FILE STRUCTURE CALLED FILES
00073 !
00074 !
00075 !
00076 !
00077 !
00078 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00079 !| CODE           |-->| NAME OF CALLING PROGRAMME
00080 !| FILES          |<--| FILES STRUCTURES
00081 !| NFILES         |-->| NUMBER OF FILES IN ARRAY FILES
00082 !| NMOT           |-->| SECOND DIMENSION OF SUBMIT AND MOTCAR
00083 !| SUBMIT         |-->| CHARACTER STRINGS STEMMING FROM DICTIONARY
00084 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00085 !
00086       USE BIEF, EX_READ_SUBMIT => READ_SUBMIT
00087       USE DECLARATIONS_TELEMAC
00088 !
00089       IMPLICIT NONE
00090       INTEGER     LNG,LU
00091       COMMON/INFO/LNG,LU
00092 !
00093 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00094 !
00095       INTEGER           , INTENT(IN) :: NFILES,NMOT
00096       TYPE(BIEF_FILE), INTENT(INOUT) :: FILES(NFILES)
00097       CHARACTER(LEN=24) , INTENT(IN) :: CODE
00098       CHARACTER(LEN=144), INTENT(IN) :: SUBMIT(4,NMOT)
00099 !
00100 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00101 !
00102       INTEGER I,ICOL,I1,CANAL
00103 !
00104       CHARACTER(LEN=7) :: NOMCANAL
00105       CHARACTER(LEN=9) :: LITECR
00106 !
00107       INTEGER  PREVAL,INTLU
00108       EXTERNAL PREVAL,INTLU
00109 !
00110 !-----------------------------------------------------------------------
00111 !
00112       DO I=1,NFILES
00113         FILES(I)%LU=0
00114         FILES(I)%TELNAME='      '
00115         FILES(I)%NAME(1:1)=' '
00116       ENDDO
00117 !
00118 !-----------------------------------------------------------------------
00119 !
00120 !     DECODES THE SUBMIT STRING FOR THE FILES DECLARED IN THE
00121 !     STEERING FILE
00122 !
00123       DO I=1,NMOT
00124 !
00125 ! EXAMPLE SUBMIT STRING : 'NGEO-READ-01;T2DGEO;OBLIG;BIN;LIT;SELAFIN-GEOM'
00126 !
00127         IF(     SUBMIT(4,I).NE.' '
00128 !       IF(     SUBMIT(4,I).NE.' '.AND.MOTCAR(I)(1:1).NE.' '
00129      &     .AND.SUBMIT(4,I)(1:7).NE.'INUTILE'  ) THEN
00130 !         SCANS FOR CHANNEL FORTRAN NAME (FOR EXAMPLE NGEO)
00131           ICOL=PREVAL(1,SUBMIT(4,I),'-','-','-')
00132           NOMCANAL=SUBMIT(4,I)(1:ICOL-1)
00133 !         SCANS FOR THE READ OR WRITE OR READWRITE STRING
00134 !         LOCATED BEFORE THE NEXT - SIGN
00135           I1=ICOL+1
00136           ICOL=PREVAL(I1,SUBMIT(4,I),'-','-','-')
00137           LITECR=SUBMIT(4,I)(I1:ICOL-1)
00138 !         READS THE CHANNEL AFTER THE - SIGN
00139           CANAL=INTLU(ICOL,SUBMIT(4,I))
00140           IF(CANAL.GT.NFILES) THEN
00141             IF(LNG.EQ.1) THEN
00142               WRITE(LU,*) 'READ_SUBMIT : NFILES TROP PETIT : ',NFILES
00143               WRITE(LU,*) '              IL FAUT AU MOINS ',CANAL
00144             ENDIF
00145             IF(LNG.EQ.2) THEN
00146               WRITE(LU,*) 'READ_SUBMIT: NFILES TOO SMALL : ',NFILES
00147               WRITE(LU,*) '             IT SHOULD BE AT LEAST ',CANAL
00148             ENDIF
00149             CALL PLANTE(1)
00150             STOP
00151           ENDIF
00152           FILES(CANAL)%LU=CANAL
00153           FILES(CANAL)%ACTION=LITECR
00154 !
00155           ICOL=PREVAL(ICOL,SUBMIT(4,I),';',';',';')
00156 !         READS THE NAME OF THE FILE TO BE COPIED TO THE TMP FOLDER
00157           I1=PREVAL(ICOL+1,SUBMIT(4,I),';',';',';')
00158           FILES(CANAL)%TELNAME=SUBMIT(4,I)(ICOL+1:I1-1)
00159 !         SKIPS ;FACUL; OR ;OBLIG;
00160           ICOL=PREVAL(I1+1,SUBMIT(4,I),';',';',';')
00161 !         BINARY OR ASCII
00162           FILES(CANAL)%BINASC=SUBMIT(4,I)(ICOL+1:ICOL+3)
00163 !         NOTE : SUBMIT(4,I)(ICOL+5:ICOL+7) CONTAINS LIT OU ECR
00164 !                NOT USED HERE
00165 !         MODE SELAFIN-GEOM, PARAL, SCAL, ETC.
00166           FILES(CANAL)%TYPE=TRIM(SUBMIT(4,I)(ICOL+9:MIN(144,ICOL+20)))
00167 !
00168         ENDIF
00169 !
00170       ENDDO
00171 !
00172 !-----------------------------------------------------------------------
00173 !
00174       RETURN
00175       END

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