issues: 392816513
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
392816513 | MDU6SXNzdWUzOTI4MTY1MTM= | 2623 | Why is my export to netcdf command leading to a __truediv__ error? | 2014301 | closed | 0 | 7 | 2018-12-19T23:16:14Z | 2018-12-24T15:58:03Z | 2018-12-24T15:58:03Z | NONE | Code Sample, a copy-pastable example if possible```python import numpy as np import xarray as xr import glob, os NCDIR = './output/out/' finalfile = 'summaout.nc' outfilelist = glob.glob((NCDIR+'/{}.nc').format('basin_*timestep')) ds=xr.open_mfdataset(outfilelist, concat_dim='hru') replace = ds['pptrate'] runoff = ds['averageInstantRunoff'].values runoff = np.squeeze(runoffdata, axis=2) runoff = runoff.transpose() replace.values = runoff ncconvert = ds.drop('averageInstantRunoff') runoffarray = xr.DataArray(runoff, dims=['time','hru']) ds['averageInstantRunoff'] = runoffarray ds.to_netcdf('test.nc') ``` Problem descriptionThis is
Expected OutputnetCDF Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2623/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |