Perturbing restarts conda package

Description of request:

Perturbation of restarts is sometimes necessary to get past a numerical instability.

Environment:

NCI
login node

module use /g/data/xp65/public/modules
module load conda/analysis3-25.12
~access/apps/pythonlib/umfile_utils/access_cm2/perturbIC.py -a 0.05 -s 3 $1

This still works, however throws a warning to upgrade to conda/analysis3. fine this is the default now, but the point is that with “module load conda/analysis3-26.08” instead - it doesn’t work.

What executed:

Actual results:

Loading conda/analysis3-26.08
Loading requirement: singularity
Traceback (most recent call last):
File “/g/data/access/projects/access/apps/pythonlib/umfile_utils/access_cm2/perturbIC.py”, line 31, in
f = umfile.UMFile(args.ifile, ‘r+’)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/g/data/access/projects/access/apps/pythonlib/umfile_utils/access_cm2/umfile.py”, line 27, in init
self.determine_file_type()
File “/g/data/access/projects/access/apps/pythonlib/umfile_utils/access_cm2/umfile.py”, line 68, in determine_file_type
h = np.fromstring(s,np.int64).newbyteorder(endian)
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: The binary mode of fromstring is removed, use frombuffer instead

Expected results:

Additional info:

Hi @Jhan,

A revised version of the perturbIC routine is now included in the model-processing environment, as part of the umfile_utils Python package.

To run your command above you can now use:

module use /g/data/vk83/modules
module load model-processing
perturbIC -a 0.05 -s 3 <input_path>

Cheers
Davide

spoke to soon

I was just waiting on the updated module to USE/LOAD but I didnt try it until today

gadi:atmosphere> pwd -P
/scratch/p66/jxs599/access-esm/archive/e2-1pc-1099919c/restart235/atmosphere
gadi:atmosphere> ls -altr
total 2590164
-rw-r----- 1 jxs599 p66 30 Sep 24 02:31 um.res.yaml
drwxr-s— 6 jxs599 p66 4096 Sep 24 02:31 ../
drwxr-s— 2 jxs599 p66 4096 Oct 1 13:09 ./
-rw-r----- 1 jxs599 p66 1326153728 Oct 1 13:09 restart_dump.astart.orig
-rw-r----- 1 jxs599 p66 1326153728 Oct 1 15:42 restart_dump.astart
gadi:atmosphere> module use /g/data/vk83/modules
gadi:atmosphere> module load model-processing
Loaded module model-processing/2026.09.15
gadi:atmosphere> perturbIC.py -a 0.05 -s 3 restart_dump.astart
bash: perturbIC.py: command not found

Variations that I have tried don’t work either?

Sorry @Jhan, my bad.
The correct command is perturbIC (without the .py extension):

perturbIC -a 0.05 -s 3 <input_path>

Im pretty sure was one of the variations I tried. its the first thing I looked for following a “module display” - I’ll try it again later when I can

I tested using /scratch/p66/jxs599/access-esm/archive/e2-1pc-1099919c/restart234/atmosphere/restart_dump.astart and it worked.

Please let me know how it goes when you have a try.

Cheers
Davide

not sure what the problem was, but it worked this time

one thing - I had to “reinstate” $UMDIR, to squash a warning at least.

Cheers,
Jhan