From 8c6410af5121b7faf3984321a3233bcf8cd2fe62 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 10 Dec 2024 13:19:50 +0100 Subject: [PATCH] Fix #10847 - allocate right sized arrays ZFACE is -35:100, positive indicates Below ground (NZBG). A, B, C,R and X are used in the 1 to NZBG range, so they should be 100 elements not 50 (Note: they are 1-indexed) --- src/Basement/3DBasementHT.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Basement/3DBasementHT.f90 b/src/Basement/3DBasementHT.f90 index b1dcd6b60f4..8c42fa97b4a 100644 --- a/src/Basement/3DBasementHT.f90 +++ b/src/Basement/3DBasementHT.f90 @@ -9641,7 +9641,7 @@ SUBROUTINE CalcTearth(IEXT,JEXT,DZ,DZP,TG,CVG) !*** DECLARATIONS: - REAL(r64) A(50), B(50), C(50), R(50), X(50), ALB, ALBEDO(2), & + REAL(r64) A(100), B(100), C(100), R(100), X(100), ALB, ALBEDO(2), & & AVGWND, CG, CONST(0:100,2), CPA, DH, DODPG, DW, & & DZ(-35:100), DZP(-35:100), ELEV, EPS, EPSLN(2), & & GOFT, GOLD, HRAT(24), IEXT, JEXT, LAT, LONG, MSTD, PBAR(24), &