# Non-closure of heat budget in ACCESS-CM2 ESMF/CMIP output

**URL:** <https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244>\
**Category:** Coupled Model\
**Tags:** model-evaluation, access-cm2, budget\
**Created:** [6 December 2022 05:13 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244 "2022-12-06T05:13:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![taimoorsohail](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/taimoorsohail/32/201_2.png) [@taimoorsohail](https://forum.access-hive.org.au/u/taimoorsohail)\
**Post date:** [6 December 2022 05:13 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/1 "2022-12-06T05:13:36Z")

</div>

Hi everyone,

Now that this forum exists, I was hoping I could flag an issue that was uncovered a couple years ago but was languishing in my to-do list regarding the ACCESS-CM2 runs.

It looks like the time-integrated heat flux into the ocean (‘hfds’ variable) does not equal the time-integrated ocean heat content (calculated using the ‘thetao’ variable), in both the historical and piControl runs. I should note that this is NOT an issue in the raw outputs, just in the published CMIP data. Here’s the mismatch in the historical runs:

![hfds_nonclosure](https://us1.discourse-cdn.com/flex020/uploads/access1/original/1X/a800dcadca67404bbb1df701a3c030721defdd53.png)

In the piControl runs, @rmholmes found that the non-closure is because some terms are neglected in the ‘hfds’ calculation:

 ![access_heat_budget_closure](https://us1.discourse-cdn.com/flex020/uploads/access1/original/1X/eb80081f499229ed933cd351e0702ff31925bc37.png)

where

```auto
cube_dict['ryan-hfds'] = cube_dict['sfc-hflux-from-runoff'] + \
                         cube_dict['sfc-hflux-coupler'] + \
                         cube_dict['sfc-hflux-pme'] + \
                         cube_dict['frazil-3d']
cube_dict['abhi-hfds'] = cube_dict['sfc-hflux-from-runoff'] + \
                         cube_dict['sfc-hflux-coupler'] + \
                         cube_dict['sfc-hflux-from-water-evap'] + \
                         cube_dict['sfc-hflux-from-water-prec'] + \
                         cube_dict['frazil-2d']

```

It would be great if this issue could be identified and resolved – closure of the heat budget is necessary for any model validation use-cases!

---

<div class="post-metadata">

**Author:** ![rmholmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/rmholmes/32/117_2.png) [@rmholmes](https://forum.access-hive.org.au/u/rmholmes)\
**Post date:** [6 December 2022 05:26 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/2 "2022-12-06T05:26:50Z")

</div>

Thanks @taimoorsohail.

Just to clarify for others - the problem is with the pre-processing that computes the ESMF/CMIP output variable hfds from the raw MOM5 output diagnostics. The old calculation (“abhi-hfds” above) did not include frazil formation below the surface layer (frazil-2d vs. frazil-3d) or some components of the heat flux associated with surface volume fluxes (a few terms to do with ice-ocean fluxes). The “ryan-hfds” calculation above correctly includes all of these terms.

Technical note: To close the heat budget exactly you should technically also be comparing the time integral of area-integrated hfds to _snapshots_ of the global OHC, not _time-averages_ of OHC. This point is minor compared to the difference that Taimoor is showing above in the first plot, as shown by the second plot.

---

<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:** [15 December 2022 00:29 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/3 "2022-12-15T00:29:43Z")

</div>

> [@rmholmes](#):
>
> Just to clarify for others - the problem is with the pre-processing that computes the ESMF/CMIP output variable hfds from the raw MOM5 output diagnostics.

@MartinDix I assumed the “pre-processing” referred here was Chloe’s [ACCESS-Archiver](https://git.nci.org.au/cm2704/ACCESS-Archiver), but I can’t find any mention of it in the gitlab repo. Where is this calculation done? It seems like a bug which should be fixed.

---

<div class="post-metadata">

**Author:** ![Paola-CMS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/paola-cms/32/57_2.png) [@Paola-CMS](https://forum.access-hive.org.au/u/Paola-CMS)\
**Post date:** [6 March 2023 22:05 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/4 "2023-03-06T22:05:31Z")

</div>

This is actually quite easy to fix, as the calculation is defined in a mapping file.

hfds,yes,sfc\_hflux\_from\_runoff sfc\_hflux\_coupler sfc\_hflux\_from\_water\_evap sfc\_hflux\_from\_water\_prec frazil\_2d,var[0]+var[1]+var[2]+var[3]+var[4],W m-2,both,ocean

just need to update this line, I’ve asked @sam.green to do it and do a pull\_request.

hfds,yes,sfc\_hflux\_from\_runoff sfc\_hflux\_coupler sfc\_hflux\_from\_water\_evap sfc\_hflux\_from\_water\_prec frazil\_2d,var[0]+var[1]+var[2]+var[3],W m-2,both,ocean

---

<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:** [6 March 2023 22:29 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/5 "2023-03-06T22:29:01Z")

</div>

> [@Paola-CMS](#):
>
> just need to update this line, I’ve asked @sam.green to do it and do a pull\_request.

Awesome!

To be clear, it is this line in `APP4`?

> **[input\_files/master\_map.csv · master · Chloe Mackallah / APP4 · GitLab](https://git.nci.org.au/cm2704/APP4/-/blob/master/input_files/master_map.csv#L195)**
>
> NCI Git Service

Also the tool would need to be re-run for this field and the ESGF data updated. @chloemackallah is this still your area of responsibility, or does this need to be directed to someone else?

---

<div class="post-metadata">

**Author:** ![Paola-CMS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/paola-cms/32/57_2.png) [@Paola-CMS](https://forum.access-hive.org.au/u/Paola-CMS)\
**Post date:** [6 March 2023 23:02 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/6 "2023-03-06T23:02:54Z")

</div>

That’s a line in a configuration file of the APP4.

---

<div class="post-metadata">

**Author:** ![taimoorsohail](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/taimoorsohail/32/201_2.png) [@taimoorsohail](https://forum.access-hive.org.au/u/taimoorsohail)\
**Post date:** [6 March 2023 23:23 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/7 "2023-03-06T23:23:05Z")

</div>

Hi @Paola-CMS thank you for working on this issue! Just to clarify, I think the variable that should be used is `frazil-3d` not `frazil-2d` as the `-3d` file includes subsurface frazil formation.

---

<div class="post-metadata">

**Author:** ![rmholmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/rmholmes/32/117_2.png) [@rmholmes](https://forum.access-hive.org.au/u/rmholmes)\
**Post date:** [6 March 2023 23:37 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/8 "2023-03-06T23:37:50Z")

</div>

Note that `frazil_3d` is a 3d variable and has to be summed in the vertical. Note also the change from `sfc-hflux-from-water-evap+sfc-hflux-from-prec` to `sfc-hflux-pme`

---

<div class="post-metadata">

**Author:** ![Paola-CMS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/paola-cms/32/57_2.png) [@Paola-CMS](https://forum.access-hive.org.au/u/Paola-CMS)\
**Post date:** [6 March 2023 23:58 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/9 "2023-03-06T23:58:57Z")

</div>

I spotted the different variables, about the 3d-frazil we might need to add the calculation as a pre-defined function, but again, it shouldn’t be complicated

---

<div class="post-metadata">

**Author:** ![rmholmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/rmholmes/32/117_2.png) [@rmholmes](https://forum.access-hive.org.au/u/rmholmes)\
**Post date:** [20 July 2023 01:29 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/10 "2023-07-20T01:29:52Z")

</div>

Note that if the same fix is done for the ACCESS-OM2 OMIP-2 runs, there is an extra diagnostic available in the raw output, `frazil_3d_int_z`, that is `frazil_3d` already summed in the vertical.

For ACCESS-OM2, I’m also just referencing this issue on how to close the heat budget with surface fluxes: [Heat flux diagnostics incomplete / incorrect · Issue #139 · COSIMA/access-om2 · GitHub](https://github.com/COSIMA/access-om2/issues/139#issuecomment-639278547)

---

<div class="post-metadata">

**Author:** ![rmholmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/rmholmes/32/117_2.png) [@rmholmes](https://forum.access-hive.org.au/u/rmholmes)\
**Post date:** [20 July 2023 23:49 UTC](https://forum.access-hive.org.au/t/non-closure-of-heat-budget-in-access-cm2-esmf-cmip-output/244/11 "2023-07-20T23:49:21Z")

</div>

Just adding one more bit of relevant information here: @DamienIrving wrote [a J Climate paper on this issue, among others,](https://doi.org/10.1175/JCLI-D-20-0281.1) with the ACCESS-CM2 PI control being a focus of the paper. This was added in the conclusion section:

_“The second category has nothing to do with deficiencies of the model itself and instead relates to potential issues with the data that are archived and made available to the research community. For example, in discussions about ocean heat budget closure with people familiar with the ACCESS-CM2 model (R. Holmes 2020, personal communication), it was discovered that the discrepancy between the OHC temperature component anomaly (Fig. 1a, red curve) and time integrated ocean surface heat flux (Fig. 1a, orange curve) could be explained by a minor mistake in the construction of the ocean surface heat flux CMIP diagnostic (hfds; Table 2). In particular, the hfds diagnostic was missing contributions from the heat flux into the ocean associated with sea ice–ocean volume exchanges and frozen precipitation as well as the effects of frazil ice formation below the surface layer of the model. When these terms are correctly included in hfds, there is closure between the OHC temperature component and time integrated ocean surface heat flux. Given the high level of model-specific knowledge (and access to data) required to precisely diagnose the cause of an apparent energy leak like this, a detailed examination of the underlying causes of nonconservation across the CMIP6 ensemble would be a difficult undertaking (and is beyond the scope of this study). A detailed assessment of energy and mass conservation is therefore best undertaken by the relevant modeling groups.”_
