subroutine cnstnts c c*********************************************************************** c c cnstnts september, 2001 charlie wellemeyer ssai c c purpose c initializes various constant parameters used in the retrieval c c calling sequence c call cnstsnts c c common areas c absoft, contrl, lpoly, prfprm, pterp, satnams c c calling routine start c c subroutines called coffs c c modifications c c Sept 2004: c Add a switch between n14 fix mode and zigzag mode for absorption c crossection paramters for the temperature correction to dndx c LK Huang c c*********************************************************************** c implicit none c real*4 xdenom integer i, j, jmax, k, l, ic c integer n, nc, ns, nitr, nref parameter (n = 81, nc = 10, ns = 8, nitr = 8, nref = 1690) real p_top, p_bottom, h, r !pressure at top & bottom of atmosphere ! (atmos), constant scale height (cm), ! radius of Earth (cm) parameter (p_top = 1.0e-4, p_bottom = 1.0, h = 7.996e5, 1 r = 6.378e8) real delz, cons c include 'absoft.com' include 'contrl.com' include 'lpoly.com' include 'pterp.com' include 'prfprm.com' include 'satnams.h' c c define total ozone parameters c c load appropriate absorption temperature coefficients into arrays c do i=1,8 c0(i) = 0.0 c1(i) = 0.0 c2(i) = 0.0 enddo if(n07()) then do i=1,8 c0(i) = c0n07(i) c1(i) = c1n07(i) c2(i) = c2n07(i) enddo else if(n09()) then do i=1,8 c0(i) = c0n09(i) c1(i) = c1n09(i) c2(i) = c2n09(i) enddo else if(n11()) then do i=1,8 c0(i) = c0n11(i) c1(i) = c1n11(i) c2(i) = c2n11(i) enddo else if(n14()) then if(wlenth(2) .ge. 273.46 .and. wlenth(2) .le. 273.56) then do i=1,8 c0(i) = c0n14(i) c1(i) = c1n14(i) c2(i) = c2n14(i) enddo else do i=1,8 c0(i) = c0n14a(i) c1(i) = c1n14a(i) c2(i) = c2n14a(i) enddo endif else if(n16()) then do i=1,8 c0(i) = c0n16(i) c1(i) = c1n16(i) c2(i) = c2n16(i) enddo else if(n17()) then do i=1,8 c0(i) = c0n17(i) c1(i) = c1n17(i) c2(i) = c2n17(i) enddo else if(n18()) then do i=1,8 c0(i) = c0n18(i) c1(i) = c1n18(i) c2(i) = c2n18(i) enddo else if(n19()) then if(abs(wlenth(12)-343) .lt. 0.6) then do i=1,8 c0(i) = c0n19n(i) c1(i) = c1n19n(i) c2(i) = c2n19n(i) enddo else if(abs(wlenth(12)-335) .lt. 0.6) then do i=1,8 c0(i) = c0n19m(i) c1(i) = c1n19m(i) c2(i) = c2n19m(i) enddo else do i=1,8 c0(i) = c0n19(i) c1(i) = c1n19(i) c2(i) = c2n19(i) enddo endif else if(ssbuv()) then do i=1,8 c0(i) = c0ssb(i) c1(i) = c1ssb(i) c2(i) = c2ssb(i) enddo else if(n04()) then do i=1,8 c0(i) = c0n04(i) c1(i) = c1n04(i) c2(i) = c2n04(i) enddo endif c c**** compute denominators for l-coeffs c do 500 j=1,7 jmax=j+3 l=0 do 500 k=j,jmax l=l+1 xdenom=1.0 do 400 i=j,jmax if(i.eq.k) go to 400 xdenom=(xzlog(k)-xzlog(i))*xdenom 400 continue densol(l,j)=xdenom 500 continue c c**** compute denominators for l-coeffs for pressure interpolation c do 750 k=1,4 xdenom=1.0 do 725 i=1,4 if(i.eq.k) go to 725 xdenom=(logpr(k)-logpr(i))*xdenom 725 continue denprs(k)=xdenom 750 continue c c define profile algorithm parameters c c c Specify z & p_lvl c delz = h*log(p_bottom/p_top)/(n - 1) do i = 1,81 z(i) = delz*(i - 1) p_lvl(i) = p_bottom*exp(-z(i)/h) end do c c Compute optical coefficients (assume center wavelengths do c not change) c do ic=1,nc wvl_c(ic) = wlenth(ic) enddo delwvl = 1.132 !this is an input number c call coffs(wvl_c, delwvl, a0, a1, a2, b, p0, p2, w, nc, ns) c c o Define cov_e c cons = -100/log(10.0) do i = 1,nc cov_e(i,i) = (cons*sigmae)**2 !sigmae is the fractional error in ! radiance/flux if(iopts(i+10)) cov_e(i,i) = cov_e(i,i) * 10.0 ** 6.0 do k = 1,i-1 cov_e(i,k) = 0.0 cov_e(k,i) = 0.0 end do end do do i = 1,nc cov_e0(i) = cov_e(i,i) !save diagonal elements of cov_e end do c c o define rad_m0, krngr_mu & krncl_mu c do i = 1,nc rad_m0(i) = 0.0 end do do i = 1,10 do j = 1,11 krngr_mu(i,j) = 0.0 krncl_mu(i,j) = 0.0 end do end do c return c end