Skip to content

Something wrong with "file only includes natural PFTs" in fire_emis_factors_get() #4120

Description

@samsrabin

As of ctsm5.4.047, I think there's a problem here:

factors(:maxveg) = comp_factors_table( ndx )%eff(:maxveg)
! If fire emissions factor file only includes natural PFT's, but this is a crop case
! Copy the generic crop factors to the crop CFT's from generic crop
if ( size(factors) > nc3crop )then
factors(nc3crop+1:) = comp_factors_table( ndx )%eff(nc3crop)
end if

  1. This if() will evaluate to true even if the fire emissions factor file DOES include crop PFTs, since there is no condition in the if() checking for that. factors is of dimension maxveg; the condition should instead check the size of the eff array.
  2. Indeed, this code will error if the fire emissions factor file DOESN'T include crop PFTs, because of the reference to index nc3crop of the eff array.

Unless I'm misinterpreting something... @ekluzek, I think you implemented this. Am I off-base?

(Note: After #4112 comes in, this will be replaced with a call to handle_too_short_fire_emis_factor_file(), which you will be able to find in src/main/pftconMod.F90. If all this turns out to be the intended behavior, the description in that subroutine should be updated.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething is working incorrectlynextthis should get some attention in the next week or two. Normally each Thursday SE meeting.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions