c c c c
```c
program interpolate
implicit none
c
c     Demonstation of 2 simple interpolation methods for
c     smoothly joining results from 2 disjoint regions
c
c     John Mahaffy 2/3/96
c
c    Open up two files in your current directory to receive results
c
open(10,file='nuwlin')
open(11,file='nuwcube')
c
c   First a linear weighted transition
c
call nuwlin
c
c   Next a cubic weighted transition
c
call nuwcube
c
c   If you are in Hammond Lab, change this subroutine to plot results
c
call plotit
c
stop
end
c
subroutine nuwlin
implicit none
real Nulam,Nuturb,Pr,Re,w,Nu
real Re1,Re2,rwfac
c
c   Demonstration of linearly weighted transition region
c   Calculation of Nusselt Number  with weighted transition
c   in Re1
parameter (Pr=1.0,Nulam=4.0,Re1=640,Re2=2000.,rwfac=1./(Re2-Re1))
c
c
Re=0.0
c
c    Evaluate the Nusselt number over the range 0.<=Re<=3000.
c
do 100 while (Re.le.3000.)
if(Re.lt.Re1) then
Nu = Nulam
else if (Re.gt.Re2)  then
Nu=Nuturb(Re,Pr)
else
w = (Re - Re1)*rwfac
Nu = (1.-w)*Nulam + w*Nuturb(Re,Pr)
endif
write(10,*)Re,Nu
Re=Re+10.
100 continue
return
end
subroutine nuwcube
implicit none
real Nuturb,Nulam,Pr,Re,w,SRe,Re1,Re2, Nu
c
c   Demonstration of cubic weighting in transition zone
c   Calculation of Nusselt Number  with weighted transition
c   in Re1
c
c
c
```