uxarray icon indicating copy to clipboard operation
uxarray copied to clipboard

Support an option to choose a CRS to plot

Open kjnam opened this issue 1 year ago • 3 comments
trafficstars

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.

kjnam avatar Jul 10 '24 18:07 kjnam

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?

philipc2 avatar Jul 10 '24 18:07 philipc2

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 avatar Jul 10 '24 18:07 kjnam

@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.

kjnam avatar Jul 10 '24 23:07 kjnam