MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
147 stars 66 forks source link

zero-thickness blocks on horizontal directions #157

Open wilsonweijun opened 2 years ago

wilsonweijun commented 2 years ago

By using ModEM module, the model file contain zero-thickness blocks on lateral directions

Expected Behavior

the thicknesses of blocks should not be zero.

Current Behavior

MODEL FILE WRITTEN BY MTPY.MODELING.MODEM

74 206 70 0 LOGE 200.000 100.000 100.000 100.000 0.000 0.000 0.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 19.600 20.400 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 0.000 0.000 0.000 100.000 100.000 100.000 200.000 200.000 100.000 100.000 100.000 0.000 0.000 0.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 19.600 20.400 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.400 19.600 20.000 20.400 19.600 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 20.000 0.000 0.000 0.000 100.000 100.000 100.000 200.000 13.000 11.000 11.000 9.000 8.000 8.000 7.000 6.000

Possible Solution

the invertals between ajacent AMT station are dominatly 80 m, sometimes, the invertals are 40 m.

Steps to Reproduce (for bugs)

1. 2. 3. 4.

# Paste your code here
# mo=Model(station_locations=do.station_locations,
         cell_size_east=20,
         cell_size_north=20,
         pad_north=7,      # number of padding cells N and S
         pad_east=7,       # number of padding cells E and W
         pad_z=8,          # number of vertical padding cellls
         pad_num=4,        # number of cells outside station area before padding
         pad_stretch_v=1.4, # increasing factor in padding cells(vertical)
         pad_stretch_h=1.4, # increasing factor in padding cells(horizontal)
         n_air_layers=10,   # number of air layers
         res_initial_value=100,   # halfspace resistivity value for reference model (ohm-m)
         n_layers=60,       # total number of z layers,including air
         z1_layer=5,         # first layer thickness
         pad_method='stretch',   # method for calculating padding
         z_target_depth=2000
         )  # approx. depth to bottom of core model
#

Context

Your Environment

Installed Python Packages: use pip freeze or conda list [-n ENVIRONMENT_NAME] to list all the installed libraries.

kujaku11 commented 2 years ago

@wilsonweijun This was a bug in how mesh elements were rounded. This should be fixed in pull request #158 once @zhang01GA reviews the request it should be merged into main.

wilsonweijun commented 2 years ago

Thank you, @kujaku11. could you share the new mesh_tools.py to me and let me try it?

kujaku11 commented 2 years ago

@wilsonweijun you can have a look at pr #158 or pull from branch patch_157 to look at a patched version of mesh_tools.py