ESCOMP / ESCOMP/CTSM

Remove ability to use 16-PFT fire emission factor files (only support 78-pft files)

Open
#4,120 4 comments 0 reactions 1 assignee Claimed by @ekluzek View on GitHub
b4b bug
Dominant language
Fortran
Stars
352
Forks
361
Avg merge
2d 21h
Merged PRs (30d)
7

Description

As of ctsm5.4.047, I think there's a problem here:
https://github.com/ESCOMP/CTSM/blob/7409d3218513e1d95dbc2828de9a11a8972b1386/src/biogeochem/FireEmisFactorsMod.F90#L76-L81

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.)

Definition of done:
- [x] PR #4112 puts this function in pftconMod.F90
- [ ] Add some notes that this is something to remove referencing this issue
- [ ] Remove the function in pftconMod.F90 and the call in FireEmisFactorsMod.F90
- [ ] Remove the support for 16-pft factor files in fire_emis_factors_init

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.