From e12577c048b7653acdec95e34a01a4d0406b2f16 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 22:17:17 -0500 Subject: [PATCH] Fix moncon_cutoff declared as integer, truncating 1e-8 to 0 moncon_cutoff is assigned 1e-8_wp but declared as integer, so Fortran silently truncates it to 0. This makes all THINC monotonicity constraint comparisons always true, completely disabling the constraint. Co-Authored-By: Claude Opus 4.6 --- src/common/m_constants.fpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/m_constants.fpp b/src/common/m_constants.fpp index f926824cb8..1a87f0a912 100644 --- a/src/common/m_constants.fpp +++ b/src/common/m_constants.fpp @@ -44,7 +44,7 @@ module m_constants ! Interface Compression real(wp), parameter :: dflt_ic_eps = 1e-4_wp !< Ensure compression is only applied to surface cells in THINC real(wp), parameter :: dflt_ic_beta = 1.6_wp !< Sharpness parameter's default value used in THINC - integer, parameter :: moncon_cutoff = 1e-8_wp !< Monotonicity constraint's limiter to prevent extremas in THINC + real(wp), parameter :: moncon_cutoff = 1e-8_wp !< Monotonicity constraint's limiter to prevent extremas in THINC ! Chemistry real(wp), parameter :: dflt_T_guess = 1200._wp ! Default guess for temperature (when a previous value is not available)