-
Notifications
You must be signed in to change notification settings - Fork 168
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
Customizing Precipitation Intensity Range in plot_precip_field()
#430
Comments
Hello @rutkovskii and thanks for your enthusiastic input colorscales in pysteps/pysteps/visualization/precipfields.py Line 324 in ee60fa6
I suppose one more general approach would be to give the option to pass a a tuple of We don't have any specific plan in this sense and we would welcome a contribution from your side! |
Sounds great. cmap_builder seems quite helpful. Do you suggest creating a class around cmap_builder with |
Indeed, it's better to keep it simple and leave it to the user to define the custom colorbars, using cmap_builder or else. So accepting a simple class with those properties would be great. |
Having an example on creating the custom class (with cmap_builder) could be useful for future users. Should I make one to be placed into the examples directory? |
An example would be great! I think it would fit best as a python script so that it'll get rendered in the gallery of examples in our documentation, but the problem with that is that you would have to install camp_builder globally, something I'm not sure we want to do. The jupyter notebook would probably be less visible, but would give you the option to install camp_builder locally on the collab session only |
I will do it the example the way you believe is the best. Therefore, I can make:
I can do both if it is reasonable. |
@dnerini I decided to omit the use of cmap_builder in the example. From the docstring:
Custom Config with cmap_builder AND specifying over, under, bad colors:
Custom Config using the same colors as cmap_builder and specifying over, under, and bad colors: |
Hello @rutkovskii , thanks, lets keep it simple and do only the py example without cmap_builder |
@dnerini Do you have knowledge of where I may find a frame with high precipitation over 100 mm/hr? |
mmmh not sure if it reaches really 100 mm/h, but I'd say that among our example data, this one from BoM used in this example script reaches the highest intensities: https://pysteps.readthedocs.io/en/stable/auto_examples/plot_linear_blending.html#sphx-glr-auto-examples-plot-linear-blending-py |
@dnerini, I was wondering, on average, how long it usually takes for core developers to review and provide feedback on a contribution? Additionally, once a contribution is ready, do you typically merge it right away, or is there a waiting period? I'm just trying to get an estimate of when this change might be available in the master branch, as I plan to use it as a library for my thesis work. |
#433 is been merged into master |
@dnerini I checked out the Example for plotting, I used geodata to represent US on the map and it appears that pySTEPS version that used for examples does not used cartopy leading to
Wanted to bring that to you attention. |
hi @rutkovskii , thanks, yes, I'm aware, we consciously decided not to install cartopy during the build of the documentation, so that warning is expected |
Hello,
I am currently working with the code provided by @RubenImhoff, referenced in Issue #415. I noticed that PySTEPS uses a fixed range for precipitation intensity, which doesn't align well with my specific use case. My dataset, for instance, includes precipitation intensities ranging from 0 to 203.2 mm/h, which is beyond the default settings.
I am looking into modifying the
precipfield.py
to allow for customizable ranges that better represent different datasets.In the code shared by @RubenImhoff, the colorbar is generated as follows:
Similarly to above, I can define custom
cmap, norm, clevs, and clevs_str
variables and pass them into theplot_precip_field()
function. Of course, it requires more thinking and designing, but this is the thought in a nutshell.Before proceeding, I wanted to check if there are any existing plans or ongoing efforts to introduce this kind of functionality. If so, are there specific aspects or edge cases that I should be aware of? If not, what additional features or considerations would you like to see included in this enhancement? I am also available to get on call to discuss this enhancement.
I'm eager to contribute to the PySTEPS project and enhance its utility, especially in a way that supports my thesis work. Any guidance or suggestions would be greatly appreciated!
The text was updated successfully, but these errors were encountered: