issue_comments: 912082889
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/5760#issuecomment-912082889 | https://api.github.com/repos/pydata/xarray/issues/5760 | 912082889 | IC_kwDOAMm_X842XUfJ | 25606497 | 2021-09-02T21:49:57Z | 2021-09-02T21:49:57Z | NONE | Thank you @TomNicholas - strangely I can't reproduce it anymore on my local machine - it all happened on our slurm. The result is correct according to the input file index. In my case I calculated annual and seasonal climate variables on the same input files, but the matrix index i,j were different. One with upper left corner (0,0) and the other one with (0,1167) - as shown in ncview. Nevertheless here is what I did - you can test it with https://www.unidata.ucar.edu/software/netcdf/examples/sresa1b_ncar_ccsm3-example.nc: ```python import numpy as np import xarray as xr chunks=4 lonrange=256 latrange=128 creating the chunks - our slurm can't handle dask_jobqueue and dask chunking wasnt possible as wellx=[x.tolist() for x in np.array_split(range(lonrange), chunks)] xextend = [[sublist[0],sublist[-1]] for sublist in x] y=[y.tolist() for y in np.array_split(range(latrange), chunks)] yextend = [[sublist[0],sublist[-1]] for sublist in y] concatenating the chunksallChunks = [[x,y] for x in xextend for y in yextend] for k in range(0,chunks*chunks):
combining all chunks to one final filenested inputwith xr.open_mfdataset('~/pathToFile/climateCalculations/nestedClimateAnnualCalculations_*', chunks=-1, parallel=True, engine='h5netcdf') as ds: with xr.open_mfdataset('~/pathToFile/climateCalculations/climateAnnualCalculations_*', chunks=-1, parallel=True, engine='h5netcdf') as ds: ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
986436135 |