Skip to content

100% allocation to reproduction in shrubs causes crash in FATES-CNP  #1283

@JessicaNeedham

Description

@JessicaNeedham

I’m getting a fail in global CNP simulations when DEBUG=TRUE due to a divide by zero error caused by 100% allocation to reproduction in shrubs.

repro_w = total_w * repro_c_frac/(1._r8 - repro_c_frac)

The line above causes a ‘forrtl: error (65): floating invalid’ error which I guess is because repro_c_frac is 1.

If we aren’t using the TRS scheme, and the cohort has a dbh above their dbh threshold for increased allocation to reproduction, then repro_c_frac is defined here:

repro_c_frac = prt_params%seed_alloc(ipft) + prt_params%seed_alloc_mature(ipft)

Looking at the default parameter file, shrubs would have 0.1 and 0.9 which triggers the error above.

fates_recruit_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,

fates_recruit_seed_alloc_mature = 0, 0, 0, 0, 0, 0, 0.9, 0.9, 0.9, 0.9, 0.9,

This is only triggered when DEBUG=TRUE. When debug is false it keeps running, but I’m not sure what the behaviour is. This was with the intel compiler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✔ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions