Skip to content

About stashCValues and year fraction handling #805

@pjbarjhoux

Description

@pjbarjhoux

Hi,

If I understand correctly, when rapid growth in the ocean-atmosphere carbon flux triggers the ocean component to enforce a sub-annual maximum step size, the ODE solver splits the year into several sub-intervals and calls SimpleNbox::stashCValues() once after each sub-interval converges.

The question concerns the stashCValues definition : each call adds the full annual LUC flux
(luc_e − luc_u) × veg_frac to cum_luc_va, without scaling by the sub-interval fraction yf :

cum_luc_va =
cum_luc_va + unitval((luc_e - luc_u) * c[SNBOX_VEG] / total, U_PGC);

I am wondering if this full annual flux should be multiplied by yf ?

  cum_luc_va =
      cum_luc_va + unitval((luc_e - luc_u) * c[SNBOX_VEG] / total * yf, U_PGC);

exactly as the biome-loop fluxes immediately below in the same function already do, eg:

fluxpool luc_fva_biome_flux =
    yf * veg_c[biome].flux_from_fluxpool(luc_e_untracked * veg_frac);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions