issues: 551344538
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
551344538 | MDU6SXNzdWU1NTEzNDQ1Mzg= | 3701 | Error using reduce(): percentile() got an unexpected keyword argument 'axis' | 57364981 | closed | 0 | 12 | 2020-01-17T10:51:49Z | 2020-01-17T18:18:08Z | 2020-01-17T15:24:48Z | NONE | MCVE Code Sample```python import os import numpy as np import pandas as pd import xarray as xr import gcsfs Search for available CMIP6 data:df = pd.read_csv('https://storage.googleapis.com/cmip6/cmip6-zarr-consolidated-stores.csv') and daily 'tas' data:df_daily_tas = df[(df.table_id == 'day') & (df.variable_id == 'tas')] get data for a single model and experiment:source_id = 'GFDL-CM4' expt_id = 'historical' define a func to load 'tas' datadef load_tas_data(source_id, expt_id): """ Load daily tas data for given source and expt ids """ uri = df_daily_tas[(df_daily_tas.source_id == source_id) & (df_daily_tas.experiment_id == expt_id)].zstore.values[0]
Specify the percentile to look at:percentile = 99 Load the data:ds = load_tas_data(source_id, expt_id).sel(time=slice('2000', '2000')) Get the percentiles at each lat/lon:percentiles = ds.reduce(np.percentile, q=percentile, dim='time')
Expected OutputExpected code to return percentiles of daily temperature for each latitude and longitude. Problem DescriptionCode works fine on a different system with the following modules installed:
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.10.1
libnetcdf: 4.4.1.1
xarray: 0.14.1
pandas: 0.25.3
numpy: 1.16.2
scipy: 1.2.1
netCDF4: 1.3.1
pydap: installed
h5netcdf: None
h5py: 2.7.1
Nio: None
zarr: 2.3.2
cftime: 1.0.4.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.2.1
dask: 0.16.1
distributed: 1.20.2
matplotlib: 2.2.2
cartopy: 0.16.0
seaborn: 0.8.1
numbagg: None
setuptools: 38.4.0
pip: 9.0.1
conda: 4.4.10
pytest: 3.3.2
IPython: 6.2.1
sphinx: 1.6.6
Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3701/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |