issues: 435535284
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 435535284 | MDU6SXNzdWU0MzU1MzUyODQ= | 2912 | Writing a netCDF file is unexpectedly slow | 2014301 | closed | 0 | 12 | 2019-04-21T18:31:36Z | 2023-09-12T15:58:18Z | 2023-09-12T15:58:18Z | NONE | ```python ncdat=xr.open_mfdataset(nclist, concat_dim='time') ncdat['lat']=ncdat['lat'].isel(time=0).drop('time') ncdat['lon']=ncdat['lon'].isel(time=0).drop('time') ncdat=ncdat.rename({'north_south':'lat', 'east_west':'lon'}) lat_coords=ncdat.lat[:,0] #Extract latitudes lon_coords=ncdat.lon[0,:] #Extract longitudes ncdat=ncdat.drop(['lat','lon']) reformatted_ncdat=ncdat.assign_coords(lat=lat_coords,lon=lon_coords, time=ncdat.coords['time']) ncdat = reformatted_ncdat.sortby('time') ncdat.to_netcdf('testing.nc') ``` Problem descriptionAfter some processing, I am left with this xarray dataset
How can I expedite this process? Is there anything wrong with the structure of Expected OutputA netCDF file Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/2912/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |