COSIMA / cosima-recipes

A cookbook of recipes (i.e., examples) for analysing ocean and sea ice model output
https://cosima-recipes.readthedocs.io
Apache License 2.0
46 stars 66 forks source link

Mass transport stream functions in any arbitrary pair of coordinates #180

Open navidcy opened 1 year ago

navidcy commented 1 year ago

I’d like to write a code to calculate mass transport stream functions in any arbitrary pair of coordinates. I have a proof of concept notebook and would love to spend some time with smart people helping to figure out how to make it work efficiently and conveniently for others.

[by @janzika from https://forum.access-hive.org.au/t/cosima-hackathon-january/142/4]

janzika commented 1 year ago

Okay so I have a code that is able to compute a mass stream function for T and S and in principle should work for any 2 scalar variables. The key things remaining are to 1) make it cleaner, 2) make it faster (it is quite slow and I'd like to make it work on the 1/10th degree model) and 3) make it work for arbitrary variables (like depth, latitude, density) and 4) comment it nicely. Is anyone willing to take a look with me after the tutorials (maybe in a zoom breakout). Particularly keen for people that a) feel like solving some fun coding puzzles and b) know the capabilities of task/xarray for binning/sorting/conditional averaging.

adele-morrison commented 1 year ago

@claireyung @navidcy @edoddridge @rbeucher any takers?

atteggiani commented 1 year ago

I don't have much ocean background but have been using xarray/dask quite a lot and I'm super keen to solve coding puzzles, so I'd be interested to join this task!

rmholmes commented 1 year ago

@atteggiani I'm sure @janzika would love to chat with you.

janzika commented 1 year ago

yes @atteggiani it would be great to chat. I am in the xgcm room now...

atteggiani commented 1 year ago

I just got to the room @janzika

rmholmes commented 1 year ago

There are many more breakout rooms (rooms 5-10). Feel free to use one.

atteggiani commented 1 year ago

Sorry @janzika I was sorting out something here in the office. Are you in any other breakout room?