def get_bareground_mask(bareground_ds, bareground_thresh=<NUM_LIT>, out_fn=None):
print("<STR_LIT>")<EOL>b = bareground_ds.GetRasterBand(<NUM_LIT:1>)<EOL>l = b.ReadAsArray()<EOL>print("<STR_LIT>" % bareground_thresh)<EOL>if bareground_thresh < <NUM_LIT:0.0> or bareground_thresh > <NUM_LIT>:<EOL><INDENT>sys.exit("<STR_LIT>")<EOL><DEDENT>mask = (l>bareground_thresh)<EOL>if out_fn is not None:<EOL><INDENT>print("<STR_LIT>" % out_fn)<EOL>iolib.writeGTiff(l, out_fn, bareground_ds)<EOL><DEDENT>l = None<EOL>return mask<EOL>
Generate raster mask for exposed bare ground from global bareground data