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

Vertically flip imports with dimensionless pressure proxy lev coordinates #37

Conversation

lizziel
Copy link

@lizziel lizziel commented Sep 19, 2024

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

@lizziel lizziel added the enhancement New feature or request label Sep 19, 2024
@lizziel lizziel self-assigned this Sep 19, 2024
@lizziel lizziel added this to the GCHP 14.5.0 milestone Sep 19, 2024
… flip

Some dimensionless vertical coordinates are proxies for pressure and should
therefore have the direction of their values used to determine if the
import should be vertically flipped.

Signed-off-by: Lizzie Lundgren <[email protected]>
Copy link

@yantosca yantosca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lizziel. These updates are good to merge!

@msulprizio msulprizio merged commit 9ad63ae into gchp/dev Oct 3, 2024
1 check failed
@msulprizio msulprizio deleted the feature/add_vertical_flip_handling_for_dimless_vert_coord branch October 3, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants