Remeshing the topography¶
Nowadays, high resolution topographic and bathymetric data are most of the time available. Processing this large amount of data can be a challenge. For example in Gocad, intersecting such surfaces with other surfaces can be time-consuming and error-prone. To overcome these kinds of difficulties, an idea is to coarsen the meshed topography where a fine resolution is not necessary, before working on the surfaces in Gocad.
As an illustration, we will process a netcdf file from GEBCO (http://www.gebco.net/). It has been used in Sumatra related simulations. It features a 400m resolution regular grid. Using the script createGOCADTSurfNXNY_netcdf.py, available here, we will downsample the data overall, project them and isolate a square region away from which a fine discretization is not necessary.
python createGOCADTSurfNXNY_netcdf.py data/GEBCO_2014_2D_90.0_1.5_97.0_14.5.nc trash.stl --subsample 2 --proj EPSG:32646 --hole 94 95 8 10
python convertinp2ts.py test.inp --isolate