c $Header: /usr/people/flittner/radtran/tomrad/pv2.2/src/RCS/set_p11_z11_spline.f,v 2.22 2000/08/30 16:38:09 flittner Exp $ subroutine set_p11_z11_splines() c c*****perform a spline fit to log(p) and z c include 'parameter.inc' include 'atm_11.cmn' include 'input.cmn' include 'switches.cmn' c local integer mode real*8 y21,y2n,const c if(lv7tab)then mode=0 y21=1.0d30 y2n=1.0d30 call spline(z11,plginv,n_p_lay,y21,y2n,cz,mode) call spline(plginv,z11,n_p_lay,y21,y2n,cp,mode) else mode=0 y21=1.0d30 y2n=1.0d30 call spline(z11,plginv,n_p_lay,y21,y2n,cz,mode) c mode=0 const=1.0/(-34.163) cc use upper 2 average temperatures to compute the boundary value for the cc spline fit at the top of the atmosphere in hopes that it will cause cc the fit to behave better. c y2n=1.5*(z11(n_p_lay)-z11(n_p_lay-1))/const/(plginv(n_p_lay)-plginv(n_p_lay-1))/ c &((1.0+0.5*(z11(n_p_lay)+z11(n_p_lay-1))/r)**2)- c &0.5*(z11(n_p_lay-1)-z11(n_p_lay-2))/const/(plginv(n_p_lay-1)-plginv(n_p_lay-2))/ c &((1.0+0.5*(z11(n_p_lay-1)+z11(n_p_lay-2))/r)**2) c y2n=y2n*const y2n=1.0d30 cc use the surface temperature from the us76 std atmo c y21=288.15*const y21=tmpsfc*const call spline(plginv,z11,n_p_lay,y21,y2n,cp,mode) endif end