Skip to content

Commit af9fcd4

Browse files
sbryngelsonclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 20af2d3 commit af9fcd4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/simulation/m_global_parameters.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ contains
700700
bub_pp%gam_g = dflt_real; gam_g = dflt_real
701701
bub_pp%M_v = dflt_real; M_v = dflt_real
702702
bub_pp%M_g = dflt_real; M_g = dflt_real
703-
bub_pp%k_v = dflt_real; k_v = dflt_real
704-
bub_pp%k_g = dflt_real; k_g = dflt_real
703+
bub_pp%k_v = dflt_real
704+
bub_pp%k_g = dflt_real
705705
bub_pp%cp_v = dflt_real; cp_v = dflt_real
706706
bub_pp%cp_g = dflt_real; cp_g = dflt_real
707707
bub_pp%R_v = dflt_real; R_v = dflt_real

0 commit comments

Comments
 (0)