Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

esmlab operations clobber existing ds.attrs['history'] values #159

Open
klindsay28 opened this issue Oct 30, 2019 · 0 comments
Open

esmlab operations clobber existing ds.attrs['history'] values #159

klindsay28 opened this issue Oct 30, 2019 · 0 comments

Comments

@klindsay28
Copy link

Is your feature request related to a problem? Please describe.
The following commands

ds = xr.open_dataset('/glade/work/klindsay/analysis/CESM2_coup_carb_cycle_JAMES/tseries/FG_CO2_ocn_piControl_00.nc')
print(ds.attrs['history'])
ds_ann = esmlab.resample(ds, freq='ann')
print(ds_ann.attrs['history'])

yield the output

created by /glade/work/klindsay/analysis/CESM2_coup_carb_cycle_JAMES/tseries_mod.py at 2019-10-24 20:32:05 UTC

and

2019-10-30 15:28:45.220584 esmlab.resample(<DATASET>, freq="ann")

Describe the solution you'd like
I think it would be useful to prepend to existing history content, instead of overwriting it, if it exists.

This behavior would be consistent with NCO.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant