gns-science / eq-fault-geom Goto Github PK
View Code? Open in Web Editor NEWpython tools for manipulating fault geometries
License: MIT License
python tools for manipulating fault geometries
License: MIT License
As SRM Team
we want include fault trace polygons for each fault in the opensha XML
so that we can start to include distributed seismicity in opensha
Out of scope - the third layer for feature-based polygons
done when:
As SRM Team
When we extract data fom CFM for opensha , we want a stable integer ID to identify the XML fault sections,
so that our downstream tests in GNSScience/nshm-nz-opensha are not disrupted by minor changes e.g filtering out the TVZ faults.
SRM Team
we want to use paraview and other VTK compatible visualising tools
so that we can explore fault geometries as defined in the CFM crustal 2D datasets where each fault section is expected to be a rectangular plane with an upper depth of 0km.
NB VTK has many file representations. For this we want legacy (non-XML) in ASCII mode so it's human readable. eg file header like this one ....
# vtk DataFile Version 4.2
vtk output
ASCII
See also
Done when
As per crustal version, but for the Hikurangi
As NSHM NZ opensha users
we want to extract fault sections from CFM for NZ crustal faults
so that we can perform SHA usng opensha/open-quake and similar
NB now we do this from the CFM shapefile which includes surface fault traces, dip and depth values. This should produce simliar results but wit the 3D t2urf data as input.
Data set from Laura geodetic deformation.
As python user, I want the package to be installable using setup-tools/pip for ease of use:
pip freeze
)getting started
IN our team code review last week (ref #37) we identified that there may be some duplicated code in places where we manipulate and transform geometries etc.
This ticket is for Charles & Andy who are the main authors of these functions to do a more detailed review over these modules to see if there's some simplification of the codebase available.
If so, we can create specific issues for the code refactoring task(s)
SRM team have asked for a version of the subduction zone that has a northernmost cutoff at the intersection with the Louiseville Ridge. please produce n 10km and 30km tiles with same slip rate as before.
provide feature test coverage for:
SRM team needs new opensha Fault Model XML from CFM with the following requirements
Done Criteria
There should be a total of four new XML fault models named:
using create_stirling_vtk
produces exception
NameError Traceback (most recent call last)
<ipython-input-5-f7049921745c> in <module>
11 for i, fault in sorted_wgs.iterrows():
12 nztm_geometry_i = faults.iloc[i].geometry
---> 13 cv.create_stirling_vtk(fault, section_id=i, nztm_geometry=nztm_geometry_i)
~/anaconda3/envs/ipyvolume/lib/python3.8/site-packages/eq_fault_geom/geomio/cfm_shp_to_vtk.py in create_stirling_vtk(fault_info, section_id, nztm_geometry)
176 file_name = "".join(file_list)
177 file_path = Path(file_name)
--> 178 output_file = Path.joinpath(output_path, file_path).with_suffix(vtk_suffix)
179 meshio.write(output_file, mesh, file_format="vtk", binary=False)
180
NameError: name 'vtk_suffix' is not defined
We we have just discovered the opensha rupture building chokes on Longitudes < 0 if they result in a 3D surface crossing the dateline.
The two new Kermadec trench sections in CFM 0.9 both fail because of this. e.g.
@voj has tested and can avoid this if we simply add 360 to any longitudes less than 0 (and there are many like this).
Our eq-fault_geom scripts should do this so we don't need to modify the upstream project.
As SRM team,
we want the larger hikurangi geometry available
so we can produce new rupture sets.
As SRM team we want to extract relevant data from shapefile and write it in a format that OpenSHA can read.
from review #37
/eq_fault_geom/faultmeshio/cfm_shape_to_*.py are command scripts
these should:
Points should be written along strike in an order so that the dip direction is 90 degrees RIGHT of thw way that points are written (e.g. points should be written N to S for a W-dipping fault).
Testing CFM XML in opensha has revealed this input raises an error in opensha
<i124 sectionId="124" sectionName="Fiordland" aveLongTermSlipRate="9.0" slipRateStDev="5.5" aveDip="25.0" aveRake="90.0" aveUpperDepth="0.0" aveLowerDepth="0.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="131.5" parentSectionId="-1" connector="false">
In these cases the CFM XML extract should skip these elements and issue a warning message so the user know that data is missing.
NB to workaround this I've set a positive value for aveLowerDepth.
@sapikara pls add test coverage for this case
As SRM Team,
We want to exclude the Taupo Volcanic Zone (TVZ) faults from opensha data sets
So that we can assess their impact on rupture set size
Done when:
SRM team needs new opensha Fault Model XML from CFM with the following requirements
Done Criteria
There should be a total of two new XML fault models named:
As SRM Team
we want to know if we need to massage the fault intersection for fault zone polygons
So lets take a look at what UCERF3 have done.
I've uploaded data here https://nshmrevisionproject.slack.com/archives/C019L824D99/p1612205551002500
/eq_fault_geom/geomio/run_cfm_param_checks.py needs to
package trawl....
@andy22b I found the CFM XML contains the following elements which look supspiciously like subduction data.
Can you help us figure out if they're considered Crustal or not? & If NOT, then we need a feature that can filter these out.
(eq-fault-geom) chrisbc@tryharder-ubuntu:~/DEV/GNS/eq-fault-geom/src$>grep Hikurangi NZ_CFM_V0.3_crustal_opensha.xml
<i152 sectionId="152" sectionName="Hikurangi Hawke Bay" aveLongTermSlipRate="44.0" slipRateStDev="3.0" aveDip="0.0" aveRake="90.0" aveUpperDepth="0.0" aveLowerDepth="20.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="296.8" parentSectionId="-1" connector="false">
<FaultTrace name="Hikurangi Hawke Bay">
<i153 sectionId="153" sectionName="Hikurangi Raukumara" aveLongTermSlipRate="54.0" slipRateStDev="6.0" aveDip="0.0" aveRake="90.0" aveUpperDepth="0.0" aveLowerDepth="20.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="301.4" parentSectionId="-1" connector="false">
<FaultTrace name="Hikurangi Raukumara">
<i154 sectionId="154" sectionName="Hikurangi Wellington" aveLongTermSlipRate="25.0" slipRateStDev="5.0" aveDip="0.0" aveRake="90.0" aveUpperDepth="0.0" aveLowerDepth="30.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="336.4" parentSectionId="-1" connector="false">
<FaultTrace name="Hikurangi Wellington">
(eq-fault-geom) chrisbc@tryharder-ubuntu:~/DEV/GNS/eq-fault-geom/src$ grep Puys NZ_CFM_V0.3_crustal_opensha.xml
<i431 sectionId="431" sectionName="Puysegur" aveLongTermSlipRate="27.0" slipRateStDev="9.0" aveDip="20.0" aveRake="115.0" aveUpperDepth="0.0" aveLowerDepth="15.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="101.3" parentSectionId="-1" connector="false">
<FaultTrace name="Puysegur">
<i432 sectionId="432" sectionName="Puysegur Ridge" aveLongTermSlipRate="14.0" slipRateStDev="14.0" aveDip="85.0" aveRake="180.0" aveUpperDepth="0.0" aveLowerDepth="12.0" aseismicSlipFactor="0.0" couplingCoeff="1.0" dipDirection="107.8" parentSectionId="-1" connector="false">
<FaultTrace name="Puysegur Ridge">
So we can move ahead with new analysis
Done when:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.