GEMScienceTools/oq-mbtk

dip_dir

Closed this issue · 6 comments

When dip_dir is left blank in the geojson, and the fault is not strike-slip (vertical), fails in _check_trace_coord_ordering at line 721.

modify fetch_param_val at 309:

 if val is None:
      if param is 'dip_dir':
           val = 'skip'

and _check_trace_coord_ordering at 723:

if fault_dip_dir is 'skip':
    fault_dip_trend = trace_dip_trend
else:
    fault_dip_trend = direction_map[fault_dip_dir]

Is there a cleaner fix?

I believe @klunk386 put in the if param is 'dip_dir': val = 'skip' part so I can't explain that. I wrote the function to raise a ValueError if dip_dir isn't present and the fault isn't vertical.

I think that it should fail in this case, because it's a necessary parameter.

Maybe @klunk386 or @julgp has another opinion here? Technically the coordinates should be in right-hand-rule ordering but in reality most people map faults in GIS from left to right, regardless of the dip direction, because this is more natural (it is how we write and draw) so I don't think that it's safe to make the assumption that everything is fine. dip_dir needs to be explicit IMO. If it's not specified open up QGIS, look at the fault kinematics and topography. If the fault is a reverse fault, it dips toward the higher topography, and if it's a normal fault, it dips toward the lower topography.

Hi Kendra, for dip-slip seafloor faults (at spreading ridges?) it doesn't matter nearly as much about the dip direction because all of the faults are going to be a much greater distance from the sites where we calculate the hazard (or risk, at least) so I think that you could just put in a dip_dir value in the defaults dictionary if there are too many to fuss with on an individual basis.

@kejohnso FYI restraining bend faults almost always dip towards the interior angle, if this helps assign dip directions.