hainegroup / oceanspy

A Python package to facilitate ocean model data analysis and visualization.
https://oceanspy.readthedocs.io
MIT License
101 stars 32 forks source link

Generalize compute.mooring_volume_transport #363

Open ThomasHaine opened 1 year ago

ThomasHaine commented 1 year ago

I'm interested in generalizing the functionality provided by compute.mooring_volume_transport. I want to also compute property transports, like heat transport or salt transport etc.

Ideally, I want this function to work using a mooring path to minimize interpolation errors. E.g., I want to compute the boundary heat fluxes across a control volume in the ECCO dataset by integrating the ADV{x,y,r}_TH fields. For other datasets (like LLC_4320) there would need to be an interpolation step to compute Temp on the mooring path.

I don't think this functionality exists in OceanSpy currently, right?

If not, adapting compute.mooring_volume_transport seems like a good option. We'd just need to pass an extra argument defining the intensive property to integrate. If necessary, there would be an interpolation step. Then the computation would be modified by multiplying with the property value.

Is this a good idea?

Mikejmnez commented 1 year ago

I am very interested in this idea.

My understanding is that only volume transport is implemented, but like you said, it would be somewhat straightforward from there. Add a property value (temp, salt, perhaps momentum or even pv) plus a reference value.

ThomasHaine commented 1 year ago

Good to hear. @asiddi24, @malmans2, @MaceKuailv any comments? If not, I'll explore what's involved and ask @Mikejmnez for help.