Prevent 0 index in GOCART settling array#1113
Merged
davegill merged 2 commits intowrf-model:release-v4.2from Mar 25, 2020
Merged
Prevent 0 index in GOCART settling array#1113davegill merged 2 commits intowrf-model:release-v4.2from
davegill merged 2 commits intowrf-model:release-v4.2from
Conversation
TYPE: bug fix KEYWORDS: GOCART, settling SOURCE: Stacy Walters (internal) DESCRIPTION OF CHANGES: Put calculation of aerosol settling (variable = transfer_to_below_level) in layers > 1 into IF/ELSE block that calculates gravitational settling for layer = 1. LIST OF MODIFIED FILES: M chem/module_gocart_settling.F TEST CONDUCTED:
Contributor
|
@jordanschnell |
Contributor
|
@jordanschnell |
Contributor
|
@jordanschnell
|
Contributor
Author
|
@kayeekayee @ravanah Hey all, can one of you review this for the 4.2 release today? Thanks! |
Contributor
|
Approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TYPE: bug fix
KEYWORDS: GOCART, settling
SOURCE: Stacy Walters (internal)
DESCRIPTION OF CHANGES:
Put calculation of aerosol settling (variable = transfer_to_below_level) in layers > 1
into IF/ELSE block that calculates gravitational settling for layer = 1.
LIST OF MODIFIED FILES:
M chem/module_gocart_settling.F
TEST CONDUCTED:
Jenkins shows all tests PASS
Compiled with debug option -check bounds
BEFORE FIX: 2 indexes are OOB for l==1, 3rd dim of delz (> MAX) and 3rd dim of airden (0)
rsl.out.0000
l/=1, calculting transfer_to_below_level = 3.153560196907218E-014
l/=1, calculting transfer_to_below_level = 1.014890436929303E-012
l/=1, calculting transfer_to_below_level = 2.118741307102124E-011
l==1, still calculating transfer_to_below_level =
= (temp_tcvd_wk1)((delz(i,j,l2)*airden(i,j,l))/(delz(i,j,l2+1)*airden(i,j,l-1)))
l==1, index of airden(i,j,l-1) = 1 1 0
and index of delz(i,j,l2+1) = 1 1 31
but size of 3rd dim of delz = 30
rsl.error.0000
forrtl: severe (408): fort: (2): Subscript #3 of the array DELZ has value 31 which is greater than the upper bound of 30
AFTER FIX:
l/=1, calculating transfer_to_below_level = 3.153560196907218E-014
l/=1, calculating transfer_to_below_level = 1.014890436929303E-012
l/=1, calculating transfer_to_below_level = 2.118741307102124E-011
l==1, not calculating transfer_to_below_level