Comments (5)
With no rain in the precip radar fields, the noise cannot be initialized. The proposed change is to initialize the noise in step 3 instead of step 2 (hence, after the cascade decompositions). This allows for a check if there is no rain in both the radar field and NWP fields. If that is the case, the resulting forecast will directly consist of only zeroes and thus the noise initialization and all subsequent steps will be bypassed. Otherwise, if the radar field is zero and the NWP field is not, the initialization of noise will take place with the NWP field at timestep zero (which is at that time step zero in 'Lagrangian coordinates').
from pysteps.
Link with issue #6
from pysteps.
Changed the auto-correlation derivation function to make sure it gives the climatological auto-correlation values when the radar rainfall fields are zero:
def _estimate_ar_parameters_radar(
R_c, ar_order, n_cascade_levels, MASK_thr, zero_precip_radar
):
"""Estimate AR parameters for the radar rainfall field."""
# If there are values in the radar fields, compute the autocorrelations
GAMMA = np.empty((n_cascade_levels, ar_order))
if not zero_precip_radar:
# compute lag-l temporal autocorrelation coefficients for each cascade level
for i in range(n_cascade_levels):
GAMMA[i, :] = correlation.temporal_autocorrelation(R_c[i], mask=MASK_thr)
# Else, use standard values for the autocorrelations
else:
# Get the climatological lag-1 and lag-2 autocorrelation values from Table 2
# in `BPS2004`.
# Hard coded, change to own (climatological) values when present.
GAMMA = np.array(
[
[0.99805, 0.9925, 0.9776, 0.9297, 0.796, 0.482, 0.079, 0.0006],
[0.9933, 0.9752, 0.923, 0.750, 0.367, 0.069, 0.0018, 0.0014],
]
)
# Check whether the number of cascade_levels is correct
if GAMMA.shape[1] > n_cascade_levels:
GAMMA = GAMMA[:, 0:n_cascade_levels]
elif GAMMA.shape[1] < n_cascade_levels:
# Get the number of cascade levels that is missing
n_extra_lev = n_cascade_levels - GAMMA.shape[1]
# Append the array with correlation values of 10e-4
GAMMA = np.append(
GAMMA,
[np.repeat(0.0006, n_extra_lev), np.repeat(0.0014, n_extra_lev)],
axis=1,
)
# Finally base GAMMA.shape[0] on the AR-level
if ar_order == 1:
GAMMA = GAMMA[0, :]
if ar_order > 2:
for repeat_index in range(ar_order - 2):
GAMMA = np.vstack((GAMMA, GAMMA[1, :]))
# Finally, transpose GAMMA to ensure that the shape is the same as np.empty((n_cascade_levels, ar_order))
GAMMA = GAMMA.transpose()
assert GAMMA.shape == (n_cascade_levels, ar_order)
# Print the GAMMA value
nowcast_utils.print_corrcoefs(GAMMA)
if ar_order == 2:
# adjust the lag-2 correlation coefficient to ensure that the AR(p)
# process is stationary
for i in range(n_cascade_levels):
GAMMA[i, 1] = autoregression.adjust_lag2_corrcoef2(GAMMA[i, 0], GAMMA[i, 1])
# estimate the parameters of the AR(p) model from the autocorrelation
# coefficients
PHI = np.empty((n_cascade_levels, ar_order + 1))
for i in range(n_cascade_levels):
PHI[i, :] = autoregression.estimate_ar_params_yw(GAMMA[i, :])
nowcast_utils.print_ar_params(PHI)
return PHI
from pysteps.
Fixed with commit b375e69
from pysteps.
A possible improvement here is to replace the climatological values from the paper by the ones calculated for our domain.
from pysteps.
Related Issues (16)
- Prepare no-radar-rain + NWP-rain case
- Prepare no-radar-rain + no-NWP-rain case HOT 1
- Implement no-rain check on NWP fields and implement the no-rain-radar + no-rain-nwp case HOT 5
- Implement no-rain-radar + rain-nwp case HOT 7
- Correct noise cascade initialisation HOT 4
- Renormalization of the precipitation cascade levels after an AR iteration HOT 5
- Identify the interpolation step in the SL-advection HOT 1
- Find and implement fix for the interpolation of smallest level cascades HOT 3
- Prepare flooding cases suggested by Ricardo HOT 3
- Check impact of number of cascade levels /do we need 8 cascade levels for Belgian domain? HOT 1
- Experiment with localized AR processes
- Variable threshold for the "no rain" criterion HOT 1
- Celebrate release of new pysteps.blending version
- Add tests for no-rain combinations HOT 4
- Parallellized ensemble run seems to lose track of ensemble number and order HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysteps.