Index: wflow-py/wflow/wflow_lib.py =================================================================== diff -u -ra8927febfc0e3f567b5f5dddff0cb6ef139ad8e7 -r4efaa4c2e535431943e073dca2c8a31a334f8a77 --- wflow-py/wflow/wflow_lib.py (.../wflow_lib.py) (revision a8927febfc0e3f567b5f5dddff0cb6ef139ad8e7) +++ wflow-py/wflow/wflow_lib.py (.../wflow_lib.py) (revision 4efaa4c2e535431943e073dca2c8a31a334f8a77) @@ -51,6 +51,23 @@ import gzip, zipfile + +def sum_list_cover(list_of_maps, covermap): + """ + Sums a list of pcrastermap using cover to fill in missing values + + :param list_of_maps: list of maps to sum + :param covermap: maps/ value to use fro cover + + :return: sum of list of maps (single map) + """ + sum_ = cover(0.0) + for map in list_of_maps: + sum_ = sum_ + cover(map,covermap) + + return sum_ + + def idtoid(sourceidmap, targetidmap,valuemap): """ tranfer the values from valuemap at the point id's in sourceidmap to the areas in targetidmap.