Giter Club home page Giter Club logo

nzshm-opensha's People

Contributors

andy22b avatar chrisbc avatar chrisdicaprio avatar thingbaijam avatar voj avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

benjamineac

nzshm-opensha's Issues

Feature: Named Fault modifications

Notes:

Wellington Fault - currently there is just one MFD plot for the Wellington Fault, and it covers/combines two distinct sections of the fault:

  • a) the section that extends through the Hutt Valley and Wellington city (termed the Wellington-Hutt Valley section), and
  • b) the section that runs closest to Palmerston North (termed the Pahiatua section). Ideally, I'd like to see separate MFD plots for these two distinct sections.

Alpine Fault: currently there is just one MFD plot for the fault, and it covers/combines three distinct sections of the Alpine Fault.

Done Criteria:

  • Wellington Fault:
    • "Wellington: Wellington-Hutt Valley" = sections 285-289.
    • "Wellington: Pahiatua". = section 275
  • Alpine Fault:
    • "Alpine: George to Jacksons" = section 599
    • "Alpine: Jacksons to Kaniere" = section 598
    • "Alpine: Kaniere to Springs Junction" = section 597.

Review coursening vs thinning for subduction rupture building

It seems we have some potential overlap between two methods of reducing the count of ruptures in subduction-zone rupture set . We should look at both methods and decide which we should use going forward . Maybe one method should be deprecated.

NB this is not urgent as for now, we're OK with disabling both thinning and coarsening whilst we're working with 30km tiles.

  • examine the difference between the two approaches and explain them
  • look for the root cause of the unexpected jump issue in size-coarsenenig in combo with aspect filter.
  • decide on use-case/deprecation
  • implement any change

Hazards: focal mechanics grids

We need focal mech grids in order to calculate hazards.

For now, we'll use the 2010 data from https://github.com/GNS-Science/fortran_SHMs/blob/main/2010_NSHM-corrected/NZBCK615.txt

From that file, we'll take the mechanics ("nn", etc) and the location.

Mapping from source mechanics to weight:

source mechanics normal reverse strike-slip
nv, nn, ns, ds 1 0 0
rv, if 0 1 0
sr, ss, sn 0 0 1
ro, rs 0 0.5 0.5

Each location in the target grid will be mapped to the nearest location in the source grid.

Feature: Refactor Subduction Inversions to use new opensha modular branch

The SRM Team want to start using new opensha features implemented in the opensha/modular-fault-sys-rup-set2 branch

so we can explore in-flight inversion averaging techniques, pertubation optimisations and the new reporting codebase and outputs.

Done when:

  • Adapt NZSHM Inversion Config, Generator and TargetMFD class (and any other essential changes) to suit new codebase
  • Run an Inversion on a Subduction Rupture set: RmlsZTo1MzcwLjA5andhYw==
  • Run same Inversion via Gateway API.

Feature: use new inversion constraint - uncertainty weighted MFD

SRM Team want to experiment with the new MFD weighted by uncertainty constraint in both Crustal and Subduction inversions

NB depends on opensha/opensha#45

Done when:

  • python API lets us select an inversion configuration using the new TargetMFD Subduction
  • python API lets us select an inversion configuration using the new TargetMFD Crustal
  • new MFD target weights metadata is serilased into module
  • new targets + weights are available via API for tabular API users
  • PR for opensha/opensha is merged upstream

Feature: Integrate NZ geodetic deformation models

SRM want to use geodetic deformation models

Notes:

  • in UCERF3 both zeng* and neokinema* models in package data.erf.ucerf3.DeformationModels are geodetic models
  • Data provided by Kaj (see slack) should be checked to see if we're able to use it/transform it into the standard form above

Done when:

  • confirm name and shortnames for ENUM
  • added NZ Deformation models to project
  • API allows user to select new deformation model

Feature: Build rupture sets where subsection lengths are depth-independent

SRM Team

want to have an option to build subsections from parent faults whose length is independent of Down Dip Width (DDW) aka seismogenic depth

