uafgeotools / rtm

A Python package for locating infrasound sources using reverse time migration
https://uaf-rtm.readthedocs.io/
MIT License
38 stars 13 forks source link

transform error in produce_dem #43

Closed davidfee5 closed 4 years ago

davidfee5 commented 4 years ago

I'm now getting an error on an unsupported transform in produce_dem. Looks like cartopy is unhappy.

"Generating DEM hillshade plot... Traceback (most recent call last):

File "", line 4, in search_dem = produce_dem(search_grid, external_file=EXTERNAL_FILE, plot_output=True)

File "/Users/dfee/repos/rtm/rtm/grid.py", line 365, in produce_dem ax.scatter(*dem.grid_center, s=50, color='limegreen',

File "/Users/dfee/anaconda/envs/rtm/lib/python3.8/site-packages/cartopy/mpl/geoaxes.py", line 305, in wrapper raise ValueError('Invalid transform: Spherical {} '

ValueError: Invalid transform: Spherical scatter is not supported - consider using PlateCarree/RotatedPole."

liamtoney commented 4 years ago

I think this can be fixed by replacing ccrs.Geodetic() withccrs.PlateCarree() in the offending line. See: https://stackoverflow.com/questions/13657748/contouring-with-cartopy-valueerror-invalid-transform-spherical-contouring-is

davidfee5 commented 4 years ago

Yep, that was easy! I'll create a pull request.