From 77373aaf8d381bd3699b4fadf39764d74cfbe964 Mon Sep 17 00:00:00 2001 From: Dave Whipp Date: Wed, 5 Nov 2025 22:41:33 +0200 Subject: [PATCH 1/3] Fix bug with particle depth tracking --- src/tc1d/tc1d.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tc1d/tc1d.py b/src/tc1d/tc1d.py index b0d8f71..5ec85e2 100644 --- a/src/tc1d/tc1d.py +++ b/src/tc1d/tc1d.py @@ -3209,6 +3209,9 @@ def run_model(params): # Loop over all times and use -dt to run erosion model backwards # TODO: Make this a function??? while curtime > 0.0: + # Increment current time + curtime -= dt + # Find particle velocities and move incrementally to starting depths vx_pts, vx, vx_max, fault_depth = calculate_erosion_rate( params, @@ -3228,8 +3231,7 @@ def run_model(params): if params["plot_fault_depth_history"]: fault_depth_history[idx] = fault_depth - # Increment current time and idx - curtime -= dt + # Increment idx idx += 1 # Reverse exhumation history for plotting From c4866930837d5418320ab1fd42dda5163e103341 Mon Sep 17 00:00:00 2001 From: Dave Whipp Date: Wed, 5 Nov 2025 22:42:47 +0200 Subject: [PATCH 2/3] Bump version number --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b566e62..1147c0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "tc1d" -version = "0.3.0" +version = "0.3.1" authors = [ {name = "Dave Whipp", email = "david.whipp@helsinki.fi"}, {name= "Benjamin Gérard", email = "benjamin.gerard@helsinki.fi"}, @@ -126,3 +126,4 @@ ruff = ">=0.12.12,<0.13" hatchling = ">=1.27.0,<2" mypy = ">=1.17.1,<2" pip = ">=25.2,<26" +pre-commit = ">=4.3.0,<5" From 618648af1878aaafe76c9e784b4de2c46999650e Mon Sep 17 00:00:00 2001 From: Dave Whipp Date: Thu, 6 Nov 2025 08:41:18 +0200 Subject: [PATCH 3/3] Format code with ruff --- src/tc1d/tc1d_cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tc1d/tc1d_cli.py b/src/tc1d/tc1d_cli.py index 558d1eb..2b58a6a 100755 --- a/src/tc1d/tc1d_cli.py +++ b/src/tc1d/tc1d_cli.py @@ -2,6 +2,7 @@ # Import libraries we need import argparse +from importlib.metadata import version import sys import tc1d @@ -15,6 +16,7 @@ def main(): description="Calculates transient 1D temperatures and thermochronometer ages", formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) + parser.add_argument("-v", "--version", action="version", version=version("tc1d")) general = parser.add_argument_group( "General options", "Options for various general features" )