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/2178#issuecomment-391572819,https://api.github.com/repos/pydata/xarray/issues/2178,391572819,MDEyOklzc3VlQ29tbWVudDM5MTU3MjgxOQ==,12929592,2018-05-24T03:03:15Z,2018-05-24T03:03:15Z,NONE,Thank you that solved my issue,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,325933825
https://github.com/pydata/xarray/issues/563#issuecomment-140625189,https://api.github.com/repos/pydata/xarray/issues/563,140625189,MDEyOklzc3VlQ29tbWVudDE0MDYyNTE4OQ==,12929592,2015-09-16T04:40:00Z,2017-10-12T19:04:48Z,NONE,"I am sorry but I do not think I can make a contribution. I really do not
know what I am doing!
I hope someone with some skills can add the fill method for up-sampling?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,105519744
https://github.com/pydata/xarray/issues/563#issuecomment-138793112,https://api.github.com/repos/pydata/xarray/issues/563,138793112,MDEyOklzc3VlQ29tbWVudDEzODc5MzExMg==,12929592,2015-09-09T05:56:23Z,2017-10-12T19:04:34Z,NONE,"I could try....
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,105519744
https://github.com/pydata/xarray/issues/1466#issuecomment-311250589,https://api.github.com/repos/pydata/xarray/issues/1466,311250589,MDEyOklzc3VlQ29tbWVudDMxMTI1MDU4OQ==,12929592,2017-06-27T04:35:14Z,2017-06-27T04:35:14Z,NONE,"That solved the issue - I should have checked that first!
thank you
","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238731491
https://github.com/pydata/xarray/issues/1043#issuecomment-253101783,https://api.github.com/repos/pydata/xarray/issues/1043,253101783,MDEyOklzc3VlQ29tbWVudDI1MzEwMTc4Mw==,12929592,2016-10-12T02:25:55Z,2016-10-12T02:25:55Z,NONE,"perfect thank you!
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,182168383
https://github.com/pydata/xarray/issues/1036#issuecomment-251577702,https://api.github.com/repos/pydata/xarray/issues/1036,251577702,MDEyOklzc3VlQ29tbWVudDI1MTU3NzcwMg==,12929592,2016-10-05T04:14:59Z,2016-10-05T04:14:59Z,NONE,"Thank you - ds['time'].to_index() seems to work but I am having trouble replacing the UTC time in the ds with the converted local time in my new ds. I am using .update() because I want to override the original time. However, the time does not seem to have been changed following this step.
import pandas as pd
import xray
import pytz
ds = xray.open_mfdataset('/DATA/WRF/_/_/*T_SFC.nc')
time=ds['time'].to_index()
time_utc = time.tz_localize(pytz.UTC)
au_tz = pytz.timezone('Australia/Sydney')
time_local = time_utc.tz_convert(au_tz)
#convert pandas datetimeindex to a series and then series to xarray dataarray and then to xray dataset
local_series=time_local.to_series()
local_da=xray.DataArray.from_series(local_series)
local_ds=xray.DataArray.to_dataset(local_da)
#create a new dataset that replaces/updates the UTC time in the original dataset with the local time from the newly created dataset (in pandas)
new_ds=ds.update(local_ds)
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,181005061
https://github.com/pydata/xarray/issues/1025#issuecomment-251045880,https://api.github.com/repos/pydata/xarray/issues/1025,251045880,MDEyOklzc3VlQ29tbWVudDI1MTA0NTg4MA==,12929592,2016-10-03T07:48:53Z,2016-10-03T07:48:53Z,NONE,"Brilliant - thank you!
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180503054
https://github.com/pydata/xarray/issues/1025#issuecomment-251040498,https://api.github.com/repos/pydata/xarray/issues/1025,251040498,MDEyOklzc3VlQ29tbWVudDI1MTA0MDQ5OA==,12929592,2016-10-03T07:08:48Z,2016-10-03T07:08:48Z,NONE,"Thanks for your response.
I am not wanting a range of values that is why I don't want to use slice - I just want the value at the given time, latitude and longitude.
If I use .isel() I receive an 'Assertion Error' on this line:
MaxTempatpoint=MaxTempattime.isel(latitude=-39.14952469, longitude=140.84791565)
and if I use .sel() I receive a 'Key Error' - KeyError: -39.14952469 on this line:
MaxTempatpoint=MaxTempattime.sel(latitude=-39.14952469, longitude=140.84791565)
I haven't pasted entire error message because I am assuming the issue I am having is simple??
Should I some how convert the latitude and longitude to a different data type and then access? Or is there some way of accessing an index for the latitude and longitude?
Any feedback will be greatly appreciated.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180503054
https://github.com/pydata/xarray/issues/709#issuecomment-172672626,https://api.github.com/repos/pydata/xarray/issues/709,172672626,MDEyOklzc3VlQ29tbWVudDE3MjY3MjYyNg==,12929592,2016-01-18T22:37:23Z,2016-01-18T22:37:23Z,NONE,"please ignore the last comment/issue
as soon as I added 'float32' rather than just 'float' it worked fine!
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,125386091
https://github.com/pydata/xarray/issues/709#issuecomment-172668790,https://api.github.com/repos/pydata/xarray/issues/709,172668790,MDEyOklzc3VlQ29tbWVudDE3MjY2ODc5MA==,12929592,2016-01-18T22:16:59Z,2016-01-18T22:16:59Z,NONE,"I am receiving the same error as #709 when trying:
ds.to_netcdf( 'myncfile.nc', encoding={'Temp': {'dtype': 'float'}})
and I am using xray v 0.6.1 - which is the version the 'what's new' changes appear under.
Do I need a different version? am I writing it incorrectly?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,125386091
https://github.com/pydata/xarray/issues/690#issuecomment-167933568,https://api.github.com/repos/pydata/xarray/issues/690,167933568,MDEyOklzc3VlQ29tbWVudDE2NzkzMzU2OA==,12929592,2015-12-30T04:15:49Z,2015-12-30T04:15:49Z,NONE,"thank you
On 30 December 2015 at 15:01, Stephan Hoyer notifications@github.com
wrote:
> This is a good idea, but it's not currently supported. You could do
> something like this, though:
>
> hourofyear = (ds['time.dayofyear'] \* 24 + ds['time.hourofday']).rename('hourofyear')
> result = ds['TEMP'].groupby(hourofyear).mean('time')
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/xray/xray/issues/690#issuecomment-167932904.
##
Dr Sarah Harris
Research Fellow
School of Earth, Atmosphere and Environment
Room 227, 9 Rainforest Walk
Faculty of Science
Monash University
Ph: 03 9902 4243
Email: sarah.harris@monash.edu
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124300184
https://github.com/pydata/xarray/issues/673#issuecomment-164201408,https://api.github.com/repos/pydata/xarray/issues/673,164201408,MDEyOklzc3VlQ29tbWVudDE2NDIwMTQwOA==,12929592,2015-12-12T23:21:39Z,2015-12-12T23:21:39Z,NONE,"Updating with the latest release of dask.array fixed it! Thank you so much for responding!
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121336727
https://github.com/pydata/xarray/issues/501#issuecomment-146031940,https://api.github.com/repos/pydata/xarray/issues/501,146031940,MDEyOklzc3VlQ29tbWVudDE0NjAzMTk0MA==,12929592,2015-10-06T23:22:50Z,2015-10-06T23:22:50Z,NONE,"I am trying not to be annoying but is there any chance you were able to fix this bug? I checked on the examples page but could not find anything.
thanks
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,98074194
https://github.com/pydata/xarray/issues/501#issuecomment-143899899,https://api.github.com/repos/pydata/xarray/issues/501,143899899,MDEyOklzc3VlQ29tbWVudDE0Mzg5OTg5OQ==,12929592,2015-09-28T23:20:04Z,2015-09-28T23:20:04Z,NONE,"Thank you for fixing the last line, I can get your example to run with my own data without any errors being raised however the output does not appear to have any masked applied!
I can use where() to plot a selected area but when it comes to being used with another dataset it doesn't appear to be working for me. Is there an example that shows something like temperature data over time for different states, extracted using the method above?
This method will be so useful for me - if I can get it to work!
Any feedback will be greatly appreciated.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,98074194
https://github.com/pydata/xarray/issues/501#issuecomment-143116745,https://api.github.com/repos/pydata/xarray/issues/501,143116745,MDEyOklzc3VlQ29tbWVudDE0MzExNjc0NQ==,12929592,2015-09-25T03:49:53Z,2015-09-25T03:49:53Z,NONE,"Thank you, but can we use the mask and apply it to another xray dataset - so you only take the values from one dataset that fall in the region of the mask)? I have tried below (but this doesn't work).
Thanks
ds.states.where(ds.states == state_ids['California']).plot()
dstemp=xray.open_mfdataset(filepath)
ds_variable=dstemp['temp']
monthlymean=ds_variable.resample('1MS', dim='time', how='mean')
meanmonthlycaliforniatemp=ds.states.where(ds.states==state_ids['California']).monthlymean.groupby('time').mean()
meanmonthlycaliforniatemp.to_pandas().plot()
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,98074194
https://github.com/pydata/xarray/issues/501#issuecomment-142788988,https://api.github.com/repos/pydata/xarray/issues/501,142788988,MDEyOklzc3VlQ29tbWVudDE0Mjc4ODk4OA==,12929592,2015-09-24T02:52:55Z,2015-09-24T02:52:55Z,NONE,"Now that I am using xray version 0.6.0 I cannot find any examples that use where() to mask out values from one xray dataset using a rasterized shapefile that has been turned into an xray dataset.
Referring to my original post in this thread can I resample a timeseries, find the mean, groupby by time and plot using only the values that fall within one state?
Any feedback will be greatly appreciated
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,98074194
https://github.com/pydata/xarray/issues/501#issuecomment-128216372,https://api.github.com/repos/pydata/xarray/issues/501,128216372,MDEyOklzc3VlQ29tbWVudDEyODIxNjM3Mg==,12929592,2015-08-06T02:24:17Z,2015-08-06T02:24:17Z,NONE,"This example is very helpful. Thank you.
I think the where() method you refer to will be very useful - When will the
version 0.5.3 be released?
Thanks
Sarah
On 31 July 2015 at 06:00, Stephan Hoyer notifications@github.com wrote:
> rasterio and geopandas can be combined with xray to make converting
> shapefiles into raster masks pretty easy. Here's a quick demo:
> ``python
> import geopandas
> from rasterio import features
> from affine import Affine
>
> def transform_from_latlon(lat, lon):
> lat = np.asarray(lat)
> lon = np.asarray(lon)
> trans = Affine.translation(lon[0], lat[0])
> scale = Affine.scale(lon[1] - lon[0], lat[1] - lat[0])
> return trans \* scale
>
> def rasterize(shapes, coords, fill=np.nan, *
>
> _kwargs): """"""Rasterize a list of (geometry, fill_value) tuples onto the
> given xray coordinates. This only works for 1d latitude and longitude
> arrays. """""" transform = transform_from_latlon(coords['latitude'],
> coords['longitude']) out_shape = (len(coords['latitude']),
> len(coords['longitude'])) raster = features.rasterize(shapes,
> out_shape=out_shape, fill=fill, transform=transform, *_kwargs)
> return xray.DataArray(raster, coords=coords, dims=('latitude',
> 'longitude'))
>
> states =
> geopandas.read_file('/Users/shoyer/Downloads/ne_10m_admin_1_states_provinces_lakes')
> geometries = states.query(""admin == 'United States of America'"").geometry
> shapes = [(shape, n) for n, shape in enumerate(geometries)]
>
> ds = xray.Dataset(coords={'longitude': np.linspace(-125, -65, num=2000),
> 'latitude': np.linspace(50, 25, num=1000)})
> ds['states'] = rasterize(shapes, ds.coords)
> plotting requires the dev version of xray
>
> ds.states.plot()
>
> 
>
> Once you have the rasterized geometries, you can use them as arrays to do arithmetic: https://github.com/xray/xray/issues/503
>
> When we figure out how to represent coordinate reference systems properly in xray we might add in a direct wrapper for some of these rasterio functions.
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/xray/xray/issues/501#issuecomment-126461466.
##
Dr Sarah Harris
Research Fellow
School of Earth, Atmosphere and Environment
Room 227, 9 Rainforest Walk
Monash University
Ph: 03 9902 4243
Email: sarah.harris@monash.edu
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,98074194