! Test of smoothing splines with confidence intervals ! development version 28/1/06 ! ! file 0-ts/ch4spl.f90 ! ! include "splinecd.f90" include "xspline.f90" ! ...................................................... ! Inputs from file spline.dat ! filename (for data) ! nt, t0, dt, Lambda ! ncase ! wc, wd (ncase lines of this) ! program spline use sp_spline use sep_case character (1) sh real reg write(*,*) 'Spline fit to CH4' call sp_init(0,0, 50.0) reg = 30.0 call sp_setreg(reg) call sp_settab(1000.0, 10.0, 97) call sp_addwt(1.0, 0.0) ! function call sp_addwt(0.0, 1.0) ! derivative call sp_addwt(0.1, 1.0) ! source? open(unit = 11, file = 'ch4law.dat') read(11,*) nd, nc write(*,*) nd, nc rs = nd dt = 1000.0/rs rs = dt*reg rs = sqrt(rs) rs = sqrt(rs) t05 = 2.0*3.14159*rs write(*,*) '% 50% cuttoff at ',t05 do 2 j =1 ,nc read(11,*) sh write(*,*) sh 2 continue np = -1000 do 3 j = 1,nd read(11,*) nt, cx write(*,*) nt, cx tt = nt call sp_addnode1(tt,cx,0.3) 3 continue close(11) call sp_process ! call sp_outfit call sp_specs ! call sp_casespec call sp_calcvals call sp_calcvars ! call sp_outcase(1) ! call sp_outcase(2) ! call sp_outcase(3) call sp_outrange(1,1.0) call sp_outrange(2,1.0) call sp_outrange(3,1.0) ! call sp_out(2) call sp_err('% end') stop end program