This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| a = np.linspace(0, 1, 256).reshape(1,-1) | |
| a = np.vstack((a,a)) | |
| plot_spec = None | |
| if plot_spec is None: | |
| # Get a list of the colormaps in matplotlib. Ignore the ones that end with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Calculating the grate circle distance from a point | |
| ================================================== | |
| This example demonstrates how we might use an external library (pyproj) to | |
| calculate the distance from our points in a cube to a specific location, | |
| using our cubes grid mapping. We then associate this information | |
| onto our original cube as an auxiliary coordinate, since this relates to the | |
| original phenomena. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import cartopy.crs as ccrs | |
| import iris | |
| from iris.coord_systems import GeogCS | |
| from iris.cube import Cube | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import cartopy.crs as ccrs | |
| import matplotlib.pyplot as plt | |
| def workaround_gridlines(src_proj, labels=True): | |
| # Workaround for plotting lines of constant latitude/longitude as gridlines | |
| # labels not supported for this projection. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import iris | |
| def lat_lon_cube(x, mval, latgrid, longrid): | |
| """ | |
| Returns a masked cube with a latitude and longitude suitable for testing. | |
| Args: |
NewerOlder