Skip to content

Conversation

mitchellmcm27
Copy link

I'm reopening this after changing branches on my fork. The failing tests are expected as this PR will yield slightly different temperature interpolations (more accurate ones IMO). Let me know if I should update the tests.


This change is driven by the fact that, by default, the interp_linear_T function created by linear_interpolation throws when asked to extrapolate without being given an extrapolation method.

The need for extrapolation is due the 1d temperature profile being constructed by rounding min/max depth to the nearest km, sometimes resulting in a slightly smaller depth range than the actual layers in the model.

I think I understand the original impetus for rounding to the nearest km: it is highly likely that the user has input lithosphere thicknesses as a whole-km number, but finite grid spacing means that interfaces get shifted a bit.

However, I think it is more accurate to forego rounding here. Whether my lithosphere ends up being 100km or 99.3km, I want the base and surface of it to initially be certain temperatures in the model.

Removing the rounding removes the possibility of extrapolation and results in a T profile that will be interpolated onto the model slightly more accurately.

Also renamed some of the internal variables for clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant