ecmwf / ecpoint-calibrate

Interactive GUI (developed in Python) for calibration and conditional verification of numerical weather prediction model outputs.
GNU General Public License v3.0
21 stars 8 forks source link

Clicking on non-leaf nodes throws an error #127

Closed AugustinVintzileos closed 3 years ago

AugustinVintzileos commented 3 years ago

Hello - I clicked on the second level of nodes and received a 500- internal server problem message with the following traceback

image image Image1

Sorry about the png but I had copy&paste issues

onyb commented 3 years ago

@AugustinVintzileos I was able to reproduce the error but would like to understand the expected behaviour. Normally, it's supposed to collapse the subtree, and not display any error in the console. Is that correct?

AugustinVintzileos commented 3 years ago

At the non edit mode I would expect to see a distribution of 2-meter temperature errors. Actually, I got a 500- error when I asked the K-S test to split in only one value the first node so I wonder whether this is coming from arithmetic operations resulting to NaNs ?

onyb commented 3 years ago

At the non edit mode I would expect to see a distribution of 2-meter temperature errors.

As fas as I remember, this feature was never supported, although the console error is not expected. Viewing the error histograms is something that's only supported in "leaf nodes", i.e., nodes without any children.

The histogram at the desired node can be obtained by either clicking on the node before it is split or by merging together all its children. Once split, clicking on the node will only collapse/un-collapse the child nodes.

Maybe @FatimaPillosu can clarify this point.

AugustinVintzileos commented 3 years ago

Great! Out of curiosity what is this 500- error about?

onyb commented 3 years ago

It's due to a misfired event. Clicking on that node triggered a "collapse sub-tree" event, and at the same time a call to the backend to process the histogram (with wrong inputs). Only the first event should've been fired since it's a non-leaf node.

The fix will be to correctly recognize a non-lead node and prevent the superfluous event from getting fired.

onyb commented 3 years ago

Fixed in v0.14.0.