MTgeophysics / mtpy

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

Project stations on topography does not seem to work correctly in a marine environment #133

Closed katerob31 closed 3 years ago

katerob31 commented 3 years ago

Expected Behavior

My interpretation of the code for modem.data.project_stations_on_topography is that it will shift the elevation of MT sites to just beneath the topography. This works as expected when all of the MT stations are on land. However I don’t think the code accounts for a marine MT site (at the bottom of the ocean).

Current Behavior

Currently, the elevation of an MT site in a marine environment is put at an elevation of .001 m (i.e. floating at the top of the ocean).

Possible Solution

For this to work, I think the code needs to check if there are any ocean cells beneath the air cells at the location of an MT station too. (In the function: project_stations_on_topography )

Context

Trying to make ModEM input files for an amhibious MT data set (partially on land, partially ocean-bottom)

kujaku11 commented 3 years ago

@katerob31 Check branch modem_updates. I added in a parameter for ocean bottom stations.

Usage

data_obj.project_stations_on_topography(model_object, ocean_bottom=True, sea_resistivity=0.3)

I didn't do any testing, it looks for the deepest cell that is less than sea water, so if you have added sediments that are less than sea water it might place the station lower than expected. If you get a chance try it out and chat back if it fails.

katerob31 commented 3 years ago

Yes, works perfectly! Thanks Jared