Use JVN_ as max not exact number of J-values #26
Merged
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.
Name and Institution (Required)
Name: Lizzie Lundgren
Institution: Harvard University
Describe the update
This PR updates how global variable
JVN_
is used. It is described in the code as maximum number of J-values but was used instead as the exact number of J-values by setting the maximum index ofFJX_j2j.dat
entries read. This set up the possibility of a silent bug ifFJX_j2j.dat
was expanded butJVN_
remained the same.This update introduces new behavior where
JVN_
is set to a high number beyond the number of entries inFJX_j2j.dat
. File read ofFJX_j2j.dat
stops when9999
is encountered at the start of a line. PreviouslyFJX_j2j.dat
files ended in9999
so inclusion of that in the file is not new.Besides preventing the silent bug described above this update is beneficial by enabling removal of model-dependent C-preprocessor blocks where
JVN_
values were set. Those values would need to be updated every time new photolysis reactions were added to external models. A drawback of this update, however, is that several arrays are allocated more memory than they need. However, the arrays are 1D and relatively small so this should not make a significant impact.Expected changes
This is a zero diff update.
Reference(s)
None
Related Github Issues and PRs
None