PRO vmrtodu_int_cumoz, press_bounds, phi, plow, vmro3, total ; this is a program to convert from Volume Mixing Ratio to DU. It returns ; total ozone between phi and plo (phi is lowest layer in atmosphere, ; plo is highest level, ie lowest pressure level). phi and plo can ; be a vector or layers. ; press_bounds is defined as the boundaries of levels in which vmr03 is ; defined, and should be entered from top to bottom of the atmosphere. ; press_bounds should be entered in hPa. VMR is also top of atmosphere to ; bottom. ; define constants g=9.806 ;gravity (m/s2) ra=287.05 ;specific gas constant (J/kg/K) st=273.15 ;standard temperature (K) sp=101325. ;standard pressure(N/m2) ; compute delta pressure and convert to Pa np=n_elements(press_bounds)-1 delpr=(press_bounds(1:np)-press_bounds(0:np-1))*100. nlyrs=n_elements(phi) lyroz=fltarr(np) cumoz=fltarr(np) for k=0, np-1 do lyroz(k)=0.1*ra*st/g/sp*vmro3(k)*delpr(k) for k=0, np-1 do cumoz(k)=total(lyroz(0:k)) ; Interpolate cumulative ozone to requested layer boundaries boz=interpol(cumoz,alog(press_bounds(1:*)), alog(phi), /spline) toz=interpol(cumoz,alog(press_bounds(1:*)), alog(plow), /spline) total=boz-toz over: end