diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /lib/fst4/fst4_baseline.f90 | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to 'lib/fst4/fst4_baseline.f90')
| -rw-r--r-- | lib/fst4/fst4_baseline.f90 | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/fst4/fst4_baseline.f90 b/lib/fst4/fst4_baseline.f90 index 0000fa65..5c3ed1ed 100644 --- a/lib/fst4/fst4_baseline.f90 +++ b/lib/fst4/fst4_baseline.f90 @@ -1,11 +1,14 @@ -subroutine fst4_baseline(s,np,ia,ib,npct,sbase) +module fst4_baseline_workspace +contains +subroutine fst4_baseline_owned(s,np,ia,ib,npct,sbase,sw) ! Fit baseline to spectrum (for FST4) ! Input: s(npts) Linear scale in power ! Output: sbase(npts) Baseline implicit real*8 (a-h,o-z) - real*4 s(np),sw(np) + real*4 s(np) + real*4 :: sw(np) real*4 sbase(np) real*4 base real*8 x(1000),y(1000),a(5) @@ -45,4 +48,13 @@ subroutine fst4_baseline(s,np,ia,ib,npct,sbase) sbase=10**(sbase/10.0) return -end subroutine fst4_baseline +end subroutine fst4_baseline_owned +end module fst4_baseline_workspace + +subroutine fst4_baseline(s,np,ia,ib,npct,sbase) + use fst4_baseline_workspace, only: fst4_baseline_owned + real s(np),sbase(np) + real, allocatable :: scratch(:) + allocate(scratch(np)) + call fst4_baseline_owned(s,np,ia,ib,npct,sbase,scratch) +end subroutine |
