def get_icemask(ds, glac_shp_fn=None):
print("<STR_LIT>")<EOL>if glac_shp_fn is None:<EOL><INDENT>glac_shp_fn = get_glacier_poly()<EOL><DEDENT>if not os.path.exists(glac_shp_fn):<EOL><INDENT>print("<STR_LIT>" % glac_shp_fn)<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>" % glac_shp_fn)<EOL><DEDENT>icemask = geolib.shp2array(glac_shp_fn, ds)<EOL>return icemask<EOL>
Generate glacier polygon raster mask for input Dataset res/extent