! modified by Alex Pogoreltsev 11.05.16 !----------------------------------- program ave_JRA55 ! integer,PARAMETER :: ILAT=36,ngit=17 integer,PARAMETER :: ntime=744 real :: q1(ILAT,ngit),q2(ILAT,ngit), & & q3(ILAT,ngit),q4(ILAT,ngit), & & q5(ILAT,ngit),q6(ILAT,ngit), & & q7(ILAT,ngit),q8(ILAT,ngit), & & q9(ILAT,ngit),q10(ILAT,ngit) real :: uq(ILAT,ngit) !c....INPUTFILE mean Jan 10 years 2010-2019 !c 2010 (625) !c 2011 (637) !c 2012 (649) !c 2013 (661) !c 2014 (673) !c 2015 (685) !c 2016 (697) !c 2017 (709) !c 2018 (721) !c 2019 (733) !-----------------------input files Open (11, file='tp_a0_grads.dx', & & access='direct',status='unknown',recl=4*ilat*ngit) !------------------------files for grads Open (22, file='tp_a0_dec.dx', & & access='direct',status='unknown',recl=4*ilat*ngit) !----------------------read the data do l=1,ntime read(11,rec=636) q1 read(11,rec=648) q2 read(11,rec=660) q3 read(11,rec=672) q4 read(11,rec=684) q5 read(11,rec=696) q6 read(11,rec=708) q7 read(11,rec=720) q8 read(11,rec=732) q9 read(11,rec=744) q10 end do !time !--------------------------------------- do k=1,ngit do j=1,ilat uq(j,k)=0. end do end do !--------------------- do k=1,ngit do j=1,ilat uq(j,k)=(q1(j,k)+q2(j,k)+q3(j,k)+q4(j,k)+q5(j,k)+q6(j,k)+ & & q7(j,k)+q8(j,k)+q9(j,k)+q10(j,k))/10. end do end do write(22,rec=1) uq STOP END