ocmw.design.gradRaster module¶
Mesh gradation raster generation functions for parameter-based mesh refinement.
Write raster to netCDF file. |
|
Get raster coordinates from netCDF file and generate gidded coordinates. |
|
Normalise a variable about its mean value. |
|
Convert a raster into a gradation between minimum and maximum values. |
|
Convert a gradation raster into an equivalent mesh density assuming equilateral triangles. |
|
Convert a gradation raster into an equivalent number of element assuming equilateral triangles. |
|
Calculate the distance for a set of points (x,y) from features in a coastline shapefile. |
|
Convert a variable on an unstructured mesh into a raster. |
|
Calculate the spatial gradient of a mesh variable on a regular raster. |
|
Plot as raster as a colourised image. |
Mesh refinement functions for QMESH mesh gradation raster generation.
- ocmw.design.gradRaster.writeRasterFile(rasterPath, baseRasterFile, rasterFile, raster)[source]¶
Write raster to netCDF file.
- ocmw.design.gradRaster.getRasterCoords(rasterPath, rasterFile)[source]¶
Get raster coordinates from netCDF file and generate gidded coordinates.
- ocmw.design.gradRaster.gradate(minval, maxval, var)[source]¶
Convert a raster into a gradation between minimum and maximum values.
- ocmw.design.gradRaster.gradation2meshDensity(gradation)[source]¶
Convert a gradation raster into an equivalent mesh density assuming equilateral triangles.
- ocmw.design.gradRaster.gradation2numElems(gradation, dx, dy)[source]¶
Convert a gradation raster into an equivalent number of element assuming equilateral triangles.
- ocmw.design.gradRaster.distance2coast(shpPath, shpFile, BndIDs, x, y)[source]¶
Calculate the distance for a set of points (x,y) from features in a coastline shapefile.
- ocmw.design.gradRaster.rasterise(x, y, v, xq, yq)[source]¶
Convert a variable on an unstructured mesh into a raster.