home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 257400162

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
257400162 MDU6SXNzdWUyNTc0MDAxNjI= 1572 Modifying data set resulting in much larger file size 1797906 closed 0     7 2017-09-13T14:24:06Z 2017-09-18T08:59:24Z 2017-09-13T17:12:28Z NONE      

I'm loading a 130MB nc file and applying a where mask to it to remove a significant amount of the floating points - replacing them with nan. However, when I go to save this file it has increased to over 500MB. If I load the original data set and instantly save it the file stays roughly the same size.

Here's how I'm applying the mask:

```python import os import xarray as xr

fp = 'ERA20c/swh_2010_01_05_05.nc' ds = xr.open_dataset(fp)

ds = ds.where(ds.latitude > 50)

head, ext = os.path.splitext(fp) xr.open_dataset(fp).to_netcdf('{}-duplicate{}'.format(head, ext)) ds.to_netcdf('{}-masked{}'.format(head, ext)) ```

Is there a way to reduce this file size of the masked dataset? I'd expect it to be roughly the same size or smaller.

Thanks.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1572/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 7 rows from issue in issue_comments
Powered by Datasette · Queries took 0.633ms · About: xarray-datasette