def readVariable(model, state, alat, alon, veg, bands, nlayer, varname):
    readfun = {'swe': _readSwe,
               'soil_moist': _readSoilMoist, 'snow_cover': _readScf}
    out = np.zeros((len(alat), 1))
    for i in range(len(alat)):
        k = model.lgid[(alat[i], alon[i])]
        nveg = len(veg[k])
        nbands = len(bands[k])
        for vi in range(nveg + 1):
            for bi in range(nbands):
                # cell = state[k][2+vi+vi*nbands+bi]
                cell = state[k][1 + vi * nbands + bi]
                if vi < nveg:
                    out[i] += veg[k][vi] * bands[k][bi] * \
                        readfun[varname](cell, nlayer, False)
                else:
                    out[i] += (1.0 - sum(veg[k])) * bands[k][bi] * \
                        readfun[varname](cell, nlayer, True)
    return out
If a message is specified as C{None}, it is not included in the error
dataset/ETHPy150Open nasa/RHEAS/src/vic/state.py/readVariable--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/trial/test/test_assertions.py/TestSynchronousAssertions.test_assertEqualNoneMessage