Help with 3D gravity forward modelling

Hi there. I’m trying to do gravity forward modelling on a large model of about 2020 40 km, characterised by 2 density layers (a mantle with a crustal root and a crust), 2 sphere sources in the crust and a very simple topography defined by a 1000 m high mountain. I want to reproduce some sort of Bouguer anomaly in my data, so I set the topography density contrast to 0, but there is a strange circular positive anomaly in the predicted data that I can’t figure out. Can anyone help me improve my code? I’m a beginner with coding and Python, so please excuse my many mistakes.
fwd_tree_model.ipynb (241.4 KB)