1 |
jscott |
1.1 |
|
2 |
|
|
#include "ctrparam.h" |
3 |
|
|
|
4 |
|
|
subroutine senint(s) |
5 |
|
|
parameter(nsen=200) |
6 |
|
|
common/cldfdb/coefcl(3),CLDFEED,SEN_dat |
7 |
|
|
logical CLDFEED |
8 |
|
|
character * 120 SEN_dat |
9 |
|
|
dimension sens(nsen),cfcl(nsen) |
10 |
|
|
data ifisrt /0/ |
11 |
|
|
if(ifirst.eq.0) then |
12 |
|
|
open (543,file=SEN_dat,form='formatted',status='old') |
13 |
|
|
do i=1,nsen |
14 |
|
|
read (543,*,end=500),cfcl(i),sens(i) |
15 |
|
|
c read (543,100),cfcl(i),sens(i) |
16 |
|
|
enddo |
17 |
|
|
500 continue |
18 |
|
|
nsenr=i-1 |
19 |
|
|
ifirst=1 |
20 |
|
|
print *,' Number of points in SEN_dat file ',nsenr |
21 |
|
|
endif |
22 |
|
|
if(s.lt.sens(1))then |
23 |
|
|
ip=2 |
24 |
|
|
go to 200 |
25 |
|
|
elseif(s.ge.sens(nsenr))then |
26 |
|
|
ip=nsenr |
27 |
|
|
go to 200 |
28 |
|
|
endif |
29 |
|
|
do i=1,nsenr |
30 |
|
|
if(s.lt.sens(i))then |
31 |
|
|
ip=i |
32 |
|
|
go to 200 |
33 |
|
|
endif |
34 |
|
|
enddo |
35 |
|
|
200 continue |
36 |
|
|
im=ip-1 |
37 |
|
|
cf=(cfcl(im)*(sens(ip)-s)+cfcl(ip)*(s-sens(im))) |
38 |
|
|
& /(sens(ip)-sens(im)) |
39 |
|
|
do i=1,3 |
40 |
|
|
coefcl(i)=cf |
41 |
|
|
enddo |
42 |
|
|
100 format(f9.6,f5.2) |
43 |
|
|
return |
44 |
|
|
end |