program a2b_EOS ! Version: 16-mai-2008 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ! 23/07/98: Modifs (TG): reorganisation des fichiers .b plus c ! logiquement (T,P,R,S,M,U,X1,X2) c ! => modif concerne etat_eos.f ! c !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc implicit double precision (a-h, o-z) DOUBLE PRECISION LOGT,LOGT_1,LOGT_2,LOGT_3,LOGT_4 ! For He_spleen_pt.b PARAMETER (NX_1=63, NY_1=76) DIMENSION LOGT_1(NX_1),P_1(NY_1),CR_1(NX_1,NY_1,2), & & CS_1(NX_1,NY_1,2),CM_1(NX_1,NY_1,2), & & CU_1(NX_1,NY_1,2),CX1_1(NX_1,NY_1,2),CX2_1(NX_1,NY_1,2) ! For He_spleen_pt.b2 PARAMETER (NX_2=25, NY_2=31) DIMENSION LOGT_2(NX_2),P_2(NY_2),CR_2(NX_2,NY_2,2), & & CS_2(NX_2,NY_2,2),CM_2(NX_2,NY_2,2), & & CU_2(NX_2,NY_2,2),CX1_2(NX_2,NY_2,2),CX2_2(NX_2,NY_2,2) ! For inter_spleen_pt.b PARAMETER (NX_3=63, NY_3=76) DIMENSION LOGT_3(NX_3),P_3(NY_3),CR_3(NX_3,NY_3,2), & & CS_3(NX_3,NY_3,2),CM_3(NX_3,NY_3,2), & & CU_3(NX_3,NY_3,2),CX1_3(NX_3,NY_3,2),CX2_3(NX_3,NY_3,2) DIMENSION LOGT(63),P(76),CR(63,76,2),CS(63,76,2),CM(63,76,2), & & CU(63,76,2),CX1(63,76,2),CX2(63,76,2) ! For inter_spleen_pt.b2 PARAMETER (NX_4=43, NY_4=31) DIMENSION LOGT_4(NX_4),P_4(NY_4),CR_4(NX_4,NY_4,2), & & CS_4(NX_4,NY_4,2),CM_4(NX_4,NY_4,2), & & CU_4(NX_4,NY_4,2),CX1_4(NX_4,NY_4,2),CX2_4(NX_4,NY_4,2) ! For ppt_spleen_pt.b PARAMETER (NXX=17, NYA=41,NYB=51) DIMENSION T(NXX),P1(NYA),P2(NYB),CR1(NXX,NYA,2),CS1(NXX,NYA,2), & & CM1(NXX,NYA,2),CU1(NXX,NYA,2),CR2(NXX,NYB,2),CS2(NXX,NYB,2), & & CM2(NXX,NYB,2),CU2(NXX,NYB,2),CX11(NXX,NYA,2), & & CX21(NXX,NYA,2),CX12(NXX,NYB,2),CX22(NXX,NYB,2),TH2(11), & & C1XH2(11,NYA,2),TH(9),C1XH(9,NYA,2) character*9 dir data dir/'data/EOS/'/ !--------------------------------------------------------------------- ! goto 11 !pour lecture de fichier binaire uniquement ! Read the bicubic spline coefficients for He_spleen_pt.a OPEN(UNIT=7,FILE=dir//'He_spleen_pt.a',status='old') OPEN(UNIT=1,FILE=dir//'He_spleen_pt.b',form='unformatted', & & status='unknown') READ(7,2) logt_1 READ(7,2) p_1 READ(7,3) cx1_1 READ(7,3) cx2_1 READ(7,3) cr_1 READ(7,3) cs_1 READ(7,3) cm_1 READ(7,3) cu_1 close(7) WRITE(1) LOGT_1,P_1,CR_1,CS_1,CM_1,CU_1,CX1_1,CX2_1 CLOSE(1) write(*,*)'J''ai cree le fichier ',dir//'He_spleen_pt.b' ! Read the bicubic spline coefficients for He_spleen_pt.a2 OPEN(UNIT=7,FILE=dir//'He_spleen_pt.a2',status='old') OPEN(UNIT=1,FILE=dir//'He_spleen_pt.b2',form='unformatted', & & status='unknown') READ(7,2) logt_2 READ(7,2) p_2 READ(7,3) cx1_2 READ(7,3) cx2_2 READ(7,3) cr_2 READ(7,3) cs_2 READ(7,3) cm_2 READ(7,3) cu_2 close(7) WRITE(1) LOGT_2,P_2,CR_2,CS_2,CM_2,CU_2,CX1_2,CX2_2 CLOSE(1) write(*,*)'J''ai cree le fichier ',dir//'He_spleen_pt.b2' ! Read the bicubic spline coefficients for inter_spleen_pt.a OPEN(UNIT=7,FILE=dir//'inter_spleen_pt.a',status='old') OPEN(UNIT=1,FILE=dir//'inter_spleen_pt.b',form='unformatted', & & status='unknown') READ(7,2) logt_3 READ(7,2) p_3 READ(7,3) cr_3 READ(7,3) cs_3 READ(7,3) cm_3 READ(7,3) cu_3 READ(7,3) cx1_3 READ(7,3) cx2_3 close(7) WRITE(1) LOGT_3,P_3,CR_3,CS_3,CM_3,CU_3,CX1_3,CX2_3 CLOSE(1) write(*,*)'J''ai cree le fichier ',dir//'inter_spleen_pt.b' ! Read the bicubic spline coefficients for inter_spleen_pt.a2 OPEN(UNIT=7,FILE=dir//'inter_spleen_pt.a2',status='old') OPEN(UNIT=1,FILE=dir//'inter_spleen_pt.b2',form='unformatted', & & status='unknown') READ(7,2) logt_4 READ(7,2) p_4 READ(7,3) cx1_4 READ(7,3) cx2_4 READ(7,3) cr_4 READ(7,3) cs_4 READ(7,3) cm_4 READ(7,3) cu_4 close(7) WRITE(1) LOGT_4,P_4,CR_4,CS_4,CM_4,CU_4,CX1_4,CX2_4 CLOSE(1) write(*,*)'J''ai cree le fichier ',dir//'inter_spleen_pt.b2' 33 continue ! Same deal for the ppt_spleen_pt file OPEN(UNIT=7,FILE=dir//'ppt_spleen_pt.a',status='old') OPEN(UNIT=1,FILE=dir//'ppt_spleen_pt.b',form='unformatted', & & status='unknown') READ(7,2) t READ(7,2) p1 READ(7,2) p2 READ(7,3) cr1 READ(7,3) cs1 READ(7,3) cm1 READ(7,3) cu1 READ(7,3) cr2 READ(7,3) cs2 READ(7,3) cm2 READ(7,3) cu2 READ(7,3) cx11 READ(7,3) cx21 READ(7,3) cx12 READ(7,3) cx22 write(*,*)'Now reading patches around critical pt by Saumon 95' READ(7,2) th2 READ(7,3) c1xh2 READ(7,2) th READ(7,3) c1xh close(7) WRITE(1) T,P1,P2,CR1,CS1,CM1,CU1,CR2,CS2,CM2,CU2,CX11,CX21, & & CX12,CX22,TH2,C1XH2,TH,C1XH CLOSE(1) write(*,*)'J''ai cree le fichier ',dir//'ppt_spleen_pt.b' 2 format(10f8.3) 3 format(1p,4e20.12) stop 11 continue !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ! Test: Affichage d'une partie de la table c !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc write(*,*)'Test: relecture du fichier ',dir//'He_spleen_pt.b' open(unit=1,file=dir//'He_spleen_pt.b',form='unformatted', & & status='old') read(1) LOGT,P,CR,CS,CM,CU,CX1,CX2 close(1) 10 continue write(*,*)'Donner i1,i2<=63,j1,j2<=76' read(*,*)i1,i2,j1,j2 ni=i2-i1+1 write(*,101)(logt(i),i=i1,i2) 101 format(10x,2x,1p,20d10.3) do j=j1,j2 write(*,102)p(j),(cr(i,j,1),i=i1,i2) 102 format(1p,d10.3,2x,20d10.3) ! write(*,'(1p,1x,d10.3,1x,d10.3)')p_3(j),(cr_3(i,j,1),i=i1,i2) enddo goto 10 end