-
Notifications
You must be signed in to change notification settings - Fork 5
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
Plotting operational ICON data and benchmarking #24
Comments
hey @guidocioni! thanks for your input here! I am currently releasing the new version 1.3.0 for each package (psyplot, psy-simple, psy-maps and psyplot-gui) and has just been finished. I'd be happy to do some benchmarking here. A few comments:
|
you can pass an import cartopy.crs as ccrs
ax = ccrs.Robinson()
psy.plot.mapplot(ax=ax, ...) Alternatively you can also do this afterwards, then you need to do a sp = psy.plot.mapplot(...)
fig = sp.plotters[0].ax.figure
fig.set_figwidth(...)
fig.set_figheight(...) |
Hey Philipp, |
Hey @guidocioni, sorry, there seems to be a misunderstanding. |
Uhm actually from my previous tests with regular lat-lon grids I found out that |
hey @guidocioni, yes, this is indeed true for regular lat-lon grids. But you cannot use PS: As mentioned before, this is how you would do it manually. In psy-maps I am avoiding the use |
This is not a bug but instead a request of clarifications and additional infos.
I have a suite of scripts which download, process and plot data from the operational ICON model run at DWD and available on opendata.dwd.de. This data contains a LOT of points so optimizing the processing and plotting of data is paramount in order to maintain the script operational every day.
I'm trying to understand whether a transition from my combination of
basemap
andmatplotlib
topsyplot
would be possible. In order to do that I'm trying to benchmark execution time ofpsyplot
when doing some of my standard plots. In theory, as far as I understand, for filled contour plotspsyplot
is callingpyplot.tricontourf
under the hood, so the difference should not be that big. The only difference, I guess, is an additional layer of preprocessing on the data, which I'm doing anyway in my script.However I'm having some problems with
psy-maps
.First of all, as the files downloaded from DWD opendata server do not have grid information inside (presumably to save space) I need to do a
cdo setgrid
before passing the file topsyplot.project.plot.mapplot
function otherwise the plotting does not work. As far as I understandpsyplot
does not only needclat
andclon
from the grid but also the edges. Is it possible to use one of the more primitive methods beforemapplot
to pass only three 1-dimensional arrays (e.g.clat
,clon
anddata
) as done inpyplot.tricontourf
? This way I can use an external file to store only the grid information as I currently do.Second, I tried to reproduce my basic plot that you see here
![download (5)](https://user-images.githubusercontent.com/12760310/94789014-b0daa000-03d4-11eb-87b6-00122f8edebe.png)
which I simply do like this:
read_dataset
,get_projection
andget_coordinates
are functions that I wrote to simplify the code. They only wrap somexarray
andbasemap
calls. This takes about 34 seconds of wall time; the input array has dimensionstime: 93, ncells: 2949120
. The coordinateslat
andlon
are saved in a different file.Trying to do the same with
psy-maps
I first created a file where I also store the entire grid information inside (not onlyclat
andclon
otherwise it doesn't work as said before)I get this result
![download (6)](https://user-images.githubusercontent.com/12760310/94789588-60177700-03d5-11eb-8cff-266059d9b73f.png)
which takes about 50 seconds.
It seems that the
levels
parameter is completely ignored and somehow I cannot pass thepyplot
axis tomapplot
to control the figure size.Do you have any idea on how to create a plotting script that I could use to reproduce my plotting setup so that I could benchmark it and see whether it is really faster?
Right now in the documentation of
psy-maps
there are only examples with really small grids so I'm not sure how the packages would behave for larger grids.The text was updated successfully, but these errors were encountered: