mantle-convection-constrained / terratools

Tools to read, analyse and visualise models written by the TERRA mantle convection code
https://terratools.readthedocs.io/en/latest/
MIT License
7 stars 5 forks source link

Changes to flowfield calculations / descriptions. #108

Closed jwookey closed 1 year ago

jwookey commented 1 year ago

This commit updates the calculations of a geographical decription of the flowfield to be (a) more intuitively defined, and (b) with an interface more consistent with the other parts of the code. Specifically:

It also adds an example of plotting the flowfield on a map.

Fixes issues #107 and (partially) fixes #43

eejwa commented 1 year ago

Looks good to me in terms of the code changes and tests! Thanks again for doing that. I think there's an issue in the example where the path to an example terra model isn't on GitHub. I'm not sure how to get around this and where we got to with hosting an example model online somewhere for download. @andreww @anowacki what do you think?

eejwa commented 1 year ago

@jamespanton93 seems to get around this by making a NetCDF file from scratch from the function make_old_file() in the test_convert_files.py file. I think for the flow conversion we'd need to have a u_xyz field instead of Velocity_x and maybe a specific pattern rather than random?

jwookey commented 1 year ago

Thanks for looking over the code @eejwa. For the moment (and for the sake of clarity) I've removed the example from the pull request so it just covers the changes to the flow field. I'll look at how James does it, but I think we indeed talked about having an example model in some form with the distribution, so I'll hold off generating stuff until we decide.