UXARRAY / uxarray

Xarray extension for unstructured climate and global weather data analysis and visualization.
https://uxarray.readthedocs.io/
Apache License 2.0
148 stars 31 forks source link

Support an option to choose a CRS to plot #849

Open kjnam opened 1 month ago

kjnam commented 1 month ago

Proposed new feature or change:

It would be great if plotting routines support other CRS than the default lat-long.

The current plotting code using GeoDataFrame assumes that the CRS is in lat-long. Model data are not always in lat-long, and it is good to keep the original coordinate system in the visualization, though the data coordinate system can be converted into lat-long before plotting. I think passing a CRS to the plotting routines can provide a way to do this.

philipc2 commented 1 month ago

There's some discussion about this in #840

Do you have a dataset example that is in a different projection I could use for testing?

kjnam commented 1 month ago

Thanks for pointing to issue 840. It is very helpful. The issue looks like more about projections of plots, not the CRS of the data. I will create a MVCE data for this later.

kjnam commented 1 month ago

@philipc2 I looked through the codes, and I realized that this is more than just plotting. _read_ugrid assumes the coordinates are in lat and long, so, the variable names are renamed. It appears that uxarray works with a geographic coordinate system mostly, and I see no simple way to use other coordinate systems like UTM with uxarray so far. I guess I need to ponder a bit more about this. Any advice on this will be appreciated.