Skip to content

bug fix: initialization of 1000-h fuel moisture content, computation of the net fuel load#1516

Merged
davegill merged 4 commits intowrf-model:release-v4.3.2from
tmgiannaros:master
Nov 29, 2021
Merged

bug fix: initialization of 1000-h fuel moisture content, computation of the net fuel load#1516
davegill merged 4 commits intowrf-model:release-v4.3.2from
tmgiannaros:master

Conversation

@tmgiannaros
Copy link
Contributor

@tmgiannaros tmgiannaros commented May 12, 2021

TYPE: bug fix

KEYWORDS: fuel moisture initialisation, net fuel load computation, WRF-Fire

SOURCE: Theodore M. Giannaros (National Observatory of Athens, Greece)

DESCRIPTION OF CHANGES:
Problem:
Incorrect indexing in the initialization of fuel moisture content in subroutine read_namelist_fire, in WRF file phys/module_fr_fire_phys.F.

Solution:
Changed fmc_gc_initial_value(3)=fmc_1000h to fmc_gc_initial_value(4)=fmc_1000h in subroutine read_namelist_fire, in WRF file phys/module_fr_fire_phys.F.

LIST OF MODIFIED FILES:
M phys/module_fr_fire_phys.F

TESTS CONDUCTED:

  1. The correction applied resolved the erroneous initialization of both 1000h and 100h fuel moisture content. Prior to
    this correction, fmc_gc_initial_value(3)=fmc_1000h and no initialization was carried out for fmc_gc_initial_value(4).
    This resulted to erroneously setting fmc_gc_initial_value(3)=fmc_1000h and fmc_gc_initial_value(4)=0 (was
    left uninitialized). Following the correction, both variables are correctly set (fmc_gc_initial_value(3)=fmc_100h and
    fmc_gc_initial_value(4)=fmc_1000h).
  2. Jenkins is all PASS.

RELEASE NOTE: Bug fix for fire module related to the initialization of fuel moisture content due to an incorrect indexing assignment from the namelist entries for fuel classes.

fmc_gc_initial_value(3)=fmc_1000h changed to fmc_gc_initial_value(4)=fmc_1000h
This bug resulted to null (0) 1000h FMC and erroneous 100h FMC initialisation.
@davegill davegill changed the base branch from master to release-v4.3.1 May 12, 2021 14:02
@davegill
Copy link
Contributor

jenkins

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 8d2c1ee7099463d4190c9f2ccfc60cb481d0efe8, requested by: tmgiannaros for PR: https://github.com/wrf-model/WRF/pull/1516. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           18
    Number of Builds       : 48           46
    Number of Simulations  : 163           161        0
    Number of Comparisons  : 103           102        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

@davegill
Copy link
Contributor

@tmgiannaros
Theodore,
First of all, thank you for actively participating in the WRF modeling system.

This is your first pull request (PR) for WRF. When the blank commit is started, there is a fixed format for the information from you. This allows us to search for keywords in the git log. Here is the format:

TYPE: choose one of [bug fix, enhancement, new feature, feature removed, no impact, text only]

KEYWORDS: 5 to 10 words related to commit, separated by commas

SOURCE: Either "developer's name (affiliation)" .XOR. "internal" for a WRF Dev committee member

DESCRIPTION OF CHANGES:
Problem:
Generally or specifically, what was wrong and needed to be addressed?

Solution:
What was down algorithmically and in the source code to address the problem?

ISSUE: For use when this PR closes an issue.
Fixes #123

LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list)

TESTS CONDUCTED:
1. Do mods fix problem? How can that be demonstrated, and was that test conducted?
2. Are the Jenkins tests all passing?

RELEASE NOTE: Include a stand-alone message suitable for the inclusion in the minor and annual releases. A publication citation is appropriate.

There is no issue that is being resolved, so you may remove that section. We would like for you to fill in something for the testing that you did. For example, you mention something about 0.3% change. A figure that shows before vs after would be great, as part of the commit message. For the RELEASE NOTE, this can be a slightly re-worded description. This part needs to be standalone, as these few sentences will be used in a bulleted list for the next release (in a few months).

Please go back through the commit message (you can do this directly from the github web page for this PR #1516 as the easy method) and edit it to conform to our format.

For your first PR, there will be more than usual communication back and forth, just so that you are prepared for your next PRs.

Again, we very much appreciate the time you have spent to relay this bug fix back to the community.

@davegill davegill changed the title Fixed a bug in the initialisation of 1000h fuel moisture content. bug fix: initialization of 1000-h fuel moisture content, computation of the net fuel load May 12, 2021
@tmgiannaros
Copy link
Contributor Author

@davegill

Dave,
I've just noticed that my second commit (about wn) is not a bug, but rather a change in the methods/equations. As this change is related to the theory behind the formulation of the fire spread model, I think it should be removed from the current pull request. Is it possible to remove the second commit? If yes, I will also update the original commit message, deleting the part about the false commit.

Best,
Theodore

@davegill
Copy link
Contributor

@tmgiannaros
Theodore,
We use the "squash and merge" option with github for the WRF model repository. Just put the source code back to the original version. From the local sandbox of your changes, edit the following line:

wn = fuelload/(1 + st(k))       ! net fuel loading, lb/ft^2
  1. git add phys/module_fr_fire_phys.F
  2. git commit -m "some single line description for you, that will be temporary"

For clarity:
3. git remote add theo https://github.com/tmgiannaros/WRF
4. git push -u theo master

Everything else should be automatic for the PR. Remember to edit the commit message with the github web interface.

@davegill
Copy link
Contributor

@tmgiannaros
Theodore,

  1. Would you be able to provide some "before versus after" figures to show the impact of your modifications?
  2. You mentioned that you wanted to revert one of your changes (the definition of wn). Algebraically, the values differ only by O(st(k)^2), so this is not that big of a change for small st(k).

davegill
davegill previously approved these changes Sep 27, 2021
@davegill
Copy link
Contributor

@tmgiannaros

  1. I reverted the "wn" calculation.
  2. After reviewing the proposed modifications, "before vs after" figures are not necessary.

@davegill davegill changed the base branch from release-v4.3.1 to release-v4.3.2 November 2, 2021 17:42
@davegill
Copy link
Contributor

davegill commented Nov 2, 2021

@pedro-jm @dudhia @weiwangncar
Pedro,
I think that this is a REALLY simple bug-fix. The fuel moisture content for the 100h class was overwritten by the data from the 1000h class, AND the 1000h fuel moisture content class was left uninitialized (essentially zero). This was due to an accident in the original coding where the namelist run-time data was input. Would you, or one of the WRF Fire team, please review this and let us know your opinion.

@davegill
Copy link
Contributor

davegill commented Nov 2, 2021

@tmgiannaros
Theodore,
You can see that I split the bug-fix from the computational mod. Would you please take the SMALL computational mod and generate another pull request. This time, use the "develop" branch for your starting point.

@tmgiannaros
Copy link
Contributor Author

@tmgiannaros
Theodore,
You can see that I split the bug-fix from the computational mod. Would you please take the SMALL computational mod and generate another pull request. This time, use the "develop" branch for your starting point.

Dave, the small computational mod does not necessarily mean an update to the code. If this part of the code is to be updated, then the entire set of equations in WRF Fire code need to be updated as well for consistency. I have not yet started doing so, but I plan to do so in the future.

Could you technically guide me on what you need me to do?

@davegill
Copy link
Contributor

@tmgiannaros
Theodore,
I have already turned this PR into the bug fix. You may use the release-v4.3.2 branch as a base and resubmit the wn modification (if you would like to do so). I am re-opening this PR, as it is valid and necessary.

@davegill davegill reopened this Nov 17, 2021
@pedro-jm
Copy link
Contributor

@davegill
I just saw your question. I agree this is a bug to fix and fixes the problem in the way you described (reproduced below).

@pedro-jm @dudhia @weiwangncar Pedro, I think that this is a REALLY simple bug-fix. The fuel moisture content for the 100h class was overwritten by the data from the 1000h class, AND the 1000h fuel moisture content class was left uninitialized (essentially zero). This was due to an accident in the original coding where the namelist run-time data was input. Would you, or one of the WRF Fire team, please review this and let us know your opinion.

@davegill
Copy link
Contributor

@pedro-jm
Pedro,
As a "WRF Fire" representative, would you approve this PR please? During the lockdown, without door-to-door conversations, we have bumped up the number of required approvals to two.

@pedro-jm
Copy link
Contributor

@davegill Yes, I approve this PR.
@tmgiannaros Thanks for fixing this Theodore.

@dudhia
Copy link
Collaborator

dudhia commented Nov 18, 2021 via email

@davegill davegill self-requested a review November 29, 2021 17:16
@davegill davegill merged commit ca220f4 into wrf-model:release-v4.3.2 Nov 29, 2021
Copy link
Collaborator

@smileMchen smileMchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks fie to me.

vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
…of the net fuel load (wrf-model#1516)

TYPE: bug fix

KEYWORDS: fuel moisture initialisation, net fuel load computation, WRF-Fire

SOURCE: Theodore M. Giannaros (National Observatory of Athens, Greece)

DESCRIPTION OF CHANGES:
Problem:
Incorrect indexing in the initialization of fuel moisture content in subroutine `read_namelist_fire`, in WRF file 
`phys/module_fr_fire_phys.F`. 

Solution:
Changed `fmc_gc_initial_value(3)=fmc_1000h` to `fmc_gc_initial_value(4)=fmc_1000h` in subroutine 
`read_namelist_fire`, in WRF file `phys/module_fr_fire_phys.F`. 

LIST OF MODIFIED FILES: 
M phys/module_fr_fire_phys.F

TESTS CONDUCTED:
1. The correction applied resolved the erroneous initialization of both 1000h and 100h fuel moisture content. Prior 
to this correction, `fmc_gc_initial_value(3)=fmc_1000h` and no initialization was carried out for 
fmc_gc_initial_value(4). This resulted to erroneously setting `fmc_gc_initial_value(3)=fmc_1000h` and 
`fmc_gc_initial_value(4)=0` (was left uninitialized). Following the correction, both variables are correctly set 
(`fmc_gc_initial_value(3)=fmc_100h` and `fmc_gc_initial_value(4)=fmc_1000h`). 
2. Jenkins is all PASS.

RELEASE NOTE: Bug fix for fire module related to the initialization of 1000-h fuel moisture content due to an incorrect indexing assignment from the namelist entries for fuel classes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants