diff --git a/src/ice_nucleation.F90 b/src/ice_nucleation.F90 index d3992202..2df62150 100644 --- a/src/ice_nucleation.F90 +++ b/src/ice_nucleation.F90 @@ -161,6 +161,7 @@ subroutine immersion_freezing_singular(aero_state, aero_data, env_state_initial, aero_state%apa%particle(i_part)%ice_shape_phi = 1d0 end if end do + deallocate(total_masses) deallocate(H2O_masses) deallocate(H2O_frac) @@ -215,6 +216,10 @@ subroutine immersion_freezing_time_dependent(aero_state, aero_data, env_state_in integer :: loop_count = 0 + allocate(total_masses(aero_state_n_part(aero_state))) + allocate(H2O_masses(aero_state_n_part(aero_state))) + allocate(H2O_frac(aero_state_n_part(aero_state))) + call aero_state_sort(aero_state, aero_data) total_masses = aero_state_masses(aero_state, aero_data) @@ -286,7 +291,10 @@ subroutine immersion_freezing_time_dependent(aero_state, aero_data, env_state_in enddo loop_choosed_particles enddo loop_classes enddo loop_bins - + + deallocate(total_masses) + deallocate(H2O_masses) + deallocate(H2O_frac) end subroutine immersion_freezing_time_dependent