Skip to content

Correct the error checking in subset_data #2414

@ekluzek

Description

@ekluzek

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)

Metadata

Metadata

Assignees

Labels

code healthimproving internal code structure to make easier to maintain (sustainability)enhancementnew capability or improved behavior of existing capability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions