Skip to content
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

MIN: update radolan notebooks #17

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions notebooks/radolan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"source": [
"RADOLAN is abbreviated from the german **RA**dar-**O**n**L**ine-**AN**eichung, which means Radar-Online-Adjustment.\n",
"\n",
"Using it's [network of 17 weather radar](https://www.dwd.de/SharedDocs/broschueren/DE/presse/Wetterradar_PDF.pdf?__blob=publicationFile&v=5) the German Weather Service provides many products for high resolution precipitation analysis and forecast. A comprehensive product list can be found in chapter [RADOLAN Product Showcase](radolan/radolan_showcase.ipynb).\n",
"Using it's [network of 17 weather radar](https://www.dwd.de/SharedDocs/broschueren/DE/presse/wetterradar_pdf.pdf?__blob=publicationFile&v=5) the German Weather Service provides [many products](https://www.dwd.de/DE/leistungen/radolan/produktuebersicht/radolan_produktuebersicht_pdf.pdf?__blob=publicationFile&v=6) for high resolution precipitation analysis and forecast. A comprehensive product list can be found in chapter [RADOLAN Product Showcase](radolan/radolan_showcase.ipynb).\n",
"\n",
"These composite products are distributed in the [RADOLAN Binary Data Format](radolan/radolan_format.ipynb) with an ASCII header. All composites are available in [Polar Stereographic Projection](radolan/radolan_grid.ipynb#Polar-Stereographic-Projection) which will be discussed in the chapter [RADOLAN Grid](radolan/radolan_grid.ipynb)."
]
Expand Down Expand Up @@ -71,7 +71,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.6"
},
"toc": {
"colors": {
Expand Down
27 changes: 5 additions & 22 deletions notebooks/radolan/radolan_format.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import wradlib as wrl\n",
Expand All @@ -50,9 +48,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# load radolan files\n",
Expand All @@ -65,9 +61,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"attrs = wrl.io.parse_dwd_composite_header(header)\n",
Expand All @@ -84,9 +78,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# load radolan file\n",
Expand Down Expand Up @@ -127,15 +119,6 @@
" print(key + ':', value)\n",
"print(\"----------------------------------------------------------------\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -155,7 +138,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.6"
},
"toc": {
"colors": {
Expand Down
90 changes: 82 additions & 8 deletions notebooks/radolan/radolan_grid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"source": [
"The projected composite raster is equidistant with a grid-spacing of 1.0 km in most cases. There are composites which have 2.0 km grid-spacing (e.g. PC).\n",
"\n",
"There are three different grid sizes, the well-known 900 rows by 900 columns (normal), 1500 rows by 1400 columns (extended, european) and 460 rows by 460 columns (small).\n",
"There are five different grid sizes, the well-known 900 rows by 900 columns (normal, 1km grid spacinf), 1500 rows by 1400 columns (extended, 1km grid spacing), 460 rows by 460 columns (small, 2km grid spacing) and the legacy 450 rows by 450 rows (2km grid spacing). Since the RADSYS-E project is finalized an extended national composite with 1100 rows by 900 columns (normal_wx, 1km grid spacing) is available, too.\n",
"\n",
"Common to all is that the plane of projection intersects the earth sphere at $\\phi_0 = 60.0^{\\circ}N$. The cartesian co-ordinate system is aligned parallel to the $\\lambda_0 = 10.0^{\\circ}E$ meridian.\n",
"\n",
"The reference point ($\\lambda_m$, $\\phi_m$) is $9.0^{\\circ}E$ and $51.0^{\\circ}N$, which is the center of the two smaller grids. The extended grid has an offset in respect to this reference point of 350km by 150km.\n",
"The reference point ($\\lambda_m$, $\\phi_m$) is $9.0^{\\circ}E$ and $51.0^{\\circ}N$, which is the center of the two smaller grids. The extended european grid has an offset in respect to this reference point of 350km by 150km, the extended national grid 100km by -80km.\n",
"\n",
"The earth as sphere with an radius of 6370.04 km is used for all calculations.\n",
"\n",
Expand Down Expand Up @@ -77,9 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import wradlib as wrl\n",
Expand All @@ -93,14 +91,30 @@
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 900x900, 1km grid box"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"radolan_grid_xy = wrl.georef.get_radolan_grid(900,900)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_xy.shape, *radolan_grid_xy[0,0,:]))"
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_xy.shape, *radolan_grid_xy[0,0,:]))\n",
"radolan_grid_ll = wrl.georef.get_radolan_grid(900,900, wgs84=True)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_ll.shape, *radolan_grid_ll[0,0,:]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1100x900, 1km grid box"
]
},
{
Expand All @@ -109,7 +123,66 @@
"metadata": {},
"outputs": [],
"source": [
"radolan_grid_ll = wrl.georef.get_radolan_grid(900,900, wgs84=True)\n",
"radolan_grid_xy = wrl.georef.get_radolan_grid(1100,900)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_xy.shape, *radolan_grid_xy[0,0,:]))\n",
"radolan_grid_ll = wrl.georef.get_radolan_grid(1100,900, wgs84=True)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_ll.shape, *radolan_grid_ll[0,0,:]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1500x1400, 1km grid box"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"radolan_grid_xy = wrl.georef.get_radolan_grid(1500,1400)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_xy.shape, *radolan_grid_xy[0,0,:]))\n",
"radolan_grid_ll = wrl.georef.get_radolan_grid(1500,1400, wgs84=True)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_ll.shape, *radolan_grid_ll[0,0,:]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 460x460, 2km grid box"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"radolan_grid_xy = wrl.georef.get_radolan_grid(460,460)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_xy.shape, *radolan_grid_xy[0,0,:]))\n",
"radolan_grid_ll = wrl.georef.get_radolan_grid(460,460, wgs84=True)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_ll.shape, *radolan_grid_ll[0,0,:]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 450x450, 2km grid box"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"radolan_grid_xy = wrl.georef.get_radolan_grid(450,450)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_xy.shape, *radolan_grid_xy[0,0,:]))\n",
"radolan_grid_ll = wrl.georef.get_radolan_grid(450,450, wgs84=True)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_ll.shape, *radolan_grid_ll[0,0,:]))"
]
},
Expand Down Expand Up @@ -253,6 +326,7 @@
"metadata": {},
"outputs": [],
"source": [
"radolan_grid_xy = wrl.georef.get_radolan_grid(900,900)\n",
"radolan_grid_ll = wrl.georef.reproject(radolan_grid_xy, projection_source=proj_stereo, projection_target=proj_wgs)\n",
"print(\"{0}, ({1:.4f}, {2:.4f})\".format(radolan_grid_ll.shape, *radolan_grid_ll[0,0,:]))"
]
Expand Down Expand Up @@ -349,7 +423,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.6"
},
"toc": {
"colors": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/radolan/radolan_network.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.6"
},
"toc": {
"colors": {
Expand Down
16 changes: 5 additions & 11 deletions notebooks/radolan/radolan_quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import wradlib as wrl\n",
Expand Down Expand Up @@ -78,9 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# do some masking\n",
Expand All @@ -92,9 +88,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# Get coordinates\n",
Expand All @@ -112,7 +106,7 @@
"# plot function\n",
"pl.pcolormesh(x, y, rwdata, cmap=\"viridis\")\n",
"cb = pl.colorbar(shrink=0.75)\n",
"cb.set_label(\"mm/h\")\n",
"cb.set_label(\"mm * h-1\")\n",
"pl.title('RADOLAN RW Product Polar Stereo \\n' + rwattrs['datetime'].isoformat())\n",
"pl.grid(color='r')"
]
Expand Down Expand Up @@ -142,7 +136,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.6"
},
"toc": {
"colors": {
Expand Down
Loading