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

Add check for invalid/incorrect mapunit in mksoiltexMod #2756

Open
samsrabin opened this issue Sep 12, 2024 Discussed in #2746 · 0 comments
Open

Add check for invalid/incorrect mapunit in mksoiltexMod #2756

samsrabin opened this issue Sep 12, 2024 Discussed in #2746 · 0 comments
Labels
bfb bit-for-bit code health improving internal code structure to make easier to maintain (sustainability) test: mksurfdata Test mksurfdata_esmf before merging

Comments

@samsrabin
Copy link
Collaborator

samsrabin commented Sep 12, 2024

See below. In that discussion, @billsacks noted:

This seems like a very good idea, but I haven't done enough analysis of this myself to know whether there are cases where we might expect the result to be zero after mapping. If you determine, through code analysis and/or experimentation, that this kind of check works, then I'd support having it in place!


Discussed in #2746

Originally posted by samsrabin September 9, 2024
Huge thanks to @billsacks and @mvertens for solving the issue with bad mapunit determination in mksoiltexMod. It got me thinking—would it be helpful to add a check for bad mapping in there? It seems like mapunit can legitimately be zero over ocean, so maybe two checks:

  • Initialize to a negative number, then check after mapping that it's not negative
  • If it's zero after mapping, cross-reference with the land mask

Is that something we should consider?

@samsrabin samsrabin added code health improving internal code structure to make easier to maintain (sustainability) support tools only bfb bit-for-bit labels Sep 12, 2024
@samsrabin samsrabin added test: mksurfdata Test mksurfdata_esmf before merging and removed support tools only labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit code health improving internal code structure to make easier to maintain (sustainability) test: mksurfdata Test mksurfdata_esmf before merging
Projects
None yet
Development

No branches or pull requests

1 participant