issue_comments: 968291159
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/5987#issuecomment-968291159 | https://api.github.com/repos/pydata/xarray/issues/5987 | 968291159 | IC_kwDOAMm_X845tvNX | 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 } |
1052918815 |