issues: 98074194
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
98074194 | MDU6SXNzdWU5ODA3NDE5NA== | 501 | xray methods using shapefile as mask? | 12929592 | closed | 0 | 17 | 2015-07-30T02:49:35Z | 2019-06-18T10:49:53Z | 2016-12-29T01:42:03Z | NONE | Can we set a shapefile as a mask for each netcdf file and run xray methods for values within the shapefile region? for example if I want to create a timeseries of monthly mean temperature for 'mystate' from a netcdf file that contains data for the whole country: filepath = r"DATA/temp/_/_temp.nc" shapefile = r"DATA/mystate.shp" ds=xray.open_mfdataset(filepath) ds_variable=ds['temp'] monthlymean=ds_variable.resample('1MS', dim='time', how='mean') meanmonthlyofmystate=monthlymean.groupby('time').mean() #add somewhere here the shapefile meanmonthlyofmystate.to_pandas().plot() |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/501/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |