BG_MCMC_NA#1
Open
gerardb-fr wants to merge 4 commits into
Open
Conversation
- Refactored inversion logic: added separate `batch_run_na` and `batch_run_mcmc` functions - Introduced `--inverse-mode` CLI flag to switch between NA and MCMC - Preserved existing TC1D architecture and compatibility with CLI erosion parameters - Automatic generation of MCMC output plots (corner plots, trace plots, misfit scatter)
…nable support for negative erosion values (burial) for NA and MCMC inversions - Added CLI options: --ero-option9 and --ero-option10 - Extended erosion rate calculation for up to 5 intervals (thickness + time) - Updated total exhumation calculation to include ero_option9 - Applied constraints in MCMC and NA to prevent exceeding max exhumation - Extended batch mode detection and output logging for new parameters - Added bounds logic in ‘batch_run_na’ to handle negative erosion values (up to -15 km) using max_burial and max_exhumation constraints. - Enforced cumulative erosion thickness to avoid total uplift above surface. - Safeguarded temperature and pressure interpolation for depth < 0 (to avoid scipy interpolation errors). - Updated MCMC log_prior constraints to support negative values for ero_option1, 3, 5, 7, 9 - Enforced dynamic upper/lower bounds for each interval based on cumulative exhumation and burial limits - Introduced `max_burial` (default 15 km) as lower limit for allowed burial - Rejected models with cumulative erosion < 0 km to avoid unrealistic above-surface placement - Applied identical logic for both NA and MCMC to ensure consistent inversion behavior - All changes clearly marked with '# BG:’ - Preserved full backward compatibility for previous 3-interval configurations This enables testing of more complex, stepwise erosion histories in both forward and inversion modes.
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.
Purpose: the erosion model for ero_type = 2 was extended to support up to five erosion intervals, defined by pairs of erosion thicknesses and time breakpoints.
Command-line interface (tc1d_cli.py):
Erosion rate calculation (tc1d.py):
Total exhumation calculation:
Inversion constraints (MCMC & NA):
Batch mode handling:
Output logging:
This update also extends the Neighbourhood Algorithm (NA) and MCMC inversion to support negative erosion values (i.e. burial). Negative thickness values (e.g. ero_option3 = -5) are now accepted as long as cumulative erosion stays within a physically meaningful range (between -15 and +35 km).
Changes include:
These changes allow inversion scenarios that include temporary burial events (e.g. sedimentation before renewed exhumation), which were previously not supported.