Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Assertion Error - for Run Risk1 and Run Risk2 #76

Closed
mbrwn opened this issue Feb 24, 2021 · 4 comments
Closed

Assertion Error - for Run Risk1 and Run Risk2 #76

mbrwn opened this issue Feb 24, 2021 · 4 comments
Labels

Comments

@mbrwn
Copy link

mbrwn commented Feb 24, 2021

Following Tutorial 2a but with my own datasets. All steps were successful (with some trial-and-error) until this point. Validation of R1 was successful. Then when tried to run R1 got error:
image
Run of L2 worked ok with the same files/set-up. Then run of R2 got this error:
image

@cefect
Copy link
Collaborator

cefect commented Feb 24, 2021

For the first problem, it looks like you're trying to pass an L2 inventory (w/ tag and cap values) through the L1 model. Try removing 'f0_tag' and 'f0_cap' from the inventory to make it an L1 inventory. This error catch is there to make sure an L1 model isn't run when an L2 is expected by the user (but perhaps it should be switched to a warning).

For the second problem, it looks like you're trying to run the risk calculator w/ only 2 events. Section 4.2.3 'Events without Failure' tries to explain this, but the ead algorithm needs at least 3 events to run (but even this will give you a very coarse answer.. we usually try to have at least 8 to get a good representation of the risk). If you're fine with just impact values (not interested in calculating risk), then then you can just use the 'dmgs' output from the 'Impacts (L2)' (although the fancy results analysis tools mostly work on risk results for now).

Hopefully this helps

@mbrwn
Copy link
Author

mbrwn commented Feb 25, 2021

Thanks that does help. Yes I think for the R1 error it should be a warning instead. So the same dataset can be used for simple analysis/output and more detailed analysis/output.

I added more hazard rasters (5 in total) and redid all steps. L1 analysis ran ok. R2 analysis now gives a different error:
image

Adding a note in the user manual explicitly telling the user that 3 hazard rasters are needed for a R2 analysis would be helpful/more user friendly.

@cefect
Copy link
Collaborator

cefect commented Feb 25, 2021

The 'rtail' error is thrown because the risk curve can not be extrapolated into the range of calculated values. If your smallest event is indeed a 2-year.. then I'd hope these impacts are quite small, and you could apply an rtail=None (no extrapolation). Alternatively, select a larger rtail value (or 'extrapolate' ) in the control file. This parameter is described in Section 4.2 Parameter Summary.

As for your other points:

  1. I've removed the error catch.. and risk (L1) models should now run with 2 events (didn't test L2)
  2. I've loosened the expectations on the inventory, and L1 models now run with extra nest fields (e.g., a L2 inventory can be used in L1 analysis)

You should see these reflected in the next release.

On a side note.. I'm not thrilled with the reporting of warnings as it is now... I'll chat with the team and see if we can switch to some sort of pop-up message.

@mbrwn
Copy link
Author

mbrwn commented Feb 25, 2021

Thanks for your help! Changing rtail=none worked.

I have 2, 5, 10, 25, 50 and 100 yr hazard rasters. Asset flooding only occurs during 25, 50 and 100 yr. So I tried resolving this issue two ways to compare results:

  1. only sample the hazard raster that result in impacts (25, 50 and 100 yr) and keep rtail = 0.5 default.
    image

  2. sample all 6 hazard rasters and change rtail = none.
    image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants