There appear to be a number of files that have a bounds attribute on the time variable but the referenced variable is not present in the file, e.g.
/g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v140_iaf_cycle4/output800/ocean/oceanbgc-3d-adic-1-monthly-mean-4-sigfig-ym_1971_01.nc
This causes an error in update_timeinfo as it doesn't check the bounds variable is present.
There appear to be a number of files that have a
bounds
attribute on thetime
variable but the referenced variable is not present in the file, e.g./g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v140_iaf_cycle4/output800/ocean/oceanbgc-3d-adic-1-monthly-mean-4-sigfig-ym_1971_01.nc
This causes an error in
update_timeinfo
as it doesn't check the bounds variable is present.The check for bounds attribute is here:
https://github.com/COSIMA/cosima-cookbook/blob/master/cosima_cookbook/database.py#L574
and the code which assumes it exists:
https://github.com/COSIMA/cosima-cookbook/blob/master/cosima_cookbook/database.py#L589-L592
This change
works (
python
short circuits logicaland
, so the second condition is only evaluated if the first is true)