Skip to content
New issue

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

icclim lat/lon subset #4

Open
chunhsusu opened this issue Nov 9, 2022 · 1 comment
Open

icclim lat/lon subset #4

chunhsusu opened this issue Nov 9, 2022 · 1 comment

Comments

@chunhsusu
Copy link

@DamienIrving .

When running

/g/data/xv83/dbi599/miniconda3/envs/icclim/bin/python /g/data/tp28/dev/chs548/indices/run_icclim.py --slice_mode month --verbose --start_date 1980-01-01 --end_date 2020-12-31 --input_files /g/data/xv83/bxn599/test-data/CORDEX-CMIP6/output//AUS-10i/CSIRO/ECMWF-ERA5/evaluation/r1i1p1f1/CSIRO-CCAM-2203/v1/day/tasmax/tasmax_AUS-10i_ECMWF-ERA5_evaluation_r1i1p1f1_CSIRO-CCAM-2203_v1_day_19800101-19801231.nc --variable tasmax tx out.nc

led to,

Traceback (most recent call last): File "/g/data/tp28/dev/chs548/indices/run_icclim.py", line 391, in <module> main(args) File "/g/data/tp28/dev/chs548/indices/run_icclim.py", line 229, in main ds, cf_var = read_data( File "/g/data/tp28/dev/chs548/indices/run_icclim.py", line 167, in read_data ds = subset_bbox(ds, start_date=start_date, end_date=end_date, lat_bnds=lat_bnds, lon_bnds=lon_bnds) File "/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/clisops/core/subset.py", line 270, in func_checker return func(*args, **kwargs) File "/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/clisops/core/subset.py", line 1211, in subset_bbox da = da.sel({lon: slice(*lon_bnds)}) TypeError: iteration over a 0-d array

Same when running on BARPA data.

Not obvious to me - possible bug in subset.py, since the icclim.py is correctly passing lat_bnds=None and lon_bnds=None to subset_bbox function.

@DamienIrving
Copy link
Member

Looks like a problem with the clisops library.

I've posted an issue at the clisops repo to see if it can be fixed (roocs/clisops#256), but in the meantime I've implemented a work around in run_icclim.py that fixes the problem (see f9feadb).

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

No branches or pull requests

2 participants