# MOM6 automated post processing

**URL:** <https://forum.access-hive.org.au/t/mom6-automated-post-processing/1029>\
**Category:** COSIMA\
**Tags:** payu, postprocessing\
**Created:** [25 July 2023 12:37 UTC](https://forum.access-hive.org.au/t/mom6-automated-post-processing/1029 "2023-07-25T12:37:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashjbarnes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/ashjbarnes/32/205_2.png) [@ashjbarnes](https://forum.access-hive.org.au/u/ashjbarnes)\
**Post date:** [25 July 2023 12:37 UTC](https://forum.access-hive.org.au/t/mom6-automated-post-processing/1029/1 "2023-07-25T12:37:31Z")

</div>

Is there an elegant way to automatically run a post processing script (say via payu) on running mom6? Quick look at documentation didn’t suggest so but thought I’d ask. Could fork payu and add modify but don’t want to reinvent the wheel!

My specific case: I want 3D hourly outputs totalling 5Tb per year. After post processing this is reduced to more like 200-500gb for my study region

I’ve gotten mom6’s regional diagnostics working before but it is fairly cursed so I would rather output the whole domain every 15 days, process, save, delete and move on

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [25 July 2023 13:03 UTC](https://forum.access-hive.org.au/t/mom6-automated-post-processing/1029/2 "2023-07-25T13:03:15Z")

</div>

> [@ashjbarnes](#):
>
> Is there an elegant way to automatically run a post processing script (say via payu) on running mom6?

Yes. There are a number of “hooks” where you can run scripts at various points. See the “postprocessing” section:

[https://payu.readthedocs.io/en/latest/config.html#postprocessing](https://payu.readthedocs.io/en/latest/config.html#postprocessing)

If you want to do this after collation then you’ll need to use `postscript`, which will only accept a script as an argument which will be submitted to the queue.

The COSIMA configs all use `postscript` to sync data to `/g/data` (when it is enabled)

> <https://github.com/COSIMA/01deg_jra55_iaf/blob/master/config.yaml#L77>

---

<div class="post-metadata">

**Author:** ![ashjbarnes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/ashjbarnes/32/205_2.png) [@ashjbarnes](https://forum.access-hive.org.au/u/ashjbarnes)\
**Post date:** [26 July 2023 07:00 UTC](https://forum.access-hive.org.au/t/mom6-automated-post-processing/1029/3 "2023-07-26T07:00:28Z")

</div>

Thanks so much Aidan! Sorry that I didn’t see this - in my googling I landed on this page

[https://payu.readthedocs.io/en/latest/usage.html#postprocessing](https://payu.readthedocs.io/en/latest/usage.html#postprocessing)

and assumed this was the extent of the postprocessing documentation. This is far more comprehensive
