Ensemble run for ACCESS-CM2: Perturbations have no effect

Hi all,

I’m interested in running an ensemble for ACCESS-CM2 - I’ll be perturbing the initial air temperatures by about 10^-13 randomly. There are a few people @ars599 @zoegillett27 @spencerwong who have successfully done this 3 years ago here, @sebmckenna did it 2 years ago here, and most recently @huazhen here. These thread are closed so I can’t comment there. I have the perturbIC.py file that is commonly used for this purpose from here.

My issue is that whilst I can use the file to perturb the warm restart files, I see no difference in conditions after 1 month, below is the daily mean air temperature at 1.5 m between 4 members.

I would greatly appreciate any advice from those who’ve done this before or anyone with an idea!

Cheers,

Joel

Have you confirmed the perturbed files are actually different, e.g. by running diff FILEA FILEB or by plotting the perturbed field in each file?

I have no clue if this is important here and I have never done any of these before, but 1e-13 is close to 64-bit floating-point machine precision for temperatures in Kelvin with values ~270:

julia> eps(270.0)
5.684341886080802e-14 # <- machine precision for 64-big float value of 270.0

So you might have such a small perturbation that whatever chaotic bifurcation you were expecting has not had time to be fully realized:

julia> 270 + 1e-13
270.0000000000001

And if by any chance you are adding 32-bit floats, then your perturbation may be actually not perturbing anything:

julia> 270f0 + 1f-13
270.0f0

Maybe that’s your issue here? (Note I’m using Julia but the floating-point arithmetic issues are essentially the same across languages AFAIU.)

For something to be “felt” I would recommend taking the square root of eps, so in your case, for T in Kelvins, something on the order of 1e-7 for 64-bit floats and 0.005 for 32-bit floats.

julia> sqrt(eps(270.0))
2.384185791015625e-7

julia> sqrt(eps(270f0))
0.0055242716f0
2 Likes

another potential approach for debugging, building on the good suggestions that have come before: maybe hit it with a bigger hammer (say, 10**-2, or even 1 for clarity about whether anything changed) and check if that has an impact on the model’s evolution

2 Likes

Hi Joel,

In the end I didn’t need an ensemble, so I’m not too sure how that code works. I believe @huazhen has done this recently with ACCESS-CM2 though, so hopefully she can provide more help. I’m interested to know as well.

Cheers,
Zoe

Thanks all for your replies!

@Scott the diff command returns nothing, these files are identical. I even did a histogram of the air temperature differences and got the min, mean, max difference at 15 decimals and still no difference. Is it something to do with the script @tammasloughran?

@Benoit @jemmajeffree I tried a difference of 0.01 and I got the same results, very odd!

@zoegillett27 Thanks for your input, and yes if you have any tips on how you got it working @huazhen please let me know

Cheers,

Joel

@MartinDix
Am I right in remembering that perturbIC.py is your script? any suggestions or guidelines on how it should be used?

1 Like

The default size perturbation is large enough that significant differences appear very quickly.

Using a copy of /data/access/access-cm2/cmip6_restarts/bi889/restart/atm/bi889a.da09500101_00

module use ~access/modules
module load pythonlib/umfile_utils/access_cm2
perturbIC.py -s 0 bi889a.da09500101_00

mule-cumf shows theta differences with the expected default amplitude of 0.01.

mule-cumf bi889a.da09500101_00 /g/data/access/access-cm2/cmip6_restarts/bi889/restart/atm/bi889a.da09500101_00 
...
%%%%%%%%%%%%%%%%%%%%
* Field 171/15610  *
%%%%%%%%%%%%%%%%%%%%
Lookup compares, data DOES NOT compare
Compared 64/64 lookup values.
File_1 lookup info:
  t1(0950/01/01 00:00:00)  lblev(9999)/blev(0.0)  lbproc(0)
Data differences:
  Number of point differences  : 27264/27648
  Maximum absolute difference  : 0.009999598438156454
  RMS difference               : 0.0057510709134938765
  RMS diff as % of file_1 data : 0.0020506374334412678
  RMS diff as % of file_2 data : 0.0020506375586943374

Running with the perturbed file shows solver differences from the first step, e.g.
Original

********************************************
*    Linear solve for Helmholtz problem    *
* Outer Inner Iterations InitialError      *
*    1     1       16     0.100000E+01     *
*    1     2        7     0.108265E-01     *
********************************************

********************************************
*    Linear solve for Helmholtz problem    *
* Outer Inner Iterations InitialError      *
*    2     1        5     0.117254E+00     *
*    2     2        3     0.121000E-02     *
********************************************

Perturbed

********************************************
*    Linear solve for Helmholtz problem    *
* Outer Inner Iterations InitialError      *
*    1     1       16     0.100000E+01     *
*    1     2       11     0.108264E-01     *
********************************************

********************************************
*    Linear solve for Helmholtz problem    *
* Outer Inner Iterations InitialError      *
*    2     1        5     0.117142E+00     *
*    2     2        1     0.120943E-02     *
********************************************

Is it possible that you specified the amplitude as zero rather than the seed as zero? I’ve now modified the script to make this an error.

2 Likes

This worked well, thanks @MartinDix and @jemmajeffree for the help. It seems to be the script I was using was not working correctly, your script accessible with the modules

module use ~access/modules
module load pythonlib/umfile_utils/access_cm2

works as expected.

2 Likes