# How do I plot a streamfunction for the UM?

**URL:** <https://forum.access-hive.org.au/t/how-do-i-plot-a-streamfunction-for-the-um/4685>\
**Category:** Earth System\
**Tags:** atmosphere, community-help\
**Created:** [10 July 2025 06:23 UTC](https://forum.access-hive.org.au/t/how-do-i-plot-a-streamfunction-for-the-um/4685 "2025-07-10T06:23:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jemmajeffree](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/jemmajeffree/32/228_2.png) [@jemmajeffree](https://forum.access-hive.org.au/u/jemmajeffree)\
**Post date:** [10 July 2025 06:23 UTC](https://forum.access-hive.org.au/t/how-do-i-plot-a-streamfunction-for-the-um/4685/1 "2025-07-10T06:23:47Z")

</div>

In theory I understand how streamfunctions work, but I’m having trouble migrating from ocean-model-land (where velocities are defined in m/s, and model levels are in m) to UM-atmosphere-model-land (where vertical velocities seem to be defined in Pa/s? maybe? or don’t exist? and vertical co-ordinates can be one of many things)

**How would I make a picture like the top half of the image below but using UM output?Specifically, what variables do I need to integrate over what dimensions, and are there any tricky unit conversions I need to consider?**  
I’m planning on working with ACCESS-CM3 output, but I imagine the broad idea is pretty generalisable.

 ![The-global-air-mass-overturning-stream-function-for-the-atmosphere-top-panel-and-global](https://us1.discourse-cdn.com/flex020/uploads/access1/original/2X/3/357cfa47ad6123e07172bc8ddcd1fb2d8dc3c664.jpeg)  
(Dey et al, 2019, _The coupled ocean–atmosphere hydrologic cycle_)

---

<div class="post-metadata">

**Author:** ![dkhutch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dkhutch/32/510_2.png) [@dkhutch](https://forum.access-hive.org.au/u/dkhutch)\
**Post date:** [15 July 2025 00:15 UTC](https://forum.access-hive.org.au/t/how-do-i-plot-a-streamfunction-for-the-um/4685/2 "2025-07-15T00:15:11Z")

</div>

Hi Jemma,  
I haven’t done it for the UM, but for GFDL to calculate a meridional overturning streamfunction in the atmosphere I have used Martin Jucker’s aostools:

> **[GitHub - mjucker/aostools: Helper functions for postprocessing and analysis of...](https://github.com/mjucker/aostools/tree/master)**
>
> master

Specifically, the functions `ComputePsi` and `ComputePsiXr` located within the `climate.py` code. Once you install the package (as per the instructions), you can load these tools by doing:

```auto
from aostools import climate

```

And then call the function like:

```auto
psi, psis = climate.ComputePsi(data=infile, outFileName=outfile)

```

Tagging @mjucker just in case of issues and also please thank Martin for his excellent code package if you find it useful.  
Dave
