Ants module availability in xp65 analysis3 kernels

The ants module is a key piece of software not just for running Met Office family models but also for working on analysis of their outputs.

Having transitioned from hh5 to xp65, I’ve been struggling to find out where ants is available and where it is not. Some of my previously saved settings worked and some don’t. I’ve tracked this down to which conda environment was being loaded in each of my saved settings.

Last week I worked through all the xp65 analysis3 kernels and discovered that ants is available in the pre-2025 kernels, as well as the unstable (==last week’s unstable) kernel. I’ll list them explicitly below for anyone else who may be searching for the same answers.

As of last week, the xp65 kernels that the ants module is available in are:
24.07
24.11
24.12
25.08 (== unstable, defined as of last week)

While ants is not in the following xp65 kernels:
25.01
25.02
25.03
25.04
25.05
25.06
25.07 ( == current stable)

However, I’ve just spun up an ARE session today (29 August) with the unstable kernel loaded, and ants is no longer available. Checking the kernel list, it appears that the latest kernel is now 25.09 (which I assume has now become the default unstable kernel), while the default stable kernel is still 25.07. Crucially, ants is in neither of these default kernels.

Some communication around this is crucial. If ants is not going to be made available in every kernel, could ACCESS-NRI maintain a list of ants-enabled xp65 kernels with that we can refer to, so that we’re not loading a default kernel that it then disappears from?

1 Like

Thanks for your post @bethanwhite! I’ll find someone to help you with this, and in the meantime you might want to check out this GitHub issue about the Ants module in analysis3 on xp65.

1 Like

Hi @bethanwhite,

Thank you for your message. Deploying ants in the xp65 project has been challenging. The version available in the 24-series was outdated and caused multiple conflicts, which prevented deployment. We are addressing this by updating the conda packages for ants in the ACCESS-NRI conda channel.

You may have noticed it appearing in both the 25.08 and 25.09 environments. I ran into issues finalising it in 25.08, so I decided to create 25.09 as a fresh starting point. At present, 25.07 remains the stable environment, while 25.09 is still under development and has not been officially released.

1 Like

The environments are frozen at the end of each month so no package will be removed from them after that. Updates can happen at any time without notice for the unstable (current month) environment.

1 Like

Thank you @rbeucher . It was actually coming up as not available in 25.09 earlier today- but perhaps that’s too fresh an unstable environment?

It is still not available but we are working on it. I got most of the UM packages to work (mule, etc) but ants conflicts with the version of iris required by other packages. See here: Adding ants by rbeucher · Pull Request #292 · ACCESS-NRI/ACCESS-Analysis-Conda · GitHub

1 Like

Thanks @rbeucher , I appreciate your work on getting a tricky package working.

1 Like

@atteggiani has some background information that would be useful I think.

1 Like

Hi @bethanwhite,

I understand ants is an important module to work with the ACCESS models which have the UM as their atmospheric component.

Unfortunately, there are a few problems with the ants package that ACCESS-NRI can do very little to circumvent.

Issues with the ants package

  1. The package doesn’t have a list of dependencies in its pyproject.toml, so their dependencies must be “inferred” from the official installation instructions
  2. The official installation instructions consider ants almost as an “application” rather than a “package”, as it needs a proper set environment (often with dependencies pinned to the build version). However, ants is not an application and is supposed to be used also as a Python API.
  3. Related to the above, the very strict dependency pinning (like dask, iris, etc.), make ants almost impossible to be safely installed in environments such as conda/analysis3 (but also in any other “multi-purpose” python environment)
  4. While I did some testing for the conda packaging, I realised that many of the dependency pinnings are set to satisfy its unit-tests, which in my opinion is far too specific. It probably aims at ensuring absolute reproducibility, but this greatly limits the usability of ants together with other packages

In general, there is no easy work-around for the points above, and we cannot change any of them because ACCESS-NRI is not the package developer.

Possible solution

Given the above, I propose to release a dedicated environment for ants, which contains MetOffice packages (e.g., shumlib, mule, etc.) and some core “analysis” packages often used in conjunction with ants (e.g., xarray, dask, matplotlib, etc.).

Some of these packages are already a dependency (often pinned to the specific version or even build) of ants. In that case, they will have to be pinned to whatever ants prescribe. Otherwise , we can have more freedom and pick the latest version that solves the environment.

Note: All of the above is relevant for the ugants module as well.


What do you think?
Do you have any other suggestions?

Cheers
Davide

1 Like

There’s an existing ants + ug-ants environment at /g/data/access/ngm/apps/ants/ug-2.1.0, created from Sign in · GitLab.

Ants dependencies are provided as conda environment/lock files. There are conflicts in the versions required by ants and ug-ants - the ngm module uses the ug-ants versions where there’s conflicts.

3 Likes

Thanks @atteggiani. One immediate comment - if you are building a dedicated environment for ants, please also make sure it contains iris. (That may already be the case in the environment @Scott recommended?)

But as a general comment - if the solution is to build a specific ants-enabled analysis environment separate from conda/analysis3, I see no issue with that as a solution.

Yes Iris is a pre-requisite of ants so it’s included (basically all of ants works with iris cubes)

2 Likes

Ideal :blush:

Thanks for your efforts to get ANTS into xp65, it looks frustrating!

While it would be ideal to have ANTS in analysis3, I understand this may not be possible. For a seperate environment for ANTS, to enable it to be an effective development environment for spatial datasets, it should include:

  • dask
  • xarray
  • netcdf4
  • pandas
  • numpy
  • matplotlib
  • rioxarray (desired but not required)
1 Like