I made an example of how I use shapely, geopandas, and regionmask to convert the closed sections output by sectionate into gridded masks that can be applied to calculate volume-integrals or area-averages. This is useful because the masks can be used to compute budgets for a region (heat, salt, thickness, momentum, etc.) and any divergence terms in the budget can then be re-expressed (using the Divergence Theorem) in terms of the boundary fluxes given by sectionate's MOM6_convergent_transport.
I think it would be nice to support these basic capabilities in sectionate, but it also could be a stand-alone package. What do you think @raphaeldussin @MDTocean?
I made an example of how I use
shapely
,geopandas
, andregionmask
to convert the closed sections output bysectionate
into gridded masks that can be applied to calculate volume-integrals or area-averages. This is useful because the masks can be used to compute budgets for a region (heat, salt, thickness, momentum, etc.) and any divergence terms in the budget can then be re-expressed (using the Divergence Theorem) in terms of the boundary fluxes given by sectionate'sMOM6_convergent_transport
.I think it would be nice to support these basic capabilities in
sectionate
, but it also could be a stand-alone package. What do you think @raphaeldussin @MDTocean?https://github.com/hdrake/sectionate/blob/divergence-theorem-test/examples/divergence_theorem_irregular_region.ipynb