ikeshwani / HorizontalConvection

2 stars 1 forks source link

Create function to calculate streamfunction #27

Closed ikeshwani closed 3 months ago

ikeshwani commented 3 months ago

$$ \frac{d\psi}{dz} = \int u dy = \Sigma u \Delta y $$

hdrake commented 3 months ago

Looks great!

Screenshot 2024-08-23 at 11 47 00 AM

Two minor suggestions: 1) add a labelled colorbar 2) reverse the colors of the colorbar so that counterclockwise circulations are blue not red. This is more consistent with the oceanographic literature where the counterclockwise AABW cell is always blue.

From Lumpkin and Speer (2007)

Screenshot 2024-08-23 at 11 49 13 AM
ikeshwani commented 3 months ago

How does this look? @hdrake

download-22

hdrake commented 3 months ago

Colors are a bit saturated but otherwise good! One trick is you can set the limits to (-max(abs(psi)), +max(abs(psi)) to always be guaranteed a nice-looking heatmap that is centered around 0.

hdrake commented 3 months ago

Would also be nice to include some contours of buoyancy overlaid on top of the heatmap!

ikeshwani commented 3 months ago

download-23

Hmm.. not sure if this is much better

hdrake commented 3 months ago

Yeah, I think that helps. You can see the streamfunction is stronger near the bottom where the plume drops down to.

It also will probably help to make the aspect ratio of the plot closer to the aspect ratio of the domain (8 times longer than it is deep).