Skip to content

Commit

Permalink
Fix #68, crash with warmstart and kappa scheme
Browse files Browse the repository at this point in the history
In readinitfiles() in modstartup.f90, when doing a warmstart,
call baseprofs before calc_halflev. baseprofs calculates or loads the
base density profiles rhobf and rhobh, and calc_halflev uses
them if qt or thl is advected with the kappa scheme.

Found and fixed by Niklas Schnierstein, Arseniy Doyenne, Eric de Gruyter
  • Loading branch information
fjansson committed Dec 7, 2023
1 parent 8e9a228 commit cde8e76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modstartup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,9 @@ subroutine readinitfiles
else !if lwarmstart

call readrestartfiles
call baseprofs ! reads rhobf, rhobh. Needed before calc_halflev,
! which needs base densities
! in case of kappa scheme for thl or qt
um = u0
vm = v0
wm = w0
Expand Down Expand Up @@ -728,7 +731,6 @@ subroutine readinitfiles

! CvH - only do this for fixed timestepping. In adaptive dt comes from restartfile
if(ladaptive .eqv. .false.) rdt=dtmax
call baseprofs !call baseprofs

end if ! end if (.not. warmstart)

Expand Down

0 comments on commit cde8e76

Please sign in to comment.