Add capability to reference agrid file in source file
ashumway-usgs opened this issue · 3 comments
For the one-year induced seismicity models, there are a large number of agrids. Some sources use the same agrids. It might be beneficial to allow a source file to reference information from an agrid (e.g. line in source file that points to the name of an agrid file), rather than needing to duplicate this data in multiple source files.
@mmoschetti-usgs @cmueller-usgs
The file format we will use for this will be CSV. The format will have a header row that will identify:
lon,lat[,rate,a,b,mMin,mMax,dMag,cMag,type]
At a minimum lat
and lon
must be present. The presence of other values/columns will be a function of the MFDs being used for a particular source. All additional columns are optional. Headers and columns can be in any order. The distribution of points need not fill a rectangular grid (as binary agrid files used to); and if rate
or a
is 0.0, no source will be created at that location.
Implementation changes: Currently, each XML <node type="GR" ... />
maps to all compatible <defaultMfds />
. If type
is specified in a CSV header, then this behavior will be the same. Any additional, but unnecessary, parameters will be ignored. It type
is not specified, then the parser will attempt to build all <defaultMfds />
. When building MFD's from a CSV file, the INCR
MFD type is prohibited and any default MFDs of this type will be ignored.
As an intermediate step, we will also support the Upon further consideration and experimentation, this is awkward.<node />
elements being in a separate file that would be identified with the suffix *.nodes
as it would not be well-formed XML.
Support for per node focal mech maps was added for UCERF3; if we want to support this along with external file support, columns/headers should be added for STRIKE_SLIP
, NORMAL
, and REVERSE
(FocalMech enum) and if one is included, the other two also must be.