Tools for GPlates: standardised rotation file formatting and syntax colouring

Dear all,

over the years I’ve generated some code snippets for GPlates which have been simmering and “maturing” at different speeds.I feel that some of the scripts/tools might be useful for the community and would also benefit from more rigorous and wider testing, hence this post.

In particular I would advocate to increase the adoption of the “new” GROT rotation data format, and the gptools scripts (link below) can maybe help a bit with this. Moving the rotation data files to a more standardised and meta-data rich format will ultimately be of benefit to the community through facilitating and standardising the format and making it easer to compare, especially when using code repositories. Dealing with a number of different models from different groups in my day-to-day work I can only say that the unformatted and non-standarised metadata in rotation files are a huge source of errors and pain and often stand in the way of preventing reproducibility leading to better plate kinematic models. Any feedback/comments on this is appreciated.

So here’s a short rundown on the tools:

  • A Python-based workflow to re-format rotation files called gptools - https://code.paleoearthlabs.org/gptools. It can:

    • convert the old PLATES format to the new metadata-rich GROT format (or the other way around). That allows for much easier diffs between files for comparison

    • clean up and standardise metadata (such as DOI entries, cite keys, comments and moving plate rotation sequence headers).

    • add a standardised header and bibliography section to your rotation files (only *.grot format)

    • allows to convert a DBF file exported from a PaleoGIS rotation table to a GROT formatted file.

    • The script will unearth a lot of issues in your files, in particular in the metadata - be it citations with missing DOIs, erroneous metadata, missing citations, wrong plate pairs, missing crossover annotations (automatically detected) etc. etc.

    • Further, there’s a script to concatenate several GROT files (partly taking care of PaleoGIS’ ability to have several rotation tables linked).

    • Another script to generate reconstructable graticule features as GPML feature collection, which can be loaded into GPlates and used in reconstruction maps as visual guidance for present-day plate orientation. See here for example.

    • This has a number of open tickets and planned enhancements so have a look at the ticket list. And by all means, this is an alpha version…

  • A GPlates rot/grot syntax-colouring bundle for the TextMate editor - available at https://code.paleoearthlabs.org/GPlates.tmbundle. Apparently the Textmate Grammar is used in M$'s VisualStudio Code editor, so could be of use for people using VS Code. I am using VS Code at work but haven’t had the time to look into porting the syntax colouring from Textmate yet.

The code lives in Fossil repositories which all have an issue tracker, forum and (some) documentation (accessible anonymously, so no need to create an account unless you want to). I am also providing downstream GIT mirrors at Sourcehut for the GPlates bundle and the gptools.

I would appreciate any feedback, bug reports or contributions to make the scripts more robust. Also - especially the gptools scripts are likely still quite buggy and have only been tested internally at work with limited rotation file data.

Cheers,
Christian