Vertically flip imports with dimensionless pressure proxy lev coordinates #37
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 / GCST
Describe the update
This PR adds functionality in MAPL to identify input files with dimensionless vertical coordinates that are proxies for pressure and then vertically flip the data based on coordinate values. Previously only files with lev coordinate units equal to 'hpa' or 'pa' were categorized as containing pressure coordinates. Files with vertical coordinates such as hybrid sigma pressure were not categorized as pressure and the lev positive attribute was used instead to determine whether to flip. This resulted in incorrect flipping because pressure coordinate direction is opposite atmospheric level direction.
To make this fix this update adds unit 'sigma_level' to criteria for determining if lev coordinate is pressure. According to CF-conventions, there are other units possible for dimensionless vertical coordinates, such as 'level'. However, these units are not reliable at distinguishing pressure proxy coordinates from non-pressure coordinates. Therefore this update also adds the capability of extracting 'standard_name' attribute from import files and using it, if present, to further screen the vertical coordinate type.
NOTE: GEOS-Chem Classic outputs diagnostic files using a hybrid sigma pressure coordinate. This update is required to correctly read GEOS-Chem Classic output files into GCHP and GEOS.
Expected changes
This update correctly applies vertical flipping for cases of CF-convention dimensionless vertical coordinates in the atmosphere that are proxies for pressure.
References
https://cfconventions.org/Data/cf-conventions/cf-conventions-1.0/build/apd.html
Related Github Issue(s)
geoschem/GCHP#440