Skip to content

Commit

Permalink
backport: postpone call to start_gotm_fabm to ensure density is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
bolding committed Apr 30, 2018
1 parent 1dcb60a commit 24749f9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/gotm/gotm.F90
Expand Up @@ -328,18 +328,19 @@ subroutine init_gotm(t1,t2)
call setup_restart()
! call init_output(title,nlev,latitude,longitude)

#ifdef _FABM_
! Accept the current biogeochemical state and used it to compute derived diagnostics.
if (fabm_calc) call start_gotm_fabm(nlev)
#endif

call do_air_sea(julianday,secondsofday)

! Call stratification to make sure density has sensible value.
! This is needed to ensure the initial density is saved correctly, and also for FABM.
call shear(nlev,cnpar)
call stratification(nlev,buoy_method,dt,cnpar,nuh,gamh)

#ifdef _FABM_
! Accept the current biogeochemical state and used it to compute derived diagnostics.
! This MUST be preceded with a call to stratification, in order to ensure FABM has a valid density.
if (fabm_calc) call start_gotm_fabm(nlev)
#endif

if (list_fields) call fm%list()

LEVEL2 'done.'
Expand Down

0 comments on commit 24749f9

Please sign in to comment.