-
Notifications
You must be signed in to change notification settings - Fork 169
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
Noise Adjustment Coefficient -> ValueError: field contains non-finite values #282
Comments
Thanks for reporting the issue! I will have a look into it, can you maybe share a minimal code to reproduce the error? From what I understand, it should be enough to set the last precipitation field to all zeros? Also, what pysteps version are you using? |
@dnerini Thanks for the quick reply. My pysteps version is 1.6.1. The same error also occurred inside the nowcasting module, in the
Yeah, the minimal code would be tough to share but I can provide a bit more details:
Very minimal code looks like:
I highly doubt that the library didn't consider the case where there is no precipitation; this might be a user error. It would be great if you could double-check. When there is precipitation, the forecasts look pretty good. |
Great, thanks for the detailed information! I hope to be able to look into this in the coming days, will let you know! |
I am performing nowcasts with the setup below but I am getting an error during the noise adjustment process.
Here is the setup:
The error trace looks like:
Computing noise adjustment coefficients... Traceback (most recent call last): File "historicalNowcastPerformerScript.py", line 96, in <module> R_forecasts = nowcaster.nowcast(R, metadata) File "/root/projects/lib/python3.7/site-packages/pysteps/nowcasts/steps.py", line 451, in forecast num_workers=num_workers, File "/root/projects/lib/python3.7/site-packages/pysteps/noise/utils.py", line 95, in compute_noise_stddev_adjs decomp_R = decomp_method(R, F, mask=MASK_) File "/root/projects/lib/python3.7/site-packages/pysteps/cascade/decomposition.py", line 191, in decomposition_fft raise ValueError("field contains non-finite values") ValueError: field contains non-finite values
From what I have analyzed, the problem here is that the last observation input contains all zeros; meaning there is no precipitation. In that case, the noise adjustment algorithm fails. To be more precise, inside the
compute_noise_stddev_adjs
method of theutils.py
file, the calculatedmu
value isnan
; making the calculations non-finite.Would there be a way to skip noise adjustment in case there is no precipitation?
The text was updated successfully, but these errors were encountered: