diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /lib/foldspec9f.f90 | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'lib/foldspec9f.f90')
| -rwxr-xr-x | lib/foldspec9f.f90 | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/foldspec9f.f90 b/lib/foldspec9f.f90 index a6436eba..9a8afd92 100755 --- a/lib/foldspec9f.f90 +++ b/lib/foldspec9f.f90 @@ -1,30 +1,30 @@ -subroutine foldspec9f(s1,nq,jz,ja,jb,s2) - -! Fold symbol spectra (quarter-symbol steps) from s1 into s2 - - real s1(nq,jz) - real s2(240,340) !340 = 4*85 - integer nsum(340) - - s2=0. - nsum=0 - - do j=ja,jb - k=mod(j-1,340)+1 - nsum(k)=nsum(k)+1 - do i=1,NQ - s2(i,k)=s2(i,k) + s1(i,j) - enddo - enddo - - do k=1,340 - fac=1.0 - if(nsum(k).gt.0) fac=1.0/nsum(k) - s2(1:nq,k)=fac*s2(1:nq,k) - enddo - - ave=sum(s2)/(340.0*nq) - if(ave.gt.0.0) s2=s2/ave - - return -end subroutine foldspec9f +subroutine foldspec9f(s1,nq,jz,ja,jb,s2)
+
+! Fold symbol spectra (quarter-symbol steps) from s1 into s2
+
+ real s1(nq,jz)
+ real s2(240,340) !340 = 4*85
+ integer nsum(340)
+
+ s2=0.
+ nsum=0
+
+ do j=ja,jb
+ k=mod(j-1,340)+1
+ nsum(k)=nsum(k)+1
+ do i=1,NQ
+ s2(i,k)=s2(i,k) + s1(i,j)
+ enddo
+ enddo
+
+ do k=1,340
+ fac=1.0
+ if(nsum(k).gt.0) fac=1.0/nsum(k)
+ s2(1:nq,k)=fac*s2(1:nq,k)
+ enddo
+
+ ave=sum(s2)/(340.0*nq)
+ if(ave.gt.0.0) s2=s2/ave
+
+ return
+end subroutine foldspec9f
|
