Issues loading ACCESS-OM2-01 daily data from RYF run

Hi everyone,

I’ve been trying to read in daily velocity data from ACCESS-OM2 ‘01deg_jra55v13_ryf9091’ run and have come across a few hiccups. In the RYF run, the model description says daily data is only available for 1 Jan 1950 to 31 Dec 1969 and 1 Jan 2086 to 31 Dec 2100. Therefore, running the usual cookbook command:

u = cc.querying.getvar(expt,'u', session, frequency = '1 daily')

will either a) concatenate the two segments of daily data together, which it does for the u variable, or b) spit out an error, which it does for v variable.

I am not sure why this is different between the two variables.

Adding a start_time and end_time can solve problem b),

v = cc.querying.getvar(expt,‘v’, session, frequency = ‘1 daily’, start_time = ‘2086’, end_time = ‘2100’)

Thanks!
Ellie

1 Like

Is it potentially because there are no daily data for the whole experiment and when asked cookbook or xarray tries to do some weird combine of different datasets?

1 Like

I think this is the case too, but I’m more surprised that u and v data are processed differently, hence the error when inputting v data but not u.

cc @angus-g ?

It looks like there’s an output with both the 3-monthly and 3x1-monthly segments, output799:

$ ls -1 output799/ocean/ocean_daily_3d_{u,v}.nc output799/ocean/ocean_daily_3d_{u,v}_*.nc
output799/ocean/ocean_daily_3d_u.nc
output799/ocean/ocean_daily_3d_u_10.nc
output799/ocean/ocean_daily_3d_u_11.nc
output799/ocean/ocean_daily_3d_u_12.nc
output799/ocean/ocean_daily_3d_v.nc
output799/ocean/ocean_daily_3d_v_10.nc
output799/ocean/ocean_daily_3d_v_11.nc
output799/ocean/ocean_daily_3d_v_12.nc

This is already enough of a problem (you’d be attempting to load some of the data twice). But the reason why you see different behaviour between u and v is because somehow the sorting ends up different between the two:

>>> list(zip(u_names, v_names))
...
('output799/ocean/ocean_daily_3d_u.nc',
  'output799/ocean/ocean_daily_3d_v_10.nc'),
 ('output799/ocean/ocean_daily_3d_u_10.nc',
  'output799/ocean/ocean_daily_3d_v.nc'),
...

I guess xarray doesn’t mind if it loads the larger segment first, and then the smaller ones, as for u. But if it loads a 1-month segment, and then the 3-month one, it breaks.

1 Like

So how should one differentiate? If we give a ncfile regexpr in the cookbook.getvar?

Yes, that’d work. You’d want "ocean_daily_3d_u_%" or "ocean_daily_3d_v_%" or something like that. I can’t remember if the earlier files are all single-month and the later ones are three-month, which might mean you need to do two queries…

1 Like