So that we can compare the impacts with rupture sets vs UCERF3- style (where subsection Length is typically 0.5 of DDW)

Check if the current algorithm adjusts subsection lengths to fit uniformly, or at the two end subsections.

Done When

  • the new option will build similarly to UCERF3, having lengths are approx equal to the specification.
  • the UCERF3-style option using DDW is still available
  • the API makes it clear that the two methods are alternatives and cannot both be applied
  • the API raises an exception if conflicting configuration is attempted
  • Do not allow fewer than 2 subsections per parent fault
  • Add CLI Support in ScriptCrustal... for quick runs
  • add to Python Gateway for automation

Fix: Why are regional target MFD slopes incorrect in latest inversions

Comparing OLD July example InversionSolution: SW52ZXJzaW9uU29sdXRpb246NjA0My4wVkxUdE4=

with NEW October: InversionSolution: SW52ZXJzaW9uU29sdXRpb246MTI2MzcuMDVuNnNx

We see that the slope of the targetOnFaultSupraSeisMFD_SansTVZ curve is very different to the overall GR slope. This is visbile in the plots below ...(only from the new version)...

What has changed here? Is it our NZSHM targetMFD configuration or some change in upstream modular migration?

New Solution Diagnostiocs plots

image
image

Feature: Use Generalised Scaling Relation in RuptureSet and InversionSolutions

SRM team want to compare new Scaling relation with others.

Done When:

  • can configure Inversion scaling relationship via Java API
  • option to recalc Magnitudes with new scaling relation
  • Add Java API support for extended arguments on Generalised (Regime, EpistemicBound)
  • works for Crustal/Subduction and RuptureSet/Inversion.
  • includes GNS-Science/nzshm-runzi#25

#optionA
.setScalingRelationship(x)
.setScalingRelationship(x, recalc_mags = False, True)

FIX: Error processing plot (skipping): SolMFDPlot on crustal solutions

To reproduce , run new solution report on SW52ZXJzaW9uU29sdXRpb246NjYzMy41RTZYMzU= to get this error:

