! =====================================================================! programm sw_read ! =====================================================================! ! Reading of Solar wind parameters ! NASA database 1979 - 2002 !======================================================================! implicit none ! ----- Commons ------------------------------------------------------ ! ! -------------------------------------------------------------------- ! ! Solar wind parameters and input common blocks ! ! -------------------------------------------------------------------- ! integer SWm, SWda, SWyr parameter ( SWm = 4, SWda = 365, SWyr = 21+3) !-----------------------------------------------------------------! ! Bz : vertical component of IMF : nT ! Vsw : velocity of solar wind : km/s ! nsw : ion concentration of Swind : mo/m^3 real*4 Bz (SWyr,SWda,SWm) real*4 Vsw (SWyr,SWda,SWm) real*4 nsw (SWyr,SWda,SWm) common / SWind / Bz, Vsw, nsw ! ----- Local variables -------------------------------------------! integer i, j, k integer itime, iday, iyear logical ptest ! -------- Printing test ptest = .TRUE. ! .FALSE. ! .TRUE. ! -------- Iput of Solar wind parameters from 1979 to 2002 years ! -------- Bz(nT), Vsw(km/s), nsw(ion/m^3) open(21,file='em_sw_79_99.dat',status='old') read(21,*) (((Bz (I,J,K),K=1,SWm), J=1,SWda), I=1,SWyr-3) read(21,*) (((Vsw(I,J,K),K=1,SWm), J=1,SWda), I=1,SWyr-3) read(21,*) (((Nsw(I,J,K),K=1,SWm), J=1,SWda), I=1,SWyr-3) close(21) open(21,file='em_sw_00_02.dat',status='old') read(21,*) (((Bz (I,J,K),K=1,SWm), J=1,SWda),I=SWyr-2,SWyr) read(21,*) (((Nsw(I,J,K),K=1,SWm), J=1,SWda),I=SWyr-2,SWyr) read(21,*) (((Vsw(I,J,K),K=1,SWm), J=1,SWda),I=SWyr-2,SWyr) close(21) write(*,*) 'read Solar wind parameters is o.k.' if(ptest) then ! ----------------------- test printing----start ! zub iyear = 1996 iday = 355 iyear = iyear - 1979 + 1 write(2,*) 'year = ', iyear, iday write(2,*) 'day = ', iday do itime =1,4 write(2,*) 'Bz = ',Bz(iyear,iday,itime),'itime = ',itime enddo do itime =1,4 write(2,*) 'Vsw = ',Vsw(iyear,iday,itime),'itime = ',itime enddo do itime =1,4 write(2,*) 'Nsw = ',Nsw(iyear,iday,itime),'itime = ',itime enddo pause !---------------------------- test printing end endif STOP END