From f66443738fc3c769bba491c866881ca78e757bd3 Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Sun, 10 Nov 2024 14:54:40 -0500 Subject: [PATCH] okay, can't have tropopause be above the model top lol --- src/extract.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/extract.jl b/src/extract.jl index fa3619a..610dab5 100644 --- a/src/extract.jl +++ b/src/extract.jl @@ -183,6 +183,7 @@ function extractwwtg( iwwtg = @views wwtg[:,it,ids] if !isnan(sum(iwwtg)) itrop = findlast(.!iszero.(iwwtg)) + 1 + if itrop > length(iwwtg); itrop = length(iwwtg) end ztrop[it,ids] = z[itrop,ids] ptrop[it,ids] = p[itrop,ids] iwwtg = @views iwwtg[1:itrop]