pro totpre, pres, w, nl, intppw, precip_h2o precip_h2o=0.0 ; ; Calculates the total precipitable water for a given ; radiosonde. ; Convert p from mb to Pa and w from kg/g to g/g ; Set up size of c. ; p=pres*100. w=w/1000. intppw=fltarr(nl) intppw(nl-1)=0.0 for i=nl-1,1,-1 do begin dp=p(i)-p(i-1) w_mean=0.5*(w(i)+w(i-1)) precip_h2o = precip_h2o + w_mean*dp intppw(i-1)=precip_h2o/98.1 endfor ; Convert from kg m-2 to cm precip_h2o = precip_h2o/98.1 end