Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions notebooks/Sec_05_RegionExtraction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"outputs": [],
"source": [
"pv_regional_rh = bbox.enclosed(pv_global_rh)\n",
"#print(pv_regional_rh.n_cells)\n",
"#print(pv_regional_rh)"
]
},
Expand All @@ -172,7 +173,8 @@
},
"outputs": [],
"source": [
"print(pv_global_rh)"
"#print(pv_global_rh)\n",
"print(pv_global_rh.n_cells)"
]
},
{
Expand All @@ -199,10 +201,13 @@
"lat_min = -5\n",
"lat_max = 35\n",
"\n",
"\n",
"bbox = BBox(lons=[lon_min, lon_max, lon_max, lon_min], \n",
" lats=[lat_min, lat_min, lat_max, lat_max])\n",
"\n",
"# The Bounding Box does not need to be a rectangle:\n",
"# bbox = BBox(lons=[lon_min, lon_max, lon_max, lon_min ], \n",
"# lats=[lat_min, lat_min, lat_max, lat_max-20 ])\n",
"\n",
"pv_regional_rh = bbox.enclosed(pv_global_rh) \n",
"\n",
"from geovista import GeoPlotter\n",
Expand All @@ -212,14 +217,24 @@
"plotter.show()"
]
},
{
"cell_type": "markdown",
"id": "4b0df5d3-be4e-48a5-b0ea-4ca88da016cc",
"metadata": {
"tags": []
},
"source": [
"Play with the longitude and latitude limits. Also, note that the Bounding Box does not need to be a rectangle as you could test above with `bbox = BBox(lons=[lon_min, lon_max, lon_max, lon_min],lats=[lat_min, lat_min, lat_max, lat_max-20])`.\n"
]
},
{
"cell_type": "markdown",
"id": "89030e96-2e30-40c7-bb97-ccf0af044d94",
"metadata": {},
"source": [
"## Get an Iris cube for an extracted region.\n",
"\n",
"While GeoVista provides the efficient tools for mesh region extraction, it and Iris know nothing about one another. So, to calculate a regionally-extracted Iris cube, GeoVista can do the hard work of determining the subset of cells required, but you must then reconstruct an Iris cube from that information. For now, at least, there are no ready-made tools for this (in either Iris or Geovista). However, the operation is possible, and may be instructive. So, for those interested, there is an extra notebook [\"MeshCube_Extraction.ipynb\"](./MeshCube_Extraction.ipynb), showing how this is done.\n"
"While GeoVista provides the efficient tools for mesh region extraction, it and Iris know nothing about one another. So, to calculate a regionally-extracted Iris cube, GeoVista can do the hard work of determining the subset of cells required, but you must then reconstruct an Iris cube from that information. For now, at least, there are no ready-made tools for this (in either Iris or Geovista). However, the operation is possible, and may be instructive. So, for those interested, there is an extra notebook [Bonus 03 MeshCube Extraction](./MeshCube_Extraction.ipynb), showing how this is done.\n"
]
},
{
Expand Down