Fix bug setting destination grid object sigma vector passed to MESSy #314
+5
−1
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
While investigating differences in CESM output when using HEMCO with different core counts I discovered a bug in vertical regridding using MESSy. The MESSy regridding scheme is used by models that input 3D atmospheric data on a different vertical grid than model grid, e.g. CESM and WRF-GC but not GEOS-Chem Classic or GCHP.
The collapse of the HEMCO grid 3D pressure sigma array into a 1D vector passed to the MESSy regridding scheme is at odds with how it is used within MESSy. Swapping two dimensions of the collapse (lat and lon) fixes the bug. This bug is not part of MESSy (written in 2002) but the interface to MESSy within HEMCO (written in 2014). It has been present since MESSy was originally implemented into HEMCO.
The bug causes the wrong horizontal layout of sigma pressure profiles during vertical regridding. In MPI models, the profiles within a given core are correct but are distributed across the regional grid of that core incorrectly.
Expected changes
This update only affects models which use HEMCO to vertically regrid input data that are not on the model vertical grid, i.e. CESM and WRF-GC. The extent of the impact is dependent on the model decomposition and how many CPUs are used.
To assess the impact I ran a 3-hr CESM run using HEMCO with CAM-chem. All emissions were turned off except for AEIC CO emissions, which were computed and output as a diagnostic every timestep. The following results show the impact of the bug at hour 3 of the run (instantaneous output). All plots show a single level where CO emissions from aviation tracks are visible.
Before and after the fix at 72 cores:

Before and after the fix at 144 cores:

72 cores vs 144 cores with the bug present shows the core-dependency:

72 cores vs 144 cores with bug fix applied shows that the core-dependency is no longer there:

Reference(s)
None
Related Github Issue
closes #315
ESCOMP/CAM#856