|
| 1 | +--- |
| 2 | +file_format: mystnb |
| 3 | +kernelspec: |
| 4 | + name: python3 |
| 5 | +--- |
| 6 | + |
| 7 | +# Periodic Mesh Support |
| 8 | + |
| 9 | +We currently make the simplifying assumption that spherical meshes are a |
| 10 | +special instance of periodic meshes, which are periodic across the antimeridian. |
| 11 | +We support both planar periodic and map projected spherical meshes, using the |
| 12 | +same methods, by assuming that the period (in the x and y directions |
| 13 | +respectively) is constant. This assumption is valid for planar periodic meshes |
| 14 | +and for some map projections, but falls apart for certain map projection where |
| 15 | +the antimeridian does not follow a strait line. Therefore we only support a |
| 16 | +subset of `cartopy` projections, which are listed below. Future work will |
| 17 | +develop a more elaborate method of dealing with spherical mesh periodicity, |
| 18 | +which in turn will expand the list supported map projections. |
| 19 | + |
| 20 | +For patches that cross a periodic boundary we simply correct the coordinates to |
| 21 | +remove the periodicity, which enables plotting. Future work will mirror the |
| 22 | +patches across the periodic boundary, so as to more accurately demonstrate the |
| 23 | +periodic nature of the mesh. |
| 24 | + |
| 25 | +<!-- |
| 26 | +## Planar Periodic Meshes |
| 27 | +
|
| 28 | +```{code-cell} ipython3 |
| 29 | +--- |
| 30 | +mystnb: |
| 31 | + remove_code_source: true |
| 32 | +--- |
| 33 | +import mosaic |
| 34 | +import matplotlib.pyplot as plt |
| 35 | +
|
| 36 | +# download and read the mesh from lcrc |
| 37 | +ds = mosaic.datasets.open_dataset("doubly_periodic_4x4") |
| 38 | +
|
| 39 | +# create the figure and a GeoAxis |
| 40 | +fig, ax = plt.subplots(constrained_layout=True,) |
| 41 | +
|
| 42 | +descriptor = mosaic.Descriptor(ds) |
| 43 | +
|
| 44 | +pc = mosaic.polypcolor( |
| 45 | + ax, descriptor, ds.indexToCellID, alpha=0.8, antialiaseds=True, ec="k" |
| 46 | +) |
| 47 | +
|
| 48 | +ax.scatter(descriptor.ds.xCell, descriptor.ds.yCell, c='k') |
| 49 | +ax.scatter(*descriptor.cell_patches.T, c='tab:blue', marker='^') |
| 50 | +ax.scatter(ds.xVertex, ds.yVertex, ec='tab:orange', fc='none', marker='o', s=5.) |
| 51 | +ax.set_aspect('equal') |
| 52 | +``` |
| 53 | +--> |
| 54 | + |
| 55 | +## Supported Map Projections for Spherical Meshes |
| 56 | + |
| 57 | +Currently, the only support map projection are: |
| 58 | +- <inv:#*.PlateCarree> |
| 59 | +- <inv:#*.LambertCylindrical> |
| 60 | +- <inv:#*.Mercator> |
| 61 | +- <inv:#*.Miller> |
| 62 | +- <inv:#*.Robinson> |
| 63 | +- <inv:#*.Stereographic> |
| 64 | +- <inv:#*.RotatedPole> |
| 65 | +- <inv:#*.InterruptedGoodeHomolosine> |
| 66 | +- <inv:#*.EckertI> |
| 67 | +- <inv:#*.EckertII> |
| 68 | +- <inv:#*.EckertIII> |
| 69 | +- <inv:#*.EckertIV> |
| 70 | +- <inv:#*.EckertV> |
| 71 | +- <inv:#*.EckertVI> |
| 72 | +- <inv:#*.EqualEarth> |
| 73 | +- <inv:#*.NorthPolarStereo> |
| 74 | +- <inv:#*.SouthPolarStereo> |
| 75 | + |
| 76 | +It is important to note that planer (non-periodic) meshes are not limited to |
| 77 | +this list of map projections and can choose from the full list of `cartopy` |
| 78 | +[projections](https://scitools.org.uk/cartopy/docs/latest/reference/projections.html). |
0 commit comments