scheduling:  /home/chrisbc/DEV/GNS/opensha-new/AWS_S3_DATA/WORKING/task_1.sh
task count:  1
call_script with: /home/chrisbc/DEV/GNS/opensha-new/AWS_S3_DATA/WORKING/task_1.sh
Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
Error processing plot (skipping): SolMFDPlot
java.lang.NullPointerException
	at org.opensha.sha.earthquake.faultSysSolution.reports.plots.SolMFDPlot.plot(SolMFDPlot.java:60)
	at org.opensha.sha.earthquake.faultSysSolution.reports.AbstractSolutionPlot.plot(AbstractSolutionPlot.java:22)
	at org.opensha.sha.earthquake.faultSysSolution.reports.ReportPageGen.generatePage(ReportPageGen.java:662)
	at nz.cri.gns.NZSHM22.util.NZSHM22_ReportPageGen.generatePage(NZSHM22_ReportPageGen.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
	at py4j.Gateway.invoke(Gateway.java:282)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.GatewayConnection.run(GatewayConnection.java:238)
	at java.base/java.lang.Thread.run(Thread.java:829)
worker count:  4
Done! in 245.182637 secs

Issue: investigate potential MFD magnitude bin off-by-one error (aka uncanny valley)

SRM team want to know if there's a problem in the Target MFD configuration (crustal, but potentially also subduction), whereby the upper bin for BG seismicity and the lower bin for supra-seimogenic (Truly on-fault) maybe not the same bin.

The concern comes from the observation that in most cases we see MFD solution plots where there's missing rates in the 6.95 or 7.05 bin. This plot (from this view) is pretty typical. BG has falled off heavily at 6.95 before the on-fault kicks in at 7.05.

@mcg-gns @earjcr1

image

Feature: a simple config harness to evaluate changes to MFDs

SRM need to understand the impacts of variou sMFD changes without the full inversion/diagnostics cycle.the primaryt the MFD target plot produced for evaluating our changes.
Matt identified two changes needed in the main MFD plot to assist with evaluations. Compare:
http://nzshm22-static-reports.s3-website-ap-southeast-2.amazonaws.com/opensha/DATA/SW52ZXJzaW9uU29sdXRpb246[…]ources/mfd_plot_Total_Target_MFDs.png with
http://simple-toshi-ui.s3-website-ap-southeast-2.amazonaws.com/InversionSolution/SW52ZXJzaW9uU29sdXRpb246MTM2MTEuMGI4U1lK/InversionSolutionMfdTab

In the opensha report we want

  • add the truly-onfault target (targetOnFaultSupraSeisMFD_SansTVZ + targetOnFaultSupraSeisMFD_TVZ)
  • adjust the the target gridded to be purely the gridded seismicity (trulyOffFaultMFD.all) . I think is is currenlty Gridded + SubSeismo

Feature: Zoned TargetMFD for subduction inversions

Hikurangi + Kermadec need individual MFD targets.

Done When

  • obtain region polygons for the two regions (@earjcr1 )
  • configure regions in our ENUMs etc
  • reconfigure new SubductionTargetMFD and gateway API to optionally use new regions
  • sanity check opensha MFD contribution ratios for subductino tiles.
  • Configure Runz to run new subduction inversions using Zoned MFDs

Feature: provide getters for target and final MFD histrograms in InversionRunner

As SRM team we want to obtain the MFD curve values for both the final and target MFDs from each inversion

so that they can be saved to API Table objects for analysis, plots etc.

For both TargetMFD and ResultMFD we want both sub-seismogenic and supra-seisomogenic series

@mcg-gns in Crustal Inversions we have both TVZ and Non-TVZ MFD targets for sub and supra. Can these be simply summed in our plots to compare to the singular NZ result? And/or does the MFD result need to be split regionally ?

Feature: Add API for setting SA period / PGA

SRM team want to specify the period (in seconds) for opensha SA Hazard curves, with the special case of 0 meaning PGA (by convention)

so that the required Spectral Acceleration AND and Peak Ground Acceleration curves are availalbe for hazard calcs

Investigate: Crustal Inversion slip vs Rupture rates

SRM (Matt) want to know why we're seeing plots showing faults with some rate (in Solution) where there's a 0/mm Target slip rate in the Fault Model (+deformation).

Update

  • this is because these faults are not being filtered from CFM @mcg-gns is looking how this can be done and then new rupture sets can be produced where rupture do not exist.
  • a second option @voj is looking at adding a ruptureSet filtering option to the inversion, where we drop all ruptures that have a 0-slip rate on any subsection. This done after applying the Deformation model allows for some more fluid exploration of deformation model vs rupture sets without letting these impossible ruptures enter the Inversion process.

examples:

  • SW52ZXJzaW9uU29sdXRpb246MTI3MTguMDczb05G

image

Obtain crustal Subsection model samples for new deformation models

SRM Team want to provide our deformation modellers with a crustal fault models suitable for indexing rates/rakes in their deformation models,

So that the new deformation models can be used.

Notes:

  • the same approach should work with any deformation model source, but this is initially for Geodetic data
  • deformation models should define values at the fault section/subsection level, which means that the final 3D geometry used rupture sets is required. This will be slightly different for the Stirling 2010 and D90 ruptures sets for example as the subsection sizes are influenced by the fault-section depths.

Done when:

  • obtain the subsection data for each of:
    • crustal CFM 0.9 SansTVZ Stirling 2010 depths Download
    • crustal CFM 0.9 SansTVZ D90 depths Download

Using these XML files

Notes :

  • Any deformation model data should reference RuptureSetID (e.g RmlsZTo4NTkuMDM2Z2Rw), parentSectionId and subsectionId fields so the deformation model data can be merged with the subsection models.
  • We will need deformation model data to suit these and any future rupture set subsection models.
  • Suggest that any transformation code for this be added to ou eq-fault-geom python repo,
  • Unfortunately subsection ID is only available here by parsing the last numeric value from the sectionName field.
  • parentSectionName values will be identical to those in CFM 0.9.
  • a number of smaller faults in the TVZ regions were removed.

example input XML extract...

<i12 sectionId="12" sectionName="Akitio Ridge, Subsection 0" aveLongTermSlipRate="0.0" slipRateStdDev="0.0" aveDip="30.0" aveRake="-90.0" aveUpperDepth="0.0" aveLowerDepth="14.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="303.3" parentSectionName="Akitio Ridge" parentSectionId="5" connector="false" class="org.opensha.refFaultParamDb.vo.FaultSectionPrefData">
      <FaultTrace name="Akitio Ridge 1">
        <Location Latitude="-40.0364" Longitude="178.4939" Depth="0.0"/>
        <Location Latitude="-40.11273858869155" Longitude="178.3861602111714" Depth="0.0"/>
      </FaultTrace>
    </i12>

Feature: parametrize the Generalised Scaling Relation

pass in some args alongside the SR spec etc

  • make General SR configurable
  • needs LTB to work OK NZ style
  • add possibility to get one of 6 preconfigured configurable enums
  • integration tests showing that we can load premodular U3 and modular NZ rupture sets
  • inversionrunner: explicit method to set up LTB

Trigger docker image build from git tag

As Chris C, I want to be able to tag a git commit and automatically receive a docker image for that commit.

  • fatjar build triggered from release tag
  • jar stored in S3
  • Document this pipeline & process (suggest ReleaseProcess.md), linked from README.md
    need to know
    • a) what the user(s) must do to trigger a new tagged release.
    • b) any dependencies (pre-req etc).
    • c) what actually happens and how to know it's working.
  • opensha git ref is stored in jar and available in TaggedVersion (or similar)

