Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge level arrays out-of-bounds in Lighting_mod #99

Open
atrayano opened this issue Jun 9, 2020 · 4 comments
Open

Edge level arrays out-of-bounds in Lighting_mod #99

atrayano opened this issue Jun 9, 2020 · 4 comments
Assignees

Comments

@atrayano
Copy link

atrayano commented Jun 9, 2020

@christophkeller In GEOS, the indexing convention for edge variables is 0:LM. Lightning_mod.F90 references these 3 variables: PLE, cnvMfc, geoPotHeight (passed in from Moist as ZLE) from 1:LM+1 - around lines 916-928 in Lightning_mod.F90
This issue was exposed by requesting MAPL to always allocate all exports, which essentially enabled calling get_hemcoFlashrate - equivalently we could have asked for LFR_GCC in History, and compiling GEOS with debug flags. The compiler flagged cnvMfc, but all 3 vars have the same issue

@mathomp4
Copy link
Member

@christophkeller @atrayano Has this been taken care of?

@atrayano
Copy link
Author

@mathomp4 not yet (thanks for reminding me)

@christophkeller
Copy link
Collaborator

I just updated the lightning module and made a PR for the fix: #159
I'm also tagging @megandamon as the original creator of the lightning wrapper.

sdrabenh added a commit that referenced this issue Mar 2, 2021
…ounds

Bug fix for issue #99: Edge level arrays out-of-bounds in Lighting_mod
@mmanyin
Copy link
Contributor

mmanyin commented Mar 25, 2021

@atrayano and @christophkeller - Actually the original code was not in error, since all 3 of those fields are deferred shape arrays, and as such, have starting index 1. The edge-array convention may have been violated, but the code was indexing correctly. (BTW, the Lightning module development was handed off from Megan to me, and I have updates (working in Icarus) that should be incorporated into GIT, when time allows.)

mathomp4 pushed a commit to mathomp4/GEOSchem_GridComp that referenced this issue Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants