Repository navigation
[MAJOR VERSION BUMP] Support GeoParams v0.8, drop Julia 1.9, coverage improvements, performance updates - #224
Merged
Merged
Conversation
mthielma
approved these changes
Oct 5, 2026
mthielma
left a comment
Contributor
There was a problem hiding this comment.
Dropping julia 1.9 is fine with me, along with the other changes. Fell free to merge once the tests all pass.
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whats the purpose of this PR?
Describe it in more detail below:
Performance
The fields of the data structures (
GeoData,UTMData, …) and of the thermal-structure parameter types (HalfspaceCoolingTemp,SpreadingRateTemp) are not concretely typed, so loops that index them dynamically dispatched on every grid point. The per-point loops of the UTM ↔ lon/lat conversions and of the halfspace-cooling and spreading-rate thermal structures now run in separate functions that are called with the unpacked arrays and parameters, so they compile for the concrete types. The structs themselves are unchanged and results are numerically identical.Median of 5 runs, Julia 1.13, Apple Silicon; model-setup cases on a 128³ grid:
add_box!+SpreadingRateTempadd_layer!+HalfspaceCoolingTempadd_box!+HalfspaceCoolingTemp, dippingadd_plate!with ridge segmentsconvert(UTMData, ::GeoData), 600k pointsconvert2CartData(::GeoData, proj), 600k pointsconvert(GeoData, ::UTMData), 1M pointsproject_CartData(GeoData volume → 1M-point CartData)Memory allocated by these calls drops by 15–55%.
Bug fixes
Each fix has a test that fails without it.
voxel_gravthrew an error when called with the defaultrefMod = "AVG"; the reference model is now the mean density of each depth slice, as documented.voxel_gravrejected regular grids in metres as "non-regular", because the spacing check used an absolute tolerance of1e-12. It now uses a relative tolerance.project_CartData(::CartData, ::CartData)referenced an undefined variable; it now interpolates the fields of the second dataset onto the first.interpolate_datafields(::UTMData, …)and+/-onUTMDatasurfaces did not pass the UTM zone to the constructor and always threw (this also affected the 3D case ofproject_CartData(::CartData, ::UTMData, ::ProjectionPoint)).fit_surface_to_points(::GeoData, …)threw, used surface indices on the point vector, and would have modified its input.interpolate_data_surfaceforParaviewDataandCartDatatried to modify an immutableGeoUnit.coordinate_grids(::ParaviewData)passed 3D arrays toxyz_grid.interpolate_datafields_2Dthrew for datasets that contain vector (tuple) fields.GMG_Datasetthrew aBoundsErrorfor directory names shorter than 5 characters.ReadCSV_LatLonno longer prints a debug line.Removed dead code
src/sea_level.jl(an outdated copy ofsrc/sea_lvl.jl) andsrc/IO_ASAGI.jl(now in the NCDatasets extension) were not included by the package.cell_tags_from_gmshinsrc/pTatin_IO.jlduplicated the one in the Gmsh extension, which is the one in use.Tests and coverage
Line coverage of
src/andext/goes from 63.9% to 83.5%. New tests cover printing of all data types,write_paraviewforQ1Data/FEData/UTMDataand movies, coordinate transformations, surface operations,voxel_grav(input checks, units, orientation, reference models; the test file is now organized in testsets), CSV import, the LaMEM partitioning helpers, and the 2D interpolation and lithostatic-pressure utilities.Checklist
[BUGFIX],[ADDITION],[DOC], etc.