home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where user = 33153877 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, created_at (date), updated_at (date)

issue 4

  • Plotting interpolated data causes artefacts 3
  • Provide a way to specify how long open_dataset tries to fetch data before timing out 3
  • Colormap Normalisation Giving Unexpected/Incorrect Output 1
  • Selecting dates with .sel() doesn't work when time index is in cftime 1

user 1

  • huaracheguarache · 8 ✖

author_association 1

  • NONE 8
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1521731294 https://github.com/pydata/xarray/issues/7758#issuecomment-1521731294 https://api.github.com/repos/pydata/xarray/issues/7758 IC_kwDOAMm_X85as8be huaracheguarache 33153877 2023-04-25T12:46:52Z 2023-04-25T12:46:52Z NONE

@dcherian Interesting! There should ideally be a way to set that because 32-64 seconds is way to long to wait before timing out in my opinion.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Provide a way to specify how long open_dataset tries to fetch data before timing out 1668898601
1509899467 https://github.com/pydata/xarray/issues/7758#issuecomment-1509899467 https://api.github.com/repos/pydata/xarray/issues/7758 IC_kwDOAMm_X85Z_zzL huaracheguarache 33153877 2023-04-15T17:21:07Z 2023-04-15T17:21:07Z NONE

Ah, got it! In that case it's a real server since I don't mount anything.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Provide a way to specify how long open_dataset tries to fetch data before timing out 1668898601
1509633511 https://github.com/pydata/xarray/issues/7758#issuecomment-1509633511 https://api.github.com/repos/pydata/xarray/issues/7758 IC_kwDOAMm_X85Z-y3n huaracheguarache 33153877 2023-04-15T08:21:16Z 2023-04-15T15:33:44Z NONE

I'm using netCDF4. I'm not sure what the difference between a real server and a remote file system is, but I use OPeNDAP to fetch the data I need.

One example is the following data file (the first link under the access subheader): https://thredds.met.no/thredds/catalog/osisaf/met.no/ice/index/v2p1/nh/catalog.html?dataset=osisaf/met.no/ice/index/v2p1/nh/osisaf_nh_sie_monthly.nc

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Provide a way to specify how long open_dataset tries to fetch data before timing out 1668898601
1419511942 https://github.com/pydata/xarray/issues/7504#issuecomment-1419511942 https://api.github.com/repos/pydata/xarray/issues/7504 IC_kwDOAMm_X85UnAiG huaracheguarache 33153877 2023-02-06T17:57:56Z 2023-02-06T17:57:56Z NONE

Ok, great! Thanks for the tip.

On Mon, Feb 6, 2023 at 13:51, Spencer Clark @.***> wrote:

Indeed currently we do not support indexing a CFTimeIndex-backed array using a list of strings, but that's something I think we would be happy to change (e.g. we do accept a list of strings to interp for CFTimeIndex-backed arrays).

For the time being you should be able to use cftime.DatetimeAllLeap values themselves:

ds

.

sel

(

time

=

[

cftime

.

DatetimeAllLeap

(

2023

,

1

,

1

),

cftime

.

DatetimeAllLeap

(

2023

,

1

,

2

)])

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting dates with .sel() doesn't work when time index is in cftime 1572434353
977165503 https://github.com/pydata/xarray/issues/4061#issuecomment-977165503 https://api.github.com/repos/pydata/xarray/issues/4061 IC_kwDOAMm_X846Ply_ huaracheguarache 33153877 2021-11-23T21:01:17Z 2021-11-23T21:01:17Z NONE

I also have an issue where xarray doesn't produce the correct plot when normalizing with BoundaryNorm:

```python import xarray as xr import matplotlib.pyplot as plt import matplotlib.colors as colors from cmcrameri import cm

airtemps = xr.tutorial.open_dataset("air_temperature")

Convert to Celsius.

air = airtemps.air - 273.15 air.attrs = airtemps.air.attrs air.attrs["units"] = "deg C"

Select a timestep.

air2d = air.isel(time=500)

Plotting discrete bounds with matplotlib works fine.

bounds = [x for x in range(-30, 31, 10)] norm = colors.BoundaryNorm(boundaries=bounds, extend='both', ncolors=cm.vik.N)

fig, ax = plt.subplots() cs = ax.pcolormesh(air2d.lon, air2d.lat, air2d, cmap=cm.vik, norm=norm) fig.colorbar(cs) plt.show()

Plotting with xarray doesn't work.

fig, ax = plt.subplots() air2d.plot.pcolormesh(ax=ax, norm=norm) plt.show() ``` First one is from matplotlib:

Second one is from xarray:

I also get the following traceback after running the script:

bash Traceback (most recent call last): File "/home/michael/miniconda3/envs/testing_xarray/lib/python3.10/site-packages/matplotlib/cbook/__init__.py", line 287, in process func(*args, **kwargs) File "/home/michael/miniconda3/envs/testing_xarray/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 3056, in mouse_move s = self._mouse_event_to_message(event) File "/home/michael/miniconda3/envs/testing_xarray/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 3048, in _mouse_event_to_message data_str = a.format_cursor_data(data).rstrip() File "/home/michael/miniconda3/envs/testing_xarray/lib/python3.10/site-packages/matplotlib/artist.py", line 1282, in format_cursor_data neighbors = self.norm.inverse( File "/home/michael/miniconda3/envs/testing_xarray/lib/python3.10/site-packages/matplotlib/colors.py", line 1832, in inverse raise ValueError("BoundaryNorm is not invertible") ValueError: BoundaryNorm is not invertible

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.10.0 | packaged by conda-forge | (default, Nov 20 2021, 02:25:18) [GCC 9.4.0] python-bits: 64 OS: Linux OS-release: 5.14.18-300.fc35.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: ('en_GB', 'UTF-8') libhdf5: 1.12.1 libnetcdf: 4.8.1 xarray: 0.20.1 pandas: 1.3.4 numpy: 1.21.4 scipy: 1.7.2 netCDF4: 1.5.8 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.5.1.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 3.5.0 cartopy: 0.20.1 seaborn: None numbagg: None fsspec: None cupy: None pint: None sparse: None setuptools: 59.2.0 pip: 21.3.1 conda: None pytest: None IPython: 7.29.0 sphinx: None
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Colormap Normalisation Giving Unexpected/Incorrect Output 618141254
974505817 https://github.com/pydata/xarray/issues/5987#issuecomment-974505817 https://api.github.com/repos/pydata/xarray/issues/5987 IC_kwDOAMm_X846FcdZ huaracheguarache 33153877 2021-11-19T22:10:48Z 2021-11-19T22:10:48Z NONE

@mathause Sorry for the late reply! I've been very busy lately, but yes, please move it to a discussion.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting interpolated data causes artefacts 1052918815
968380475 https://github.com/pydata/xarray/issues/5987#issuecomment-968380475 https://api.github.com/repos/pydata/xarray/issues/5987 IC_kwDOAMm_X845uFA7 huaracheguarache 33153877 2021-11-14T22:56:32Z 2021-11-14T22:56:44Z NONE

@spencerkclark Thanks for the suggestion! I haven't made any serious tests yet, but my initial tests worked fine =)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting interpolated data causes artefacts 1052918815
968291159 https://github.com/pydata/xarray/issues/5987#issuecomment-968291159 https://api.github.com/repos/pydata/xarray/issues/5987 IC_kwDOAMm_X845tvNX huaracheguarache 33153877 2021-11-14T13:28:20Z 2021-11-14T13:28:20Z NONE

I decided to also look at what happens when you plot with contourf. In this case both the plot of the original data and the interpolated data have a white line at the central longitude, but the interpolated data also has white lines at the poles:

Original MPI-ESM

Interpolated MPI-ESM

Here's the code that produced the plots:

```python import xarray as xr import matplotlib.pyplot as plt import cartopy.crs as ccrs

cesm2_waccm = xr.open_dataset('pr_day_CESM2-WACCM_ssp245_r2i1p1f1_gn_20750101-20841231.nc') mpi = xr.open_dataset('pr_day_MPI-ESM1-2-LR_ssp245_r1i1p1f1_gn_20750101-20941231.nc')

cesm2_waccm_subset = cesm2_waccm.sel(time=slice('2075-01-01', '2075-12-31')).mean(dim='time') mpi_subset = mpi.sel(time=slice('2075-01-01', '2075-12-31')).mean(dim='time')

map_proj = ccrs.PlateCarree()

Now this also produces a white line.

plot = mpi_subset.pr.plot.contourf(subplot_kws={'projection': map_proj}) plot.axes.coastlines() plt.show()

mpi_interp = mpi_subset.interp(lat=cesm2_waccm_subset['lat'], lon=cesm2_waccm_subset['lon'])

Has a white line at the central longitude.

plot = mpi_interp.pr.plot.contourf(subplot_kws={'projection': map_proj}) plot.axes.coastlines() plt.show() ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting interpolated data causes artefacts 1052918815

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 15.483ms · About: xarray-datasette