Commit 34f14525 authored by pesei's avatar pesei
Browse files

increase output width for time (ticket:205)

2018-09-10, Petra Seibert: increase output width for time in sec
small improvements in code layout, name big loops
parent 28701336
...@@ -32,6 +32,9 @@ subroutine plumetraj(itime) ...@@ -32,6 +32,9 @@ subroutine plumetraj(itime)
! * ! *
! 24 January 2002 * ! 24 January 2002 *
! * ! *
! 2018-09-10, Petra Seibert: increase output width for time in sec *
! small improvements in code layout, name big loops *
! *
! Variables: * ! Variables: *
! fclust fraction of particles belonging to each cluster * ! fclust fraction of particles belonging to each cluster *
! hmixcenter mean mixing height for all particles * ! hmixcenter mean mixing height for all particles *
...@@ -76,10 +79,10 @@ subroutine plumetraj(itime) ...@@ -76,10 +79,10 @@ subroutine plumetraj(itime)
dtt=1./(dt1+dt2) dtt=1./(dt1+dt2)
! Loop about all release points ! Loop over all release points
!****************************** !*****************************
do j=1,numpoint point_loop: do j=1,numpoint
if (abs(ireleasestart(j)-itime).gt.lage(nageclass)) goto 10 if (abs(ireleasestart(j)-itime).gt.lage(nageclass)) goto 10
topocenter=0. topocenter=0.
hmixcenter=0. hmixcenter=0.
...@@ -92,7 +95,7 @@ subroutine plumetraj(itime) ...@@ -92,7 +95,7 @@ subroutine plumetraj(itime)
zrmsdist=0. zrmsdist=0.
n=0 n=0
do i=1,numpart particle_loop: do i=1,numpart
if (itra1(i).ne.itime) goto 20 if (itra1(i).ne.itime) goto 20
if (npoint(i).ne.j) goto 20 if (npoint(i).ne.j) goto 20
n=n+1 n=n+1
...@@ -124,9 +127,9 @@ subroutine plumetraj(itime) ...@@ -124,9 +127,9 @@ subroutine plumetraj(itime)
!*********** !***********
topo=p1*oro(ix ,jy) & topo=p1*oro(ix ,jy) &
+ p2*oro(ixp,jy) & + p2*oro(ixp,jy) &
+ p3*oro(ix ,jyp) & + p3*oro(ix ,jyp) &
+ p4*oro(ixp,jyp) + p4*oro(ixp,jyp)
topocenter=topocenter+topo topocenter=topocenter+topo
! Potential vorticity ! Potential vorticity
...@@ -150,9 +153,9 @@ subroutine plumetraj(itime) ...@@ -150,9 +153,9 @@ subroutine plumetraj(itime)
do m=1,2 do m=1,2
indexh=memind(m) indexh=memind(m)
pv1(m)=p1*pv(ix ,jy ,ind,indexh) & pv1(m)=p1*pv(ix ,jy ,ind,indexh) &
+p2*pv(ixp,jy ,ind,indexh) & +p2*pv(ixp,jy ,ind,indexh) &
+p3*pv(ix ,jyp,ind,indexh) & +p3*pv(ix ,jyp,ind,indexh) &
+p4*pv(ixp,jyp,ind,indexh) +p4*pv(ixp,jyp,ind,indexh)
end do end do
pvprof(ind-indz+1)=(pv1(1)*dt2+pv1(2)*dt1)*dtt pvprof(ind-indz+1)=(pv1(1)*dt2+pv1(2)*dt1)*dtt
end do end do
...@@ -172,14 +175,14 @@ subroutine plumetraj(itime) ...@@ -172,14 +175,14 @@ subroutine plumetraj(itime)
indexh=memind(m) indexh=memind(m)
tr(m)=p1*tropopause(ix ,jy ,1,indexh) & tr(m)=p1*tropopause(ix ,jy ,1,indexh) &
+ p2*tropopause(ixp,jy ,1,indexh) & + p2*tropopause(ixp,jy ,1,indexh) &
+ p3*tropopause(ix ,jyp,1,indexh) & + p3*tropopause(ix ,jyp,1,indexh) &
+ p4*tropopause(ixp,jyp,1,indexh) + p4*tropopause(ixp,jyp,1,indexh)
hm(m)=p1*hmix(ix ,jy ,1,indexh) & hm(m)=p1*hmix(ix ,jy ,1,indexh) &
+ p2*hmix(ixp,jy ,1,indexh) & + p2*hmix(ixp,jy ,1,indexh) &
+ p3*hmix(ix ,jyp,1,indexh) & + p3*hmix(ix ,jyp,1,indexh) &
+ p4*hmix(ixp,jyp,1,indexh) + p4*hmix(ixp,jyp,1,indexh)
end do end do
hmixi=(hm(1)*dt2+hm(2)*dt1)*dtt hmixi=(hm(1)*dt2+hm(2)*dt1)*dtt
...@@ -190,9 +193,8 @@ subroutine plumetraj(itime) ...@@ -190,9 +193,8 @@ subroutine plumetraj(itime)
zl(n)=zl(n)+topo ! convert to height asl zl(n)=zl(n)+topo ! convert to height asl
hmixcenter=hmixcenter+hmixi hmixcenter=hmixcenter+hmixi
20 continue 20 continue
end do end do particle_loop
! Make statistics for all plumes with n>0 particles ! Make statistics for all plumes with n>0 particles
...@@ -233,19 +235,16 @@ subroutine plumetraj(itime) ...@@ -233,19 +235,16 @@ subroutine plumetraj(itime)
! Write out results in trajectory data file ! Write out results in trajectory data file
!****************************************** !******************************************
write(unitouttraj,'(i5,i8,2f9.4,4f8.1,f8.2,4f8.1,3f6.1,& write (unitouttraj,901) j,itime-(ireleasestart(j)+ireleaseend(j))/2, &
&5(2f8.3,f7.0,f6.1,f8.1))')&
&j,itime-(ireleasestart(j)+ireleaseend(j))/2, &
xcenter,ycenter,zcenter,topocenter,hmixcenter,tropocenter, & xcenter,ycenter,zcenter,topocenter,hmixcenter,tropocenter, &
pvcenter,rmsdist,rms,zrmsdist,zrms,hmixfract,pvfract, & pvcenter,rmsdist,rms,zrmsdist,zrms,hmixfract,pvfract,tropofract, &
tropofract, & (xclust(k),yclust(k),zclust(k),fclust(k),rmsclust(k), k=1,ncluster)
(xclust(k),yclust(k),zclust(k),fclust(k),rmsclust(k), & 901 format(i5,i10,2f9.4,4f8.1,f8.2,4f8.1,3f6.1,5(2f8.3,f7.0,f6.1,f8.1))
k=1,ncluster)
endif endif
10 continue 10 continue
end do end do point_loop
end subroutine plumetraj end subroutine plumetraj
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment