diff --git a/src/gotm/gotm.F90 b/src/gotm/gotm.F90 index 1b1fd7fd6..a71325905 100644 --- a/src/gotm/gotm.F90 +++ b/src/gotm/gotm.F90 @@ -328,11 +328,6 @@ 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. @@ -340,6 +335,12 @@ subroutine init_gotm(t1,t2) 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.'