home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1101061409

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/6490#issuecomment-1101061409 https://api.github.com/repos/pydata/xarray/issues/6490 1101061409 IC_kwDOAMm_X85BoN0h 15319503 2022-04-18T03:38:43Z 2022-04-18T03:38:43Z NONE

@javedali99 please could you supply an MVCE?

```python

download data

for yr in range(2011,2015): url = f'https://downloads.psl.noaa.gov/Datasets/cpc_us_precip/RT/precip.V1.0.{yr}.nc' savename = url.split('/')[-1] urllib.request.urlretrieve(url,savename)

combine netcdf files

ds2011_2014 = xr.open_mfdataset('precip.V1.0.*.nc', concat_dim='time', combine='nested')

coordinates

top = 40 bottom = 37 left = 258 right = 265.4

subsetting the data based on boundary coordinates

ds_sel = ds2011_2014.isel(lon=(ds2011_2014.lon >= left) & (ds2011_2014.lon <= right), lat=(ds2011_2014.lat >= bottom) & (ds2011_2014.lat <= top), ) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1206496679
Powered by Datasette · Queries took 0.744ms · About: xarray-datasette