We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let's see if we can add time bounds into the outputs from time_average(...):
time_average(...)
https://github.com/roocs/clisops/blob/average_time/clisops/core/average.py#L275-L279
I did some playing with xarray and it might be relatively simple to do this...
xarray
import xarray as xr ds = xr.open_dataset("/home/users/astephen/tas_Amon_EC-Earth3_dcppA-hindcast_s198611-r1i1p1f1_gr_198611-198710.nc", use_cftime=True) d = ds.resample(indexer={ds.time.name: '1MS'}).mean( dim=ds.time.name, skipna=True, keep_attrs=True) time_0 = d.time.values[0] dt_cls = time_0.__class__ freq = "month" if freq == "month": time_bounds = [ [dt_cls(tm.year, tm.month, tm.day), dt_cls(tm.year, tm.month, tm.daysinmonth)] for tm in d.time.values ] print(time_bounds)
The text was updated successfully, but these errors were encountered:
ellesmith88
No branches or pull requests
Let's see if we can add time bounds into the outputs from
time_average(...)
:https://github.com/roocs/clisops/blob/average_time/clisops/core/average.py#L275-L279
I did some playing with
xarray
and it might be relatively simple to do this...The text was updated successfully, but these errors were encountered: