C2SM / iconarray

R&D Python package for processing ICON data with xarray
https://c2sm.github.io/iconarray/
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Missing coordinates in select_data() output for use with psyplot #31

Open clairemerker opened 1 year ago

clairemerker commented 1 year ago

Coordinates clon_bnds and clat_bnds get lost in the xarray.DataArray stored in the dictionary output of select_data(). Those coordinates are needed if the xarray.DataArray should be converted to an xarray.Dataset and then used with psyplot. -> find a way to keep those coordinates.

clairemerker commented 1 year ago

One solution would be to add the coordinates manually to the data array... Not very elegant... da = da.assign_coords(clon_bnds=(["ncells", "vertices"],ds.clon_bnds.values))

victoria-cherkas commented 1 year ago

Should we try to add this into https://github.com/C2SM/iconarray/pull/19 ?