home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1467200120

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/7621#issuecomment-1467200120 https://api.github.com/repos/pydata/xarray/issues/7621 1467200120 IC_kwDOAMm_X85Xc7J4 52061672 2023-03-14T01:20:10Z 2023-03-14T01:21:40Z NONE

Thank you for checking the code, @kmuehlbauer. However, I am still experiencing issues even after fixing it.

Regarding the coordinates: - The y coordinate starts from the maximum values and decreases as you move down the array. - The latitude values increase with increasing y-coordinate values. - i.e., The latitude corresponding to the maximum y coordinate is around 85, and the one corresponding to the minimum y coordinate is around -85.

Regarding the precipitation data: - The structure is the same as the cell_lat/cell_lon array. - The y coordinate starts from the maximum values and decreases as you move down the array. - If I plot the precipitation with the xy coordinate, it looks like this, indicating that the data is still inverted. Please refer to these images for further clarification: Note that the unit is read incorrectly as degrees_north and degrees_east; please ignore it.

Here is the updated code:

``` lons = ds_NSIDC_output_rasterio.cell_lon.load() lons_array = lons[0][0]

lats = ds_NSIDC_output_rasterio.cell_lat.load() lats_array = np.arange(lats[0][0][0], lats[0][-1][0], -1*(lats.max().values-lats.min().values)/ds_NSIDC_output.y.size)

ds_NSIDC_output_rasterio_xymanual = xr.DataArray( data=ds_NSIDC_output_rasterio.precipitation_total_surface_flux.sel(band=1).values, dims = ["y","x"], coords = dict( y = lats_array, x = lons_array.values ) ) ds_NSIDC_output_rasterio_xymanual.plot() ```

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