Skip to content

Canopy sorting problems with nclmax>2 #1388

@rgknox

Description

@rgknox

Tests with nclmax = 3 are generating model crashes on an f10 smoke test using nocomp and fixed biogeography.

Branch (April 11 2025): https://github.com/rgknox/fates/tree/nclmax-3

I attach an error message, and added in a patch dump (modified to dump cohorts too) before the error triggers.

Error triggered at EDCanopyStructureMod.F90 Line 2233, apparently trying to divide by patch%total_canopy_area (which is zero). There is a cohort on the patch with positive LAI, so there is something clearly wrong with how it is calculating total_canopy_area

/glade/u/home/rgknox/ctsm/src/fates/biogeochem/EDCanopyStructureMod.F90:2233):

write(fates_log(),*)'broken area?',cl,currentPatch%total_canopy_area,currentCohort%treelai,currentCohort%pft
dec1048.hsn.de.hpc.ucar.edu 109:  broken area?           2   0.0000000000000000        4.0938325628941036E-002          14
dec1048.hsn.de.hpc.ucar.edu 109:  ----------------------------------------
dec1048.hsn.de.hpc.ucar.edu 109:   Dumping Patch Information              
dec1048.hsn.de.hpc.ucar.edu 109:   (omitting arrays)                      
dec1048.hsn.de.hpc.ucar.edu 109:  ----------------------------------------
dec1048.hsn.de.hpc.ucar.edu 109:  pa%patchno            =            5
dec1048.hsn.de.hpc.ucar.edu 109:  pa%age                =    3.9424657534247611     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%age_class          =            3
dec1048.hsn.de.hpc.ucar.edu 109:  pa%area               =    5949.6906240181215     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%num_cohorts        =            1
dec1048.hsn.de.hpc.ucar.edu 109:  pa%ncl_p              =            2
dec1048.hsn.de.hpc.ucar.edu 109:  pa%total_canopy_area  =    0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%total_tree_area    =    0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%total_grass_area   =    0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%zstar              =    0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%gnd_alb_dif        =    1.0000000000000000E+036   1.0000000000000000E+036
dec1048.hsn.de.hpc.ucar.edu 109:  pa%gnd_alb_dir        =    1.0000000000000000E+036   1.0000000000000000E+036
dec1048.hsn.de.hpc.ucar.edu 109:  pa%c_stomata          =   0.20224004271799170     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%c_lblayer          =    973301.70559794537     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%disturbance_rates  =    0.0000000000000000        0.0000000000000000        0.0000000000000000        0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109:  pa%land_use_label     =            1
dec1048.hsn.de.hpc.ucar.edu 109:  ----------------------------------------
dec1048.hsn.de.hpc.ucar.edu 109:  element id:            1
dec1048.hsn.de.hpc.ucar.edu 109:  seed mass:    8.0927125825396490E-002
dec1048.hsn.de.hpc.ucar.edu 109:  seed germ mass:    8.3345008483262252E-005
dec1048.hsn.de.hpc.ucar.edu 109:  leaf fines(pft):   0.96928896671652287     
dec1048.hsn.de.hpc.ucar.edu 109:  root fines(pft,sl):   0.32240494404004033     
dec1048.hsn.de.hpc.ucar.edu 109:  ag_cwd(c):    0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109:  bg_cwd(c,sl):    0.0000000000000000     
dec1048.hsn.de.hpc.ucar.edu 109: 
dec1048.hsn.de.hpc.ucar.edu 109: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
dec1048.hsn.de.hpc.ucar.edu 109: 
dec1048.hsn.de.hpc.ucar.edu 109: Backtrace for this error:
dec1048.hsn.de.hpc.ucar.edu 109: #0  0x149fea376d4f in ???
dec1048.hsn.de.hpc.ucar.edu 109: 	at /usr/src/debug/glibc-2.31-150300.41.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
dec1048.hsn.de.hpc.ucar.edu 109: #1  0x992969 in __edcanopystructuremod_MOD_updatepatchlai
dec1048.hsn.de.hpc.ucar.edu 109: 	at /glade/u/home/rgknox/ctsm/src/fates/biogeochem/EDCanopyStructureMod.F90:2233
dec1048.hsn.de.hpc.ucar.edu 109: #2  0x992bf9 in leaf_area_profile
dec1048.hsn.de.hpc.ucar.edu 109: 	at /glade/u/home/rgknox/ctsm/src/fates/biogeochem/EDCanopyStructureMod.F90:1563
dec1048.hsn.de.hpc.ucar.edu 109: #3  0x99823e in __edcanopystructuremod_MOD_canopy_summarization

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