Hello,
I usually use wradlib to extraxt precipitation from the RADKLIM and RADOLAN dataset (DWD). Now I want to do the same but with the output of a climate model, which has a rotated WGS84 as CRS. I am struggling to set it up. I was following my usual workflow based on this tutorial:
Recipe 5: Zonal Statistics - Cartesian Grid — wradlib, Approach 2, Zonal Stats - Rectangular Grid - Polygons, but somehow I cannot reproject the grid correctly with this: proj4_string = “+proj=ob_tran +o_proj=latlon +o_lat_p=39.25 +o_lon_p=162.0”
The Climate model has information about the latitude and longitude of the rotated pole. In the tutorial it says, that the grid can just be generated from native RADOLAN coordinates. However, in the function description of wradlib.zonalstats.grid_centers_to_vertices it says that it should happen in “native” grid projection. So basically I am wondering, if I am using the right approach, and whether I can use wradlib.zonalstats.grid_centers_to_vertices also for a grid that stems from rotated WGS84. Any suggestions how else I can solve the problem are welcome. I am using wradlib for the extraction of precipitation for polygons (subbasins) because the method there seems most accurate. Thank you!
Hi @plvoit,
in the tutorial the native RADOLAN coordinates are used, because wradlib.zonalstats.grid_centers_to_vertices
only works for cartesian coordinates (1D x and y).
So I’m assuming that you can create the vertices in the rotated pole coordinates and afterwards project these vertice coordinates into your target projection.
Can be more specific on your climate model and the problems with reprojection?
Best,
Kai
Dear @kmuehlbauer,
thank you for your reply. This answers my question, I did it exactly as you said. The main problem and partly reason for my uncertainty was that the proj string in the metadata of my files was wrong, so the vertice coordinates were in the wrong location after reprojecting. After contacting the creators (DWD) they send me the correct proj4 string and now everything works as expected. Best, Paul
Hi @plvoit, thanks for the follow-up. Great it works for you now.