lfcdie
C LFCDIE SOURCE OF166741 24/12/18 21:15:16 12091 IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) -INC PPARAM -INC CCOPTIO -INC CCFXDR DIMENSION ITAB(1) dimension itabc(lmax+1) external LONG 10 CONTINUE IRETOU=0 ios=1 IF (LMAX.EQ.0) RETURN IF (IONIVE.GT.19) THEN IF (IFORM.EQ.1) then IF (IONIVE .GE. 26) THEN READ(NBAND,200,END=1001,ERR=1000) lc 200 FORMAT(10(1X,I12)) ELSE READ(NBAND,201,END=1001,ERR=1000) lc 201 FORMAT(10I8) ENDIF if (lc.gt.lmax+1) goto 1000 IF (IONIVE .GE. 26) THEN READ(NBAND,200,END=1001,ERR=1000) (ITABc(i),i=1,lc) ELSE READ(NBAND,201,END=1001,ERR=1000) (ITABC(i),i=1,lc) ENDIF ENDIF IF (IFORM.EQ.0) then READ(NBAND,END=1001,ERR=1000) lc if (lc.gt.lmax+1) goto 1000 READ(NBAND,END=1001,ERR=1000) (ITABc(I),I=1,Lc) endif if (iform.eq.2) then ios=ixdrint(ixdrr,lc) if (ios.lt.0) goto 1001 if (lc.gt.lmax+1) goto 1000 lmaxl=lc ios=ixdrimat(ixdrr,lmaxl,itabc(1)) if (ios.lt.0) goto 1001 endif * decompression i=0 ic=0 icp=0 1954 continue if (ic.ge.lc) goto 1955 icp=ic+1 if (itabc(icp).gt.0) then * comprime ic=icp+1 do j=1,int(itabc(icp)) i=i+1 itab(i)=itabc(ic) enddo ic=icp+1 goto 1954 else * non comprime ic=icp do j=1,int(-itabc(icp)) i=i+1 ic=ic+1 itab(i)=itabc(ic) enddo endif goto 1954 1955 continue if (i.ne.lmax) write (ioimp,*) 'Pb dans la decompression lfcdie' return C* ELSE IF (IONIVE.LE.19) THEN ELSE lmaxl = lmax IF (IFORM.EQ.1) then if (ionive.lt.4) then READ(NBAND,101,END=1001,ERR=1000)(ITAB(i),i=1,lmaxl) 101 FORMAT(16I5) else READ(NBAND,100,END=1001,ERR=1000)(ITAB(i),i=1,lmaxl) 100 FORMAT(10I8) endif endif IF (IFORM.EQ.0)READ(NBAND,END=1001,ERR=1000) (ITAB(i),i=1,lmaxl) if (iform.eq.2) ios=IXDRIMAT( ixdrr, lmaxl,itab(1)) if (ios.lt.0) GOTO 1001 RETURN ENDIF 1001 CONTINUE * on bascule sur le fichier suivant ificle=ificle+1 * write(ioimp,*)' lfcdie ificle ',ificle if(ificle.eq.10000)then iretou=1 return endif if(ificle.eq.1) then nomres(ll+1:ll+2)='_1' ll=ll+2 elseif ( ificle.lt.10) then write(nomres(ll:ll),fmt='(I1)')ificle elseif ( ificle.lt.100) then if(ificle.eq.10)ll = ll + 1 write(nomres(ll-1:ll),fmt='(I2)')ificle elseif ( ificle.lt.1000) then if(ificle.eq.100)ll = ll + 1 write(nomres(ll-2:ll),fmt='(I3)')ificle elseif ( ificle.lt.10000) then if(ificle.eq.1000)ll = ll + 1 write(nomres(ll-3:ll),fmt='(I4)')ificle endif if (iform.ne.2) close (unit=nband) if (iform.eq.2) ios=IXDRCLOSE( ixdrr,.true.) if(iform.eq.1) then OPEN (UNIT=NBAND,STATUS='UNKNOWN',FILE=NOMRES(1:ll), # IOSTAT=IOS,ERR=2000,FORM='FORMATTED') ELSEif (iform.eq.0) then OPEN (UNIT=NBAND,STATUS='UNKNOWN',FILE=NOMRES(1:ll), # IOSTAT=IOS,ERR=2000,FORM='UNFORMATTED') else ios=INITXDR( NOMRES(1:ll),'r',.true.) if (ios.lt.0) goto 2000 ENDIF write(ioimp,*) 'Ouverture du fichier : ',nomres(1:ll) GOTO 10 1000 CONTINUE IRETOU=1 write (6,*) ' erreur lfcdie ' RETURN 2000 CONTINUE IRETOU=1 MOTERR=NOMRES(1:ll) INTERR(1)=IOS RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales