-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow passing of cartopy_crs #47
Comments
cc @hdsingh |
As of now I will look into this issue after 11Oct (exams now). |
@rsignell-usgs (for now you can directly pass it in the form of string such as "LambertConformal"). Initially our idea was to pass the initial params with a YAML file, so only values in the form of strings were allowed. |
This is how I think it could be done: import cartopy.crs as ccrs
crs = ccrs.LambertConformal(central_longitude=40.,
central_latitude=60.,
globe=ccrs.Globe(ellipse='WGS84',
semimajor_axis=None,
)) Lets say this is the crs object parsed by metpy. If we want to pass just the name of this object it could be done by |
well, it could, but would be an alternate code path. This could be very OK, you can use the passed-in CRS object or you can set your own parameters. Extracting out the parameters from a passed-on object and populating the fields would only ever be on a best-attempt basis, because there are many options we cannot surface in the interface. |
In summary, I think this is a reasonable request that we can allow, when someone makes the effort to implement it. |
It would be nice to allow
xrviz
to handle ametpy
-generatedcartopy_crs
passed as part of theinitial_params
forxrviz
.hvplot
handles it just fine, but using it in theinitial_params
returnsTypeError: getattr(): attribute name must be string
. See:https://nbviewer.jupyter.org/gist/rsignell-usgs/56d8ff54708a95b45bb46f55a0677ab0
The text was updated successfully, but these errors were encountered: