Replies: 1 comment 2 replies
-
Hi @AH-CSM; If you have vertex information stored in your from flopy.utils import Raster
rstr = Raster.load("my_dem_raster.tif")
top_elevs = rstr.resample_to_grid(
modelgrid,
band=rstr.bands[0],
method="min" # methods supported are "min", "max", "median", "mean", "nearest", "linear", "cubic"
)
botm_elev = np.zeros((modelgrid.nnodes))
botm_elev = top_elevs - layer_thickness
# then update the top and botm elevations in your flopy DISU object using the new values
# Note: if you're working with MF-USG and are using the layered option, you may need to reshape your botm_elevations to be consistent
# with the number of cells per layer There's a notebook showing the Raster resampling process, here: raster_intersection. Some good tutorials can also be found in the python for hydrology repository here: python-for-hydrology, flopy |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I am trying to set up my model so that the elevation data within the raster file I am importing can be used as the top of the model grid. I am doing this because I am trying to set my bottom thicknesses from the top down in layering. The current model will not let me do it because the layer bottoms I want for my model are consistently above SOME of my raster data elevation. In the real world, this would be a pinched-off layer but I am not sure how to set this up in a structured or unstructured grid way to implement raster data for my model top. Any advice is greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions