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

Implement the STEPS model in the spectral domain #78

Closed
pulkkins opened this issue Apr 13, 2019 · 3 comments
Closed

Implement the STEPS model in the spectral domain #78

pulkkins opened this issue Apr 13, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@pulkkins
Copy link
Member

pulkkins commented Apr 13, 2019

The AR(2) models and the noise generation in STEPS can be implemented in the spectral domain. See

S. Pulkkinen, V. Chandrasekar and A.-M. Harri, Stochastic Spectral Method for Radar-Based Probabilistic Precipitation Nowcasting, Journal of Atmospheric and Oceanic Technology, doi: 10.1175/JTECH-D-18-0242.1.

I implemented the above method in the spectral branch. Here is the output of the old version of nowcasts.steps.forecast by using the FMI data (grid size 760x1226 pixels) with 24 ensemble members and 12 threads:

Starting nowcast computation.
Computing nowcast for time step 1... 8.15 seconds.
Computing nowcast for time step 2... 8.23 seconds.
Computing nowcast for time step 3... 8.11 seconds.
Computing nowcast for time step 4... 8.05 seconds.
Computing nowcast for time step 5... 7.90 seconds.
Computing nowcast for time step 6... 8.04 seconds.
Computing nowcast for time step 7... 8.17 seconds.
Computing nowcast for time step 8... 8.11 seconds.
Computing nowcast for time step 9... 8.09 seconds.
Computing nowcast for time step 10... 7.94 seconds.
Computing nowcast for time step 11... 7.94 seconds.
Computing nowcast for time step 12... 8.07 seconds.

The memory usage was around 26% (on a computer with 50 Gb memory). Using the spectral implementation, I got the following results:

Starting nowcast computation.
Computing nowcast for time step 1... 4.48 seconds.
Computing nowcast for time step 2... 4.66 seconds.
Computing nowcast for time step 3... 4.65 seconds.
Computing nowcast for time step 4... 4.54 seconds.
Computing nowcast for time step 5... 4.50 seconds.
Computing nowcast for time step 6... 4.48 seconds.
Computing nowcast for time step 7... 4.51 seconds.
Computing nowcast for time step 8... 4.43 seconds.
Computing nowcast for time step 9... 4.46 seconds.
Computing nowcast for time step 10... 4.48 seconds.
Computing nowcast for time step 11... 4.58 seconds.
Computing nowcast for time step 12... 4.52 seconds.

Memory usage was reduced to 16%.

There are still rough edges and not everything is working. The only noise generation method implemented in the spectral domain is the non-parametric one. Once all bugs have been fixed and the other noise generators have been implemented in the spectral domain, I would recommend using the new version as the default choice. The classical STEPS model should still be kept in pysteps for educational purposes (and also for the localized versions where the localization is done in the spatial domain).

@pulkkins pulkkins added the enhancement New feature or request label Apr 13, 2019
@dnerini
Copy link
Member

dnerini commented Apr 16, 2019

This looks great, a fantastic improvement in performance!
I wonder whether the the forecast quality is somehow affected?
If not, I agree that this should become default.

@pulkkins
Copy link
Member Author

pulkkins commented Apr 16, 2019

The forecast quality should not be affected, as the forecast model remains the same. It's just implemented in a different domain. The only difference I can see is that the spectral version uses only one mean value for the whole precipitation field across all scales, whereas the original version estimates the mean value separately for each cascade level. According to my experiments, the mean value for all cascade levels beyond the first one is always very close to zero, so the difference is not significant.

@dnerini
Copy link
Member

dnerini commented Jan 28, 2020

I suppose #133 closes this issue?

Great piece of work @pulkkins !

@dnerini dnerini closed this as completed Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants