mapgwm.swb module

mapgwm.swb.get_monthly_means(ncfile, outfile, filter=None, check_results=True)[source]

Get monthly mean values for a netcdf file with a time variable ‘time’ and write them to another netcdf file. Use dask if it is installed to limit memory required and distribute to cores.

Parameters
ncfilestr

Path to input netcdf file. Assumed to have variable ‘net_infiltration’ that is compressed in the output file.

outfilestr

Path of output netcdf file.

filtertuple of floats

Bounding box of area to subset from ncfile (left, bottom, right, top). By default, none (entire area is retained in output file).

check_resultsbool, optional

Check that the monthly values written to the output file match those in memory.