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

Read layers #106

Closed jamespanton93 closed 10 months ago

jamespanton93 commented 1 year ago

Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable.

Adding routine for converting 'old' layer files into 'new' ones which include a depth dimension. Add TerraModelLayer subclass

Before your first pull request:

For all pull requests:

For new features/models or changes of existing features:

anowacki commented 1 year ago

Looks good, @jamespanton93. I'm happy to merge without, but it would be good to get some docs on this as well. I guess a sample model file at low resolution would also be good for the layer things. Without that it's a bit hard to test locally anyway.

anowacki commented 1 year ago

Looking a bit more, I think this still needs tests for the layer file IO and tests generally for the TerraModelLayer class.

anowacki commented 1 year ago

I've converted this to a draft due to the above and once it's ready (i.e., has tests, and example files have been uploaded) we can finish it off.

jamespanton93 commented 11 months ago

@andreww How can I get an example layer file added to the figshare?

andreww commented 11 months ago

@jamespanton93 - I 'own' the figshare dataset, so you'll need to give me access to the file and I'll upload it. Otherwise you could create your own dataset, add it there, and add the resulting doi to the module with the example handling functions in. In either case, you'll need to modify that file.

anowacki commented 10 months ago

Looking good—thanks!

I fixed a couple of minor things.

Could we maybe add something to the website docs? I guess the layer file format needs specifying in docs/file_formats.md and a mention of the TerraModelLayer class in docs/model.md. If you want to do that in a separate PR, that's okay, or pull in my changes and update this one.