UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
259 stars 385 forks source link

Fix albedo averaging #690

Closed dgergel closed 7 years ago

dgergel commented 7 years ago

Currently albedo is being treated differently in the CESM driver versus in put_data.c for the other drivers. In put_data.c in ~shared_all, we write albedo as:

    /** record albedo **/
    if (snow.snow && overstory) {
        out_data[OUT_ALBEDO][0] += energy.AlbedoOver * AreaFactor;
    }
    else {
        out_data[OUT_ALBEDO][0] += energy.AlbedoUnder * AreaFactor;
    }

Whereas in the CESM driver in cesm_put_data.c, we write albedo as:

                // albedo: direct, visible
                // CESM units: unitless
                // force->shortwave is the incoming shortwave (+ down)
                // force->NetShortAtmos net shortwave flux (+ down)
                // SWup = force->shortwave[NR] - energy.NetShortAtmos
                // Set the albedo to zero for the case where there is no shortwave down
                if (force[i].shortwave[NR] > 0.) {
                    albedo = AreaFactor *
                             (force[i].shortwave[NR] - energy.NetShortAtmos) /
                             force[i].shortwave[NR];
                }
                else {
                    albedo = 0.;

This issue is a reminder that at some point we should address this difference.

bartnijssen commented 7 years ago

Please be more specific when you open an issue. Explain what is not correct about the current averaging procedure and if possible suggest a way to fix it. As is, the issue is not actionable by anyone other than the person opening the issue, which is not sufficient.

dgergel commented 7 years ago

Thanks @bartnijssen, I've updated it to be more specific.

dgergel commented 7 years ago

Closed via #712 and #718