Feature: Refactor Crustal Inversions to use new opensha modular branch

The SRM Team want to start using new opensha features implemented in the opensha/modular-fault-sys-rup-set2 branch

so we can explore in-flight inversion averaging techniques, pertubation optimisations and the new reporting codebase and outputs.

NB this is identical to #20 but for Crustal Inversions

Done when:

  • Adapt NZSHM Inversion Config, Generator and TargetMFD class (and any other essential changes) to suit new codebase
  • Run an Inversion on a Crustal Rupture set: RmlsZTo4NTkuMDM2Z2Rw
  • Run same Inversion via Gateway API.

Missing method in new modular branch

This API method is used recent runs using our main branch, but it's been accidentally removed I think....

public NZSHM22_CrustalInversionRunner setGutenbergRichterMFD(double totalRateM5_Sans, double totalRateM5_TVZ,

Related & also missing ...

NZSHM22_CrustalInversionConfiguration inversionConfiguration = NZSHM22_CrustalInversionConfiguration.forModel(

which used the missing constructor....

public NZSHM22_CrustalInversionTargetMFDs(NZSHM22_InversionFaultSystemRuptSet invRupSet,

Inversion Q/C - Modular Migration

Checking that pre/post modular inversions are working as expected. to the A/d matrices setup.

context

Kevin, he advised us that 'for the same inversion config, we should see the exact same values in A & D matrices' both before and after modular.So we're i) checking we have the same config (taking into consideration that stuff is changing here), then ii) we get the same inversion inputs.

Right now there are big differences with crustal but we have yet to satisfy i) above.

Done when:

  • test coverage and equivalent configs working for Crustal
  • test coverage and equivalent configs are working for Subduction

Feature: reduce the fault polygon Mmin for Crustal TVZ

TVZ MMin should be Mw 6.0. Only reduce the Mmin for TVZ, and for for the rest of the country please keep it at Mmin of 7.0.

  • refactor code to make intent clear
  • add API support so these values are inversion arguments, and make defaults the current values (7.0. 7.0)

Feature: Combine hazard from Subduction + Crustal solutions

SRM team want to calculate combined hazard PofE curve from two hazard sources (inversion solutions) in opensha: Crustal (including background) and Subduction,

so that an exploratory view of the combined hazard is available.

Notes:

  • to combine two hazards, simply add their "Rate of Exceedance" values
  • formulae to convert between RateOfExceedance and ProbabilityOfExceedance exist (in opensha code already??)

So, given a Crustal Hazard curve with either g or period as the X axis, we can take the Rate values, add them together and then convert the combined rates to an exceedance curve

Feature: Range and Colourbar improvements to slip & participation plots

SRM team

want to refine map visualisations used in Subduction inversions Diagnostic reports - this covers both Participation and Slip plots

so that subtle differences are more easily spotted.

We need @mcg-gns input here to confirm specifics, but

  • range split-point between plots are configurable
  • Colourbar/range for plots are improved

NB there may be interactions between these two changes, so they should probably be tried sequentially??

Various Issues w 10km Subduction ruptset and inversions

We had some issues with 10km geometries that need looking into. This is just a quick dump, they should be split out to individual tickets:

Feature: a simple config harness to evaluate changes to MFDs

SRM need to understand the impacts of variou sMFD changes without the full inversion/diagnostics cycle.the primaryt the MFD target plot produced for evaluating our changes.
Matt identified two changes needed in the main MFD plot to assist with evaluations. Compare:
http://nzshm22-static-reports.s3-website-ap-southeast-2.amazonaws.com/opensha/DATA/SW52ZXJzaW9uU29sdXRpb246[…]ources/mfd_plot_Total_Target_MFDs.png with
http://simple-toshi-ui.s3-website-ap-southeast-2.amazonaws.com/InversionSolution/SW52ZXJzaW9uU29sdXRpb246MTM2MTEuMGI4U1lK/InversionSolutionMfdTab

In the opensha report we want

  • add the truly-onfault target (targetOnFaultSupraSeisMFD_SansTVZ + targetOnFaultSupraSeisMFD_TVZ)
  • adjust the the target gridded to be purely the gridded seismicity (trulyOffFaultMFD.all) . I think is is currenlty Gridded + SubSeismo

Build ruptset and run Inversion with new subduction_fault_model

For SRM analysis

done when:

  • configure/ build rupture sets (test/prod)
  • set up revised hard-wired min_mag 7.0 (workaround until GNS-Science/nshm-nz-opensha#184 )
  • configure new min_mag parameter on subduction scripts
  • configure/test build inversion job 1 & 2
  • deploy to beaven, recompile & schedule

Improve legibility of SlipRate plots in opensha Inversion Diags reports.

For subduction (horizontal) faults colouring we'd like to 'fill the tiles", rather than the top trace line, so that it's easier to see the scales. See slack thread

NB I'm adding the issue to this project, but I suspect most of of the work can be included in opensha/opensha. Here we'll simply need to pass the appropriate report config option.

Done when:

  • colouring of plot is improved and scientists are happy.
  • current (top-trace colouring) is still supported as the default mode
  • [ ] option to change width of top-trace as config option

Feature: implement/configure new Paleo timing constraint(s) for crustal inverstion

SRM want crustal Inversions to use NZ paleo constraint data from new dataset

Integration of data is covered by #49 , this covers:

  • configuring the Inversion Constraint,
  • adding support to API for arguments (constraint weight at least)
  • add test coverage as required
  • Russ suggest there's also a weighting file that we may need to update for NZ - find and advise SRM team

Fix for running inversions without any ineq constraints

Description

For Kevin feedback..

setting up our new inversions using Subduction and MFDUncertainyWeightedConstraints in place of MFD Eq/InEq. In the process I found some annealing code that failed on an inversion without any ineq type constraint setup. I had a quick look in debugger but decided to back out of there.

As a workaround I’ve configured a very low weight MFD inequality constraint and that’s got us going.I’m happy to create a failing test to pick this out for you, but first I wanted to check that this is meant to be possible??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.