Issues when transitioning from hh5 to xp65 in suite runs

Hi all,

I’m trying to run the u-cy339 suite in ACCESS-CM2 following this instruction: Run ACCESS-CM - ACCESS-Hive Docs. Since I don’t have hh5 membership which I understand is being closed, I’m trying to transition everything regarding hh5 to xp65 in the suite. But I have encountered some issues:

1. Issue with loading conda environment:

At the beginning, I encountered an error in the [ocean_ke_check] step like:

Then, I found these lines in the suite.rc file:

module use /g/data3/hh5/public/modules
module unload python
module load conda/analysis3

Following the announcement: ACCESS-NRI Analysis3 Conda Environments – New Release Announcement. I replaced hh5 with xp65 in the path, and it seems to work now. Is it the correct approach to resolve this issue?

2. Issue with um2netcdf4 script:

However, I encountered another issue in [netcdf_conversion] step. The error message is as follows:

This error comes from um2netcdf4 command in suite.rc file:

module use ~access/modules
module unload python
module load pythonlib/um2netcdf4.

The following is the script of um2netcdf4 which still seems to rely on hh5:

$ cat ~access/modules/pythonlib/um2netcdf4/2.1
#%Module

set help            "Conversion of UM fieldsfiles to netCDF"
set prefix           ~access/apps/pythonlib/um2netcdf4/2.1
set install-contact "martin.dix@csiro.au"
set install-date    "2023-01-16"
set url             "https://bitbucket.csiro.au/users/dix043/src"

conflict pythonlib/um2netcdf4

if ![ is-loaded conda/analysis3 ] {
    module use /g/data3/hh5/public/modules
    module load conda/analysis3
}

prepend-path PYTHONPATH $prefix
prepend-path PATH $prefix
setenv UMDIR /g/data/access/projects/access/umdir

Would it be possible to update um2netcdf4 to use xp65, or is there an existing version that supports xp65?

Does anyone have any suggestions? Thanks in advance!

Hao Wang

2 Likes

um2netcdf4.py uses the mule package which isn’t yet included in xp65.

I’ll look at a workaround but for the moment stay with hh5.

Thanks for looking into a workaround, @MartinDix . I’ll hold off now.

Hi all,

xp65 provides a copy of the hh5 analysis3-24.07 environment, which includes mule and other related packages. We’re currently looking into how these can be supported in the newer environments and will get back to you as soon as possible.

In the meantime, you can load the analysis3-24.07 environment on xp65 with:

module use /g/data/xp65/public/modules
module load conda/analysis3-24.07

Hi all,
I am also updating to xp65 and have found that when using the default analysis3 environment (analysis3-25.04), I get an error when I try to do import xesmf in python.
If I revert back to analysis3-24.07, then xesmf works. Just wanted to flag this for future updates.
Regards,
David

Hi @dkhutch ,

I believe it has been fixed in the recent versions of analysis3.

@rbeucher yes it seems to work for me thanks.

Hi again,
Now that I’m trying to use up-to-date analysis3, i.e. conda/analysis3-25.06, I’ve noticed that the tool ncvarinfo is no longer there. I really like that tool… I think it was written by @Aidan a long time ago. Anyway, are there plans to keep it in the conda analysis package? I can “install” it manually otherwise.

Good gracious! It took me a few minutes to track it down and I wrote it! :slight_smile:

It is part of the coecms/nccompress package:

The nccompress package has been written to facilitate compressing netcdf files. Although nccompress can work on single files, it is particularly useful to compress all uncompressed files under whole directory trees. This can allow users to compress files regularly using the same script each time.

The nccompress package consists of three python programs, ncfind, nc2nc and nccompress. nc2nc can copy netCDF files with compression and an optimised chunking strategy that has reasonable performance for many datasets. His two main limitations: it is slower than some other programs, and it can only compress netCDF3 or netCDF4 classic format. There is more detail in the following sections.

The convenience utility ncvarinfo is also included, and though it has no direct relevance to compression, it is a convenient way to get a summary of the contents of a netCDF file.

1 Like

Thanks Aidan, got hold of it.
Cheers

For those following along at home; can I find this on gadi (and if so, where?) or do I need to install for myself?

I think an install into a virtual environment is your best bet. The code is not currently maintained, so I can’t see a use case to put it into a shared conda environment until that status changes.

1 Like

dkhutch

@rbeucher yes it seems to work for me thanks.

@Aidan @dkhutch
Can I mark this problem as being solved, and move the discussion after 1 July to a separate thread?

1 Like

Hi NRI-team, @spencerwong

hh5 is going to be decommissioned very soon (next week?). It would be great if the Run ACCESS-CM2 instructions could be updated. hh5 paths are hard-coded in many of the CM2 suites as described in this post and will likely not work anymore.

Thanks,
Wilma

2 Likes

There is an open issue to update the run docs

if you have any specific feedback that would be a good place to put it.

1 Like

Thanks, done!

1 Like

I’m having the samenetcdf_conversionissue as mentioned in this post when moving to xp65. I don’t understand the provided recommendation and am hoping someone can clarify the suggested workflow to me.

The file that creates the problem (i.e. is trying to load hh5 modules) is part of ~access/modules/pythonlib/ so I’m confused where I need to specify the different conda environment. I assume I’m not meant to make a local copy of um2netcdf4.

Should the conda environment be specified in the netcdf_conversion section of suite.rc?

[[netcdf_conversion]]
inherit = POSTPROC, NCI, SHARE
pre-script = “”"
module use ~access/modules
module unload python
module load pythonlib/um2netcdf4

Hi @wghuneke , this is set in site/nci_gadi.rc, under the [[CONV]] section:

    [[CONV]]
        pre-script = """
            module use /g/data/xp65/public/modules
            module unload conda
            module load conda/analysis3-24.07

I assume you have already got everything else in your suite set up to run with xp65, but in case not, you also need to add gdata/xp65 to set storage_projects in site/nci_gadi.rc :

{% set storage_projects = [ ,… your other storage flags…], ‘gdata/xp65’, ‘scratch/’+environ[‘PROJECT’], ‘gdata/’+environ[‘PROJECT’]] %}

Handy tip, if you’re confused about where to add or edit something, then go to the top level of your rose directory and grep for it - e.g. in this case run grep -ir ‘module load conda/analysis’ from the top of your suite’s rose directory, and it will pull out all files where this line exists :slight_smile:

1 Like

Thanks @bethanwhite for getting back to me!

I think your suggestion does not work for my suite which is set up differently. (I run a CM2 suite, copy of u-db130.) The equivalent to the site/nci_gadi.rc file in my suite is suite.rc which is where I set the storage flags and also updated to the xp65 conda environment under the ocean_ke_check section.

My question is regarding the um2netcdf4 section in suite.rc for which a different python module is loaded separately (see my last post) from a central pythonlib directory under /g/data/access - which I don’t want/should/can touch. I assume all CM2 suites call this module. Since the module unloads any existing conda environments and then loads the hh5 environment, I don’t think specifying anything in the suite.rc file will help. But my understanding might be wrong and I possibly make things more complicated then they are. (Am I making sense?)

I would very much appreciate if someone can clarify this for me and suggest a workaround.

Many thanks,
Wilma