Skip to content

Commit

Permalink
Hackathon July 2023 (#351)
Browse files Browse the repository at this point in the history
* Fixed issue with loading older rmi radar hdf5 files

* Implement no-rain check on NWP fields and implement the no-rain-radar + no-rain-nwp case

* Initialisation of the noise cascade with random noise (with correct spatial correlation).

* Implement no-rain check on radar fields/set default autocorrelation parameters

* Avoid accidentally masking precip arrays by passing a copy to spatial_correlation()

* Renormalize radar extrapolation cascade after AR(2)-evolution to not lose power

* Implement optional norain_thr parameter in the pysteps blending routine.

This allows some flexibility for when we consider the radar rainfall field to contain "no rain", since there will usually be some clutter present even when it's dry.
The same does not hold for NWP, since there is no clutter there.

This also introduces the new utility function blending.utils.check_norain

* Refactoring of the extrapolation:
    -Precipiation and noise cascade are recomposed before extrapolation
    -Both fields are advected
    -They are decomposed again
This removes the loss of power in the smallest scales due to the interpolation needed for the
semilagrangian advection.
In addition computational cost is reduced because the number of
extrapolation is greatly reduced.

* Implement no-rain-radar and rain-nwp case

* refactoring and changes to take into account the maximum number of wet grid cells instead of the maximum per grid cell in NWP

* make sure precip_thr is None does not give an error in _determine_max_nr_rainy_cells_nwp function

* added zerovalue for filling mask after extrapolation and fixed extrapolation in case of not subtimesteps

* Add tests for:
- blending.utils.check_norain
- load NWP
- No rain cases

* Clean up and checks to ensure ensemble members remain the same during multi-threading

* Run black

* Add missing 'seed' parameter

* fix tests by removing redundant statement and add print statements

---------

Co-authored-by: RubenImhoff <r.o.imhoff@live.nl>
Co-authored-by: Lesley De Cruz <lesley.decruz@meteo.be>
Co-authored-by: ned <daniele.nerini@meteoswiss.ch>
Co-authored-by: Ruben Imhoff <Ruben.Imhoff@deltares.nl>
  • Loading branch information
5 people authored Apr 24, 2024
1 parent 1525178 commit 2a408d8
Show file tree
Hide file tree
Showing 5 changed files with 1,213 additions and 751 deletions.
Loading

0 comments on commit 2a408d8

Please sign in to comment.