I'm curious about how it figures out the biological advection and mixing. I read the codes in main3d.F and step3d_t.F. I found that in the main3d.F or main3d_offline.F, it calls biology first, and then calls step3d_t after calling biology. Is this meaning it actually adds increment due to BGC processes first, and then doing the physical advection and diffusion process of biological tracers? I can't understand why is in this order. Or is it doesn't matter who is first?!-----------------------------------------------------------------------
! Update global tracer variables: Add increment due to BGC processes
! to tracer array in time index "nnew". Index "nnew" is solution after
! advection and mixing and has transport units (m Tunits) hence the
! increment is multiplied by Hz. Notice that we need to subtract
! original values "Bio_old" at the top of the routine to just account
! for the concentractions affected by BGC processes. This also takes
! into account any constraints (non-negative concentrations, carbon
! concentration range) specified before entering BGC kernel. If "Bio"
! were unchanged by BGC processes, the increment would be exactly
! zero. Notice that final tracer values, t(:,:,:,nnew,:) are not
! bounded >=0 so that we can preserve total inventory of nutrients
! when advection causes tracer concentration to go negative.
In step3d_t.F file, there is usually these codes. Is this meaning that there isn't any physical advection and diffusion process in my biological modules if I don't define OFFLINE_BIOLOGY? However, when I define OFFLINE_BIOLOGY, it chooses the main3d_offline.F instead of main3d.F.
Code: Select all
! Horizontal tracer advection. It is possible to have a different
! advection schme for each tracer.
!
#ifdef OFFLINE_BIOLOGY
T_LOOP1 : DO ibt=1,NBT
itrc=idbio(ibt)
#else
T_LOOP1 : DO itrc=1,NT(ng)
#endif
Code: Select all
/*
** OFFLINE
*/
#if defined OFFLINE_FLOATS || defined OFFLINE_BIOLOGY
# define OFFLINE
#endif