Closed rbeucher closed 1 month ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
View / edit / reply to this conversation on ReviewNB
anton-seaice commented on 2024-08-30T01:22:03Z ----------------------------------------------------------------
Line #6. darray = catalog[expt].search(variable = 'temp', frequency = '1mon').to_dask(xarray_open_kwargs = {'use_cftime':True})
I think 'use_cftime':True is the default so you cam remove that.
This returns a dataset, so better to call it ds, or temp_ds
I don't think it's the default! Without that kwarg, I get the following warning:
/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.04/lib/python3.10/site-packages/xarray/coding/times.py:987: SerializationWarning: Unable to decode time axis into full numpy.datetime64 objects, continuing using cftime.datetime objects instead, reason: dates out of range dtype = _decode_cf_datetime_dtype(data, units, calendar, self.use_cftime)
View / edit / reply to this conversation on ReviewNB
anton-seaice commented on 2024-08-30T01:22:03Z ----------------------------------------------------------------
Line #7. darray = darray['temp'].sel(time = exp_dict[ekey]['time_bounds']) - 273.15
I think its clearer to do the time selection and temperature change on seperate lines
View / edit / reply to this conversation on ReviewNB
anton-seaice commented on 2024-08-30T01:22:04Z ----------------------------------------------------------------
Line #25. darray = catalog[expt].search(variable = 'u', frequency = '1mon').to_dask(xarray_open_kwargs = {'use_cftime':True})
is it clearer to combine the two functions ?
i.e. :
ds_dict = catalog[expt].search(variable = ['temp','u'], frequency = '1mon').to_dataset_dict() ds = xr.merge(ds_dict.values())
I dropped some initial thoughts, I might struggle to get time in the next week for a proper review !
I don't think it's the default! Without that kwarg, I get the following warning:
/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.04/lib/python3.10/site-packages/xarray/coding/times.py:987: SerializationWarning: Unable to decode time axis into full numpy.datetime64 objects, continuing using cftime.datetime objects instead, reason: dates out of range dtype = _decode_cf_datetime_dtype(data, units, calendar, self.use_cftime)
View entire conversation on ReviewNB
Sorry, had a typo! Should run now.
Following the discussion in issue #313, we propose converting the recipes to use Intake, given that the Cookbook is no longer supported and the ACCESS-NRI Intake catalog is now available.
A few months ago, @max-anu began working on this transition. This pull request contains the changes @max-anu made to the notebook specified in the title.