We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Todo:
Start with something like this:
import xarray as xr import dfm_tools as dfmt # input crs = 'EPSG:4326' # domain and resolution lon_min, lon_max, lat_min, lat_max = -68.55, -67.9, 11.8, 12.6 dxy = 0.05 # grid generation and refinement with GEBCO bathymetry file_nc_bathy = r'http://opendap.deltares.nl/thredds/dodsC/opendap/deltares/Delft3D/netcdf_example_files/GEBCO_2022/GEBCO_2022_coarsefac08.nc' data_bathy = xr.open_dataset(file_nc_bathy) data_bathy_sel = data_bathy.sel(lon=slice(lon_min,lon_max),lat=slice(lat_min,lat_max)) data_bathy_sel["elevation"] = data_bathy_sel["elevation"].astype("int16") # basegrid mk_object = dfmt.make_basegrid(lon_min, lon_max, lat_min, lat_max, dx=dxy, dy=dxy, crs=crs) # refine (fails if wrong type) min_edge_size = 300 #in meters dfmt.refine_basegrid(mk=mk_object, data_bathy_sel=data_bathy_sel, min_edge_size=min_edge_size) # optional plot import matplotlib.pyplot as plt plt.close('all') import contextily as ctx fig, ax = plt.subplots() mk_object.mesh2d_get().plot_edges(ax=ax,linewidth=1) ctx.add_basemap(ax=ax, crs=crs, attribution=False) dfmt.plot_coastlines(ax=ax, crs=crs)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Todo:
Start with something like this:
The text was updated successfully, but these errors were encountered: