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.
Contact:
[Sergey Napelenok], U.S. Environmental Protection Agency
Type of code change:
Bug fix
Description of changes:
This fixes several recently identified ISAM issues including:
ISAM is crashing when compiled in debug mode and PM_TOT tagclass is activated. Some logic was added to SA_WRAP_AE to limit calculations when JAEM array contains zero indexes.
AORGCJ is not calculated correctly. AORGCJ is tracked when 'ALL' tagclass is invoked, however, no calculations for this species were added to aqchem. Similarly MGLY is missing from ISAM gas species, but it is a precursor to AORGCJ.
ISAM crashes in debug mode with the 'TAG CLASSES |ALL' configuration.
Ground level PROD/LOSS calculation is incorrect in layer 1.
Summary of Impact:
Should have no impact on CMAQ concentrations. ISAM output now performs calculations as directed when in PM_TOT tagclass mode and more correctly calculates attribution of AORGCJ and both standard and debug compilations. The necessary addition of MGLY to the ISAM species lists may slightly impact ozone chemistry apportionment in some ISAM applications.
Tests conducted:
This PR passes the following build and run checks:
Compilers: Intel, GNU, Portland Group
Compile Mode: Optimized, Debug
Model Scenario: 2016 Southeast U.S. Benchmark
Tests conducted have been on the 2018 benchmark domain and fortran compiler in debug mode. More extensive evaluation was performed for hemispheric EQUATES ISAM application comparing based release version and this update.
Here is a spatial comparison of differences in tags for ATOTIJ and AORGCJ for the new and old code. This shows that the updated code does not always produce higher tag contributions (except for AORGCJ), indicating that the changes to the vdiff code can impact a number of different tags and species. For example, many tags show decreases rather than increases west of India for ATOTIJ, despite the addition of non-zero AORGCJ (note: V54P in the plot labels below is equivalent to BASE):
Finally, this set of plots compares the sum of tags from the two runs not only to each other, but also to the bulk concentrations from the ACONC files from the corresponding runs