MOM6-community / sectionate

compute section in ocean models
GNU General Public License v3.0
8 stars 7 forks source link

Add capabilities for converting from closed sections to gridded masks (and vice versa) #12

Closed hdrake closed 1 year ago

hdrake commented 1 year ago

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?

https://github.com/hdrake/sectionate/blob/divergence-theorem-test/examples/divergence_theorem_irregular_region.ipynb

hdrake commented 1 year ago

I'm creating a second package regionate for these capabilities.