 
             loutput = 5.6696e-8 * land[i] * land[i] * land[i] * land[i] * landOutputRatio * dS
 
-            ainput = shrtAirInput + (lngAbsorbAir + 1 - 1 / landOutputRatio) * loutput
+            ainput = shrtAirInput + landAbsorbAir * loutput
 
             atmpUpr = air[i] - 56
             aoutputBtm = 5.6696e-8 * air[i] * air[i] * air[i] * air[i] * dS

    lcapacity = (t) ->
        if t < 263.15
            2106
        else if t < 273.15
            33400
        else if t < 373.15
            4218
        else if t < 383.15
            225000
    acapacity = (t) -> 1005

    shtAbsorb = (t) ->


    lat = (j) -> Math.PI / 256 * (128 - j)

    rand = -> 1 + 2 * (Math.random() - 0.5) / 100

    avgt.init = (273.15 for i in [0...256])
    #avgt.init = (263.15 + 20 * Math.cos(lat(i)) for i in [0...256])
    #avgt.init = (303.15 for i in [0...256])

    avgt.evolve =  (data, energyIn) ->
        [gland, land, gair, air] = data
