Skip to content

fates_trim_limit not enforced #1393

@rgknox

Description

@rgknox

The user controlled parameter, fates_trim_limit, should impose a floor on the amount of trim that is applied to a cohort. @ckoven was able to generate a scenario where that floor was not enforced though.

This was a CNP enabled simulation that generated an allocation error, note in the log that the trim increment was 0.0398, @ckoven did not change from the default which should have held it above 0.3. After imposing a hard-coded floor of 0.1, he was able to avoid crashes:

622:  CNP Plant Growth Integrator could not find
622:  a solution in less than          300  tries
622:  Aborting
622:  mask:  F F T T T T T
622:  smallest deltaC  4.483939722804148E-009
622:  totalC   1.42075822763575        4.81459361666978        6.12656326377269     
622:    6.12656326377266     
622:  pft:           14
622:  trim:   3.986227508315093E-002
622:  l2fr:   0.839271088443462     
622:  dbh:    30.0039648717492     
622:  elongf_leaf:    1.00000000000000     
622:  elongf_fnrt:    1.00000000000000     
622:  elongf_stem:    1.00000000000000     
622:  dCleaf_dd:   0.000000000000000E+000
622:  dCfnrt_dd:   0.000000000000000E+000
622:  dCstore_dd:   0.000000000000000E+000
622:  dCsapw_dd:   1.252358653371223E-002
622:  dCstruct_dd:   0.000000000000000E+000
622:  repro c frac:   0.200000000000000     
622:  leaf_c:    1.14693284208197       0.312055732303069       0.834877109778898     
622:  fnrt_c:   0.959950348513506       0.261899354105018       0.698050994408488     
622:  sapw_c:    2.99431715964122        3.99431715964119       -0.999999999999975     
622:  store_c:   0.748933757527364       0.748933757527364       0.000000000000000E+000
622:  struct_c:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
622:  ENDRUN: 
622:  ERROR: ERROR in PRTAllometricCNPMod.F90 at line 1756

Here is where trim_limit is evaluated:

https://github.com/NGEET/fates/blob/sci.1.82.6_api.39.0.0/biogeochem/EDPhysiologyMod.F90#L831-L841

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    ❕Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions