-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PyProj instead of CartoPy for calculations #1455
Comments
So a basic Python 3.8 conda environment with all our deps (numpy, scipy, matplotlib, pint, xarray, pandas, pooch, traitlets) + netCDF4 comes in at 427M on my Mac. Installing PyProj addds proj and pyproj and comes in at 439M. Installing CartoPy on top of that pulls in 38 other packages (including GDAL, postgresql, and, somehow, boost) and weighs in at 845M. |
I would think that the xarray stuff except for That being said, I think this is a really good idea. CartoPy has been the coordinate transformation library of choice since it was the more likely to already be available and nicer to work with option back in 2018 when most the xarray in MetPy stuff started, but PyProj has matured a lot since then in all its So, it looks like there will be yet another antecedent PR to get in before #1353's replacement! A couple followup questions:
|
Some notes from today's telecon for things to target on this for 1.0:
|
So the work done in #1454 has revealed that we depend on CartoPy...a lot. Now while I love CartoPy, I have concerns that we cannot do much of the XArray smarts without CartoPy installed. While
parse_cf
was initially focused on the projections and that made sense, nowparse_cf
also includes the auto-detection of dimensions; none of that relies necessarily on CartoPy, but you can't get that stuff without CartoPy installed.My thinking is we should maybe move more things to use PyProj directly. Under the hood, CartoPy is making calls to PROJ anyway, so let's go closer to direct (i.e. python bindings for PROJ). This would allows us to not have our calculations rely on a graphics toolkit. We could consider making PyProj a required dependency, and be a whole lot more functional out of the box than we are without CartoPy currently.
PyProj, as of 2.2 (June 2019), includes creating projections from CF metadata so we could replicate pretty much all of what we're doing without adding a bunch more hand-coded mapping between CF and something. PyProj also has wheels on PyPI so they're not nearly as much a pain for users to install (and it's only dependency is a library CartoPy already relies on).
The text was updated successfully, but these errors were encountered: