def lower_DEM(infile, outfile, dZ): if (not os.path.isfile(outfile)): (X, Y, Z) = gt.topofile2griddata(infile) Z = Z - dZ gt.griddata2topofile(X, Y, Z, outfile, topotype=3)
def clip_DEM(infile, outfile, elevation): if (not os.path.isfile(outfile)): (X, Y, Z) = gt.topofile2griddata(infile) Z[np.where(Z > elevation)] = -9999 gt.griddata2topofile(X, Y, Z, outfile, topotype=3)
def make_m0_DEM(infile, outfile, m0): if (not os.path.isfile(outfile)): (X, Y, Z) = gt.topofile2griddata(infile) Z = 0. * Z + m0 gt.griddata2topofile(X, Y, Z, outfile, topotype=3)