Skip to content

Conversation

@rqthomas
Copy link

This PR addresses two issues:

  1. Particles did not influence the light environment because their biomass in a layer was zero when the light extinction function is called
  2. cdom never influences the light environment because cdom is always zero when the light extinction function is called.

These two issues are interconnected because they both use diagnostic variables, rather than state variables, in the light extinction function. Diagnostic variables have a value of 0 before the calculate_fluxes function is called. So update_light needs to be called after calculate_fluxes so that the updated Kw is available to influence the physics. Instead of removing the update_light before calculate_fluxes, I added another call to update_light. As a result, update_light is called twice in a time step. Other than minor additions to the compute, are there any issues with this?

Since aed_light_extinction_phyto_abm is called inside aed_run_column to determine the particle shading, aed_calculate_particles needs to be called before aed_run_column so that the _DIAG_VAR_(data%id_phyc) variable is non-zero.

However, this fix is not ideal because the bioshape from cdom will always be missing from calculate_fluxes at the first time step of a simulation. The proper solution would be to initialize the cdom diagnostic at the beginning of the simulation. This would remove the need to call update_light after calculate_fluxes.

Refactor particle BGC handling and update light calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant