Skip to content

Commit

Permalink
keep allocate/deallocate in the ice_nucleation.F90 (fix it in the fut…
Browse files Browse the repository at this point in the history
…ure)
  • Loading branch information
tangwhiap committed Dec 3, 2024
1 parent 9b38567 commit abfa072
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ice_nucleation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit abfa072

Please sign in to comment.