About... Prerequisites Examples Home Bugs Download Manual Links

Example 6

    import Numeric
    from pyclimate.asciidat import readcol
    from pyclimate.atmosphericmoisture import *
    
    # Load the pressure level data
    P = readcol("data/sounding98060400.dat",1)
    T = readcol("data/sounding98060400.dat",2)
    Td = readcol("data/sounding98060400.dat",3)
    dpd = T-Td
    
    levels = len(P)
    
    rh = Numeric.zeros((levels,),Numeric.Float64)
    ppw = Numeric.zeros((levels,),Numeric.Float64)
    for i in xrange(levels):
      rh = dewpointdepression2rh(dpd[i],P[i],T[i])
      ppw = q2e(rh2shum(rh,P[i],T[i]),P[i])
      Tv = T[i]/(1.-(ppw/P[i])*(1-epsilon))
      print P[i], rh, ppw, Tv
    



Contact the
Webmaster