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

Bug/Feature in vertical regrid PR was causing model to crash #3442

Open
bena-nasa opened this issue Feb 20, 2025 · 1 comment
Open

Bug/Feature in vertical regrid PR was causing model to crash #3442

bena-nasa opened this issue Feb 20, 2025 · 1 comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bugfix This fixes a bug! 🎁 New Feature This is a new feature

Comments

@bena-nasa
Copy link
Collaborator

bena-nasa commented Feb 20, 2025

The last PR I made to bring in vertical regridding beta version to ExtData had a bug (well or feature, depending on how one looks at it).

Just making an issue for the PR to fix this.

I had a protection that said, if any items could be vertically regridded, make sure PLE was imported. Well of course my experiment I had added the appropriate lines in the CAP.rc so when Matt ran this it crashed.

The reason if found files that it thought could be vertically regridded is that it identified some of the existing 72 level files as fixed pressure level files (which they are not, but that's another story...) and the heuristic was if the item has a vertical coordinate that is not "NONE" or "SIMPLE" (simple just means it identified as a level but not cf compliant).

So the routine that was checking this saw that some items could be vertically regridded by the rule, but did not have PLE.

Now, the fact of the matter is these files are supposed to be hybrid sigma levels files, not fixed pressures, but are not CF compliant for hybrid sigma levels.

So I ended up adding something that @mmanyin said we needed but I forgot to add, which was a switch (default true), to disable vertical regridding. That way our existent files will not be identified as capable of being vertically regridded.

Once datasets are added in the proper format, those items that need this can relax this.

@bena-nasa bena-nasa added 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bugfix This fixes a bug! 🎁 New Feature This is a new feature labels Feb 20, 2025
bena-nasa added a commit that referenced this issue Feb 20, 2025
@tclune
Copy link
Collaborator

tclune commented Feb 21, 2025

If is not too late, it is usually better to make defaults .false. for clarity purpose. Depends on the name of the switch - but usually a "negated" version of the name is still sensible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bugfix This fixes a bug! 🎁 New Feature This is a new feature
Projects
None yet
Development

No branches or pull requests

2 participants