Topo with DC-2d-inversion-app

Hi there,

Does anyone have an example of running a 2D resistivity inversion on a dataset with topography? Some example ones that came with DC-2d-inversion-app.ipynb don’t seem to work. It just runs the inversion with topo values of all zeros. Also when i add my topo in to the code manually, i get points outside the mesh errors. If there is just an example one with input DAT and topo text that works, i could see why it works.

Cheers,
Eric

1 Like

Hi,

There are examples in the documentation of DC2D inversion with topography. For example: 2.5D DC Resistivity Least-Squares Inversion — SimPEG 0.14.3 documentation

You also need to drape your electrodes on the discretized topography to avoid electrodes in the air. This is also covered in the example above.

Thanks, Im just not sure how dc.survey.Survey_ky(source_list) works though. All my variables indicate it counted the measurements correct at 848 (A_electrodes, B_electrodes, etc.). With 107 unique TX, for a total of 848 measurements, it expects 7414 measurements…

\plot_inv_2_dcr2d.py", line 147, in
dc_data = data.Data(survey, dobs=dobs)

File “C:\Users\ejohnson\Anaconda3\lib\site-packages\properties\base\base.py”, line 280, in call
obj.init(*args, **kwargs)

File “C:\Users\ejohnson\Anaconda3\lib\site-packages\SimPEG\data.py”, line 137, in init
self.dobs = dobs

File “C:\Users\ejohnson\Anaconda3\lib\site-packages\properties\basic.py”, line 677, in fset
self._set(scope.name, value)

File “C:\Users\ejohnson\Anaconda3\lib\site-packages\properties\base\base.py”, line 360, in _set
self._notify(change)

File “C:\Users\ejohnson\Anaconda3\lib\site-packages\properties\base\base.py”, line 353, in _notify
getattr(self, listener.func)(change)

File “C:\Users\ejohnson\Anaconda3\lib\site-packages\SimPEG\data.py”, line 222, in _dobs_validator
raise ValueError(

ValueError: dobs must have the same length as the number of data. The provided input has len 848, while the survey expects survey.nD = 7414

I cant upload anything, even PDFs, but here is an example of the input:
Example obs:
0 1387.874 20 1377.71 2 1387.493 4 1386.819 6.22546
0 1387.874 20 1377.71 4 1386.819 6 1386.165 1.80922
2 1387.493 22 1376.05 4 1386.819 6 1386.165 7.35396
0 1387.874 20 1377.71 6 1386.165 8 1385.206 0.720233
2 1387.493 22 1376.05 6 1386.165 8 1385.206 2.1986

60 1374.268 80 1375.652 70 1374.98 72 1375.22 0.0665804
60 1374.268 80 1375.652 72 1375.22 74 1375.354 0.307719
58 1374.012 78 1375.567 74 1375.354 76 1375.486 2.43857
60 1374.268 80 1375.652 74 1375.354 76 1375.486 0.914399
60 1374.268 80 1375.652 76 1375.486 78 1375.567 3.0556

Example Topo
0 1387.874 1387.874
1 1387.714 1387.714
2 1387.493 1387.493
3 1387.214 1387.214
4 1386.819 1386.819

73 1375.315 1375.315
74 1375.354 1375.354
75 1375.445 1375.445
76 1375.486 1375.486
77 1375.527 1375.527
78 1375.567 1375.567
79 1375.617 1375.617
80 1375.652 1375.652

The best would be to share your files and code if you can. If not the files, at least the full script. PM me if you are not comfortable sharing it publicly.

In the meantime, some ideas:

  1. make sure you are using the latest version of SimPEG
  2. Double check the gallery and tutorial examples on how they import data and compare the various objects outputs to yours.

Thank you @ericjohnson, this helps.

To summarize here my findings for other users:

  • in the DC examples of the documentation like this one, the obs file is assumed to be sorted by sources position along the line (sort by Ax then Bx). This is not mentioned anywhere and need to be acknowledged.
  • there is a typo in the Pseudosections plotting code.

I will fix those issues right away.

Ongoing update of SimPEG: Fix dc2d: Pseudosection and add warning in examples for the observation file format by thast · Pull Request #969 · simpeg/simpeg · GitHub