diff --git a/python/ctsm/site_and_regional/single_point_case.py b/python/ctsm/site_and_regional/single_point_case.py index 448f9d9229..fd7e20a4f2 100644 --- a/python/ctsm/site_and_regional/single_point_case.py +++ b/python/ctsm/site_and_regional/single_point_case.py @@ -175,7 +175,7 @@ def check_dom_pft(self): - 0 - NAT_PFT-1 range or - NAT_PFT - MAX_PFT range - - give a warning: mixed land units should be checked + - give an error: mixed land units not possible ------------- Raises: @@ -183,7 +183,7 @@ def check_dom_pft(self): If any dom_pft is bigger than MAX_PFT. Error (ArgumentTypeError): If any dom_pft is less than 1. - Warning: + Error (ArgumentTypeError): If mixed land units are chosen. dom_pft values are both in range of (0 - NAT_PFT-1) and (NAT_PFT - MAX_PFT). @@ -214,14 +214,12 @@ def check_dom_pft(self): logger.info( "WARNING, you trying to run with generic crops (16 PFT surface dataset)" ) - # raise argparse.ArgumentTypeError(err_msg) # -- check if all dom_pft are in the same range: if min_dom_pft < NAT_PFT <= max_dom_pft: err_msg = ( - "WARNING, you are subsetting using mixed land " - "units that have both natural pfts and crop cfts. Check " - "your surface dataset." + "You are subsetting using mixed land units that have both " + "natural pfts and crop cfts. Check your surface dataset. " ) raise argparse.ArgumentTypeError(err_msg) diff --git a/python/ctsm/test/test_unit_singlept_data.py b/python/ctsm/test/test_unit_singlept_data.py index 7d239c5243..644af82588 100755 --- a/python/ctsm/test/test_unit_singlept_data.py +++ b/python/ctsm/test/test_unit_singlept_data.py @@ -225,7 +225,7 @@ def test_check_dom_pft_mixed_range(self): single_point.dom_pft = [1, 5, 15] single_point.num_pft = 78 with self.assertRaisesRegex( - argparse.ArgumentTypeError, "WARNING, you are subsetting using mixed land*" + argparse.ArgumentTypeError, "You are subsetting using mixed land*" ): single_point.check_dom_pft()