Closed glemieux closed 1 year ago
Order of operations:
Init:
allocate_bcin/bcout
(called from elmfates init
<- elm_inst_biogeochem
)bc_in(s)%seed_in
and bc_out(s)%seed_out
via zero_bcs
(called from elmfates init
<- elm_inst_biogeochem
)Dynamics:
bc_out%seed_out(pft)
via call to SeedIn
(called from ed_integrate_state_variables
<- ed_ecosystem_dynamics
<- dynamics_driv
)bc_out%seed_out
into an local output buffer for the current gridcell bc_in%seed_in
values via wrap_seed_dispersal
Unless we are planning on sharing the seed information with the host land model, we don't really need this to be formatted as part of the bc_in/out
data structure. That said, this setup will provide future-proofing if so desired. The wrapped mpi call does need to take place within elm_drv outside of the OMP threading pragmas, but we could still use separate fates type structure.
I need to refresh myself on how the probability density is used in conjunction with the seed mass. This PD value for each neighboring grid cell in held in the neighborhood type and not used currently. Since its held in the neighborhood_type
and indexed by gridcell, the calculation needs to happen in WrapSeedGlobal
outside of the fates threaded area.
UPDATE: Yes, I need to update the incoming_global
value based on the PD. See https://github.com/glemieux/fates/issues/23 for further updates.
Complete
The regular seed dispersal update code in
elm_drv
should be neatly wrapped up into fates code.bc_in
andbc_out
assignmentwrap_seed_...
calls into elmfates_interfaceMod, instead of elm_driveris_beg_curr_...
)~