GNS-Science/nzshm-model

ISSUE: new version source logic trees and backwards compatability for source_solution_id

Opened this issue · 0 comments

For discussion @chrisdicaprio et al

ref https://github.com/GNS-Science/solvis/blob/17932977c78ea0298eb755633fe4d979211952e3/solvis/inversion_solution/fault_system_solution.py#L153

With new SLTs the solvis library need to treat old and new model versions differently. This stems from our decision to support multiple sources in a given LTB (previously there was just one).

But:

  1. we do not use this feature in current NSHM_v1.* models and,
  2. solvis LIB, API and UI will all need rework to support multiple inversion_solutions within one LT branch.

So, this ticket proposes that we constrain the nzshm-model library to support the old API version, so:

  • recreate the old branch property solution_id (it can use the code linked above)
  • either a) validate any new logic trees to ensure only a single inversion is added OR,
  • b) allow multiple inversion solutions but make it clear to users that these cannot be used for solvis solution aggregation OR
  • c) support both a & b, but signal to users which applies for a given Source LT / model.

NB It might be possible to modify solvis somewhat to handle these two cases elegantly. @chrisdicaprio can we come up with real-world an example of B) to use as a test case.