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

Improper vertical flipping of input files with dimensionless vertical pressure grid #3041

Open
lizziel opened this issue Sep 19, 2024 · 6 comments
Assignees
Labels
📈 MAPL3 MAPL 3 Related ⌛ Long Term Long term issues

Comments

@lizziel
Copy link
Contributor

lizziel commented Sep 19, 2024

I encountered a silent bug in GCHP where GEOS-Chem Classic output files read into MAPL do not have the proper vertical orientation in the imports. I traced the problem to reliance on the positive attribute in the file rather than the lev coordinate values. The GEOS-Chem Classic output files use a dimensionless hybrid sigma pressure coordinate which is similar to a pressure grid in that coordinate values decrease in the up direction. These files should be handled as containing pressure coordinates in ExtData for proper vertical flipping.

ExtData currently has handling for pressure coordinates with the criteria that lev units are 'hpa' or 'pa'. However, it does not detect if the coordinates are pressure with a different unit or if the coordinates are a dimensionless pressure proxy.

To fix this I added functionality to the old version of MAPL in GCHP to (1) extend the lev unit criteria for pressure to include 'sigma_level', and (2) also check the lev standard_name attribute to determine if it equal to one of the dimensionless pressure proxy grids defined in CF.

Is this something that you want to bring into MAPL? My PR is at geoschem#37. Because this is off an old version of MAPL I had to add retrieval of standard_name to metadata utilities. I see in latest develop that is now an available feature. That limits the update to just ExtData and ExtData2G (nearly identical updates in both). I can create a PR on develop if you would like me to submit this.

@bena-nasa
Copy link
Collaborator

Hi @lizziel I will take a look. Note that I am actively working on getting vertical regridding into ExtData2G. So I am going to have to be must more strict (following the CF conventions) about the file metadata to support this. We could take this into the old ExtData, but I would say no point for now in the new since I'll be redoing a lot of this, hopefully so this sort of issue will be addressed.

@bena-nasa bena-nasa self-assigned this Sep 19, 2024
@lizziel
Copy link
Contributor Author

lizziel commented Sep 19, 2024

Thanks @bena-nasa. The grid we are using is one of the CF grids listed at https://cfconventions.org/Data/cf-conventions/cf-conventions-1.0/build/apd.html. According to the CF conventions, units for the dimensionless vertical coordinates can simply be 'level' which would be inadequate for determining whether to flip, hence I branched out to standard_name. Those units will also be deprecated but will hang around in old files.

When updating ExtData2G could you make sure these sorts of things are taken into account? I'm happy to discuss specific instances of the metadata.

Copy link

This issue has been automatically marked as stale because it has not had activity in the last 60 days. If there are no updates within 7 days, it will be closed. You can add the ":hourglass: Long Term" label to prevent the stale action from closing this issue.

@github-actions github-actions bot added the ❄️ Stale This issue has been marked stale label Nov 19, 2024
@mathomp4
Copy link
Member

@bena-nasa Has this been fixed?

@lizziel
Copy link
Contributor Author

lizziel commented Nov 19, 2024

We only need this to be put into ExtData used in MAPL3 since I merged my fix for MAPL2 to the fork used in GCHP. See earlier comment for the PR link if you want to look at it.

@mathomp4 mathomp4 added ⌛ Long Term Long term issues 📈 MAPL3 MAPL 3 Related and removed ❄️ Stale This issue has been marked stale labels Nov 19, 2024
@mathomp4
Copy link
Member

We only need this to be put into ExtData used in MAPL3 since I merged my fix for MAPL2 to the fork used in GCHP. See earlier comment for the PR link if you want to look at it.

@lizziel Thanks. I've added a MAPL3 and long term label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 MAPL3 MAPL 3 Related ⌛ Long Term Long term issues
Projects
None yet
Development

No branches or pull requests

3 participants