Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L losscalculator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynamic Exposure
  • Global Dynamic Exposure
  • losscalculator
  • Issues
  • #34

Closed
Open
Created Feb 13, 2021 by Tara Evaz Zadeh@taraMaintainer

Fix the bug appearing by SA(1.0) and SA(1) labeling mismatch in fragility function and ground-motion field file

The ground-motion field (to use as input to the losscalculator) is computed using the OpenQuake program. Thus we want the losscalculator to be compatible with OQ as much as possible.

There can be different ground-motion types used for computations such as: PGA, PGV, PGD, RSD, MMI and SA(0.1)...,SA(1.0)...

Just like the examples above, there can be more than one ground-motion type defined for each location in the ground-motion field file but we can assign value of only one type to each asset (the correct ground-motion type to pick from the ground-motion field file is the one that matches the ground-motion type based on which, the fragility function related to that specific asset is defined)

The header of the ground-motion field file (produced by OQ) for all the ground-motion types has the gmv_ prefix which stands for ground motion value. The number inside parentheses for SAs is a float. For example the header of ground-motion values for SA1 produced by OQ is written as gmv_SA(1.0).

But, the fragility functions (the ones by Martins and Silva), which defined based on SA1, have the header SA(1).

To find the matching ground-motion types between a fragility function and the ground-motion field file for a specific asset, I treated their headers as strings, so that in the specific case when:

fragility_function_ground_motion_type = 'SA(1)'
'gmv_SA(1.0)' != 'gmv_' + fragility_function_ground_motion_type

This problem only happens with SA cases (and only integer SAs) because they are the only ground-motion types that come with a number.

Edited Feb 13, 2021 by Tara Evaz Zadeh
Assignee
Assign to
Time tracking