Helpful functions for dealing with xarray and geopandas.
Jupyter Notebook
Geospatial utilities
Useful operations for manipulating xarray, geopandas, and numpy geospatial data
Creating grids from geospatial data
Grids are specified by centroid, height, width, rotation, and mesh. For numerical simulations, transform to numpy is always done such that causality goes from $[0,0]->[n,m]$ (red dot in diagram represents $[0,0]$ location). E.g., for modelling waves the rotation should be chosen depending on the angle of the coastline as follows:
Gaussian random fields
Sample GRF from $$\mathcal{N}(0, (\Delta + \tau I)^{-\alpha})$$