# Issues loading ACCESS-OM2-01 data from cycle 4

**URL:** <https://forum.access-hive.org.au/t/issues-loading-access-om2-01-data-from-cycle-4/418>\
**Category:** Technical\
**Created:** [14 February 2023 07:31 UTC](https://forum.access-hive.org.au/t/issues-loading-access-om2-01-data-from-cycle-4/418 "2023-02-14T07:31:18Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![angus-g](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/angus-g/32/89_2.png) [@angus-g](https://forum.access-hive.org.au/u/angus-g)\
**Post date:** [15 February 2023 02:01 UTC](https://forum.access-hive.org.au/t/issues-loading-access-om2-01-data-from-cycle-4/418/3 "2023-02-15T02:01:29Z")

</div>

By adding a few arguments to skip the coordinate verification, this was relatively fast for me (on a login node):

```auto
In [42]: %time sis = cc.querying.getvar(
                       "01deg_jra55v140_iaf_cycle4", "aice", s,
                       start_time="1968", compat="override", coords="minimal"
                     )    
CPU times: user 2min 45s, sys: 1min 40s, total: 4min 26s
Wall time: 2min 54s

```

The long `sys` time indicates that it spent a long time doing IO, probably because it’s reading 4x2D grids out of every file, and then comparing them all. Maybe this doesn’t come up as badly for the ocean data because it’s not output on a curvilinear grid?

This was brought up before:

> <https://github.com/COSIMA/cosima-cookbook/issues/287>
>
> Loading a CICE variable takes much more time and memory than a MOM variable. E.g….
> \`\`\`
> import cosima\_cookbook as cc
> session = cc.database.create\_session()
> expt = '025deg\_jra55\_ryf9091\_gadi'
> aice = cc.querying.getvar(expt, 'aice\_m', session, n=120)
> \`\`\`
> takes 90 s and several GB of memory (from notebook on OOD) compared to 
> \`\`\`
> sea\_level = cc.querying.getvar(expt, 'sea\_level', session, n=120)
> \`\`\`
> which takes ~15s. Trying to load the full run for a CICE variable takes a crazy amount of memory.
> 
> I think the issue is that the CICE variables have
> \`\`\`
> aice\_m:coordinates = "TLON TLAT time" ;
> \`\`\`
> where \`TLON\` and \`TLAT\` are 2D variables included in the CICE files. MOM variables have
> \`\`\`
> sea\_level:coordinates = "geolon\_t geolat\_t" ;
> \`\`\`
> where \`geolon\_t\` and \`geolat\_t\` are not in the files.
> 
> I think this means that \`xarray.open\_mfdataset\` is reading \`TLON\` and \`TLAT\` for each file to check if it has to concatenate on those coordinates.
> 
> I couldn't see a way of persuading xarray that it should only try to concatenate on the time dimension.

With the suggested fix being to use `decode_coords=False`, as demonstrated in the [ice plotting recipe](https://cosima-recipes.readthedocs.io/en/latest/DocumentedExamples/IcePlottingExample.html). This gives me very similar timing to above:

```auto
In [61]: %time sis = cc.querying.getvar(
                       "01deg_jra55v140_iaf_cycle4", "aice", s,
                       start_time="1968", decode_coords=False
                     )
CPU times: user 2min 39s, sys: 1min 31s, total: 4min 11s
Wall time: 2min 34s

```

The difference between the two methods is that the first one will give you `TLON`, `TLAT`, `ULON`, `ULAT` (in addition to `time`) as coordinates on the resulting DataArray; whereas the second one will only give you a `time` coordinate – the spatial dimensions just have integer indices.

---

_[View the full topic](https://forum.access-hive.org.au/t/issues-loading-access-om2-01-data-from-cycle-4/418)._
