From 20af2d39e4a5da68bf021d796386e8a8896dc406 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 22:19:16 -0500 Subject: [PATCH 1/2] Fix k_v and k_g module-level variables not initialized to dflt_real Every other bubble parameter follows the pattern of initializing both bub_pp%var and the module scalar, but k_v and k_g skip the module scalar initialization. Co-Authored-By: Claude Opus 4.6 --- src/simulation/m_global_parameters.fpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index aa45e2668b..112a803591 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -700,8 +700,8 @@ contains bub_pp%gam_g = dflt_real; gam_g = dflt_real bub_pp%M_v = dflt_real; M_v = dflt_real bub_pp%M_g = dflt_real; M_g = dflt_real - bub_pp%k_v = dflt_real; - bub_pp%k_g = dflt_real; + bub_pp%k_v = dflt_real; k_v = dflt_real + bub_pp%k_g = dflt_real; k_g = dflt_real bub_pp%cp_v = dflt_real; cp_v = dflt_real bub_pp%cp_g = dflt_real; cp_g = dflt_real bub_pp%R_v = dflt_real; R_v = dflt_real From af9fcd4f62693d979cbe222b262021ad84c32080 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 23:34:23 -0500 Subject: [PATCH 2/2] Fix invalid assignment to unallocated k_v/k_g arrays k_v and k_g are allocatable arrays that are only allocated in s_initialize_bubbles_model when bubbles_euler .and. .not. polytropic. Assigning a scalar to them in s_assign_default_values_to_user_inputs, which runs before allocation, is invalid Fortran and causes a runtime error. Remove the premature array assignments; bub_pp%k_v/k_g (scalars) are correctly initialized and the arrays are populated from them later in s_initialize_bubble_vars after allocation. Co-Authored-By: Claude Sonnet 4.6 --- src/simulation/m_global_parameters.fpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index 112a803591..9607429aa5 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -700,8 +700,8 @@ contains bub_pp%gam_g = dflt_real; gam_g = dflt_real bub_pp%M_v = dflt_real; M_v = dflt_real bub_pp%M_g = dflt_real; M_g = dflt_real - bub_pp%k_v = dflt_real; k_v = dflt_real - bub_pp%k_g = dflt_real; k_g = dflt_real + bub_pp%k_v = dflt_real + bub_pp%k_g = dflt_real bub_pp%cp_v = dflt_real; cp_v = dflt_real bub_pp%cp_g = dflt_real; cp_g = dflt_real bub_pp%R_v = dflt_real; R_v = dflt_real