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

Correct the error checking in subset_data #2414

Closed
ekluzek opened this issue Mar 9, 2024 · 0 comments · Fixed by #2155 or #2482
Closed

Correct the error checking in subset_data #2414

ekluzek opened this issue Mar 9, 2024 · 0 comments · Fixed by #2155 or #2482
Assignees
Labels
code health improving internal code structure to make easier to maintain (sustainability) enhancement new capability or improved behavior of existing capability

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Mar 9, 2024

Some error checking was turned off in subset_data in #2155. Rather than turning it off the error checking should be fixed so it works correctly and asks for the right thing.

For example here in #2155:

            # -- check dom_pft vs MAX_pft
            if self.num_pft - 1 < max_dom_pft < NUM_PFT:
                logger.info(
                    "WARNING, you trying to run with generic crops (16 PFT surface dataset)"
                )
                # raise argparse.ArgumentTypeError(err_msg)

And

                logger.info(
                    "WARNING, you are subsetting using mixed land units that have both natural pfts and crop cfts. Check that your surface dataset looks correct."
                )
                raise argparse.ArgumentTypeError(err_msg)
@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability code health improving internal code structure to make easier to maintain (sustainability) labels Mar 9, 2024
@slevis-lmwg slevis-lmwg self-assigned this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health improving internal code structure to make easier to maintain (sustainability) enhancement new capability or improved behavior of existing capability
Projects
None yet
2 participants