# proof of concept algorithm ''' lift the 2 meter above ground air temperatures using a dry adiabatic lapse rate of 9.8 C per 1000 meters until it reaches the adjusted* 2m dew point temperature for the same grid cell. ''' DALR = 9.8 / 1000. DPLR = 2.0 / 1000. LEVEL = 100. t = 23.1 td = 12.5 height = (t - td) / (DALR-DPLR) height = (int(height / LEVEL) + 1) * LEVEL print height