Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions src/aed_api.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,14 @@ SUBROUTINE aed_run_model(nCols, nLevs, doSurface)
!----------------------------------------------------------------------
!# Pre flux integration tasks
CALL pre_kinetics(all_cols(:,col), col, nLevs)

!----------------------------------------------------------------------
!# Particle BGC is needed BEFORE aed_run_column so bioshade works
IF (do_particle_bgc) THEN
CALL Particles(nLevs)
CALL aed_calculate_particles(all_cols(:,col), col, nLevs)
ENDIF


!----------------------------------------------------------------------
!# Main time-step tasks
Expand All @@ -1413,14 +1421,14 @@ SUBROUTINE aed_run_model(nCols, nLevs, doSurface)

!----------------------------------------------------------------------------
!# Particle tracking tasks
IF (do_particle_bgc) THEN
!IF (do_particle_bgc) THEN
! print *,'Particle BGC', call_count, nLevs
CALL Particles(nLevs)
DO col=1, nCols
IF (.NOT. data(col)%active) CYCLE !# skip this column if dry
CALL aed_calculate_particles(all_cols(:,col), col, nLevs)
ENDDO
ENDIF
! CALL Particles(nLevs)
! DO col=1, nCols
! IF (.NOT. data(col)%active) CYCLE !# skip this column if dry
! CALL aed_calculate_particles(all_cols(:,col), col, nLevs)
! ENDDO
!ENDIF

!-------------------------------------------------------------------------------
CONTAINS
Expand Down Expand Up @@ -1526,6 +1534,10 @@ SUBROUTINE aed_run_column(icolm, col, nlev, doSurface)
!# Time-integrate one biological time step
CALL calculate_fluxes(icolm, col, nlev, doSurface)

!# Update light needs to be called again so that any diagnostics that
!# influence like (e.g., cdom) have values from calculate_fluxes.
CALL update_light(icolm, col, nlev)

!# Update the water column layers
data(col)%cc(:, bot:top) = data(col)%cc(:, bot:top) + dt_eff*flux_pel(:, bot:top)

Expand Down