@@ -115,7 +115,8 @@ def test_basic(self):
115115 cell methods to be discarded."""
116116 result = self .plugin ._update_metadata (self .cube )
117117 self .assertIsInstance (result , Cube )
118- self .assertEqual (result .name (), "probability_of_lightning" )
118+ self .assertEqual (
119+ result .name (), "probability_of_lightning_rate_above_threshold" )
119120 msg = ("Expected to find exactly 1 threshold coordinate, but found "
120121 "none." )
121122 with self .assertRaisesRegex (CoordinateNotFoundError , msg ):
@@ -427,21 +428,21 @@ def setUp(self):
427428 self.fg_cube:
428429 forecast_period (on time coord): 0.0 hours (simulates nowcast data)
429430 All points contain float(1.)
430- Cube name is "probability_of_lightning ".
431+ Cube name is "probability_of_lightning_rate_above_threshold ".
431432 self.precip_cube:
432433 With extra coordinate of length(3) "threshold" containing
433434 points [0.5, 7., 35.] mm hr-1.
434435 All points contain float(1.) except the
435436 zero point [0, 0, 1, 1] which is float(0.)
436437 and [1:, 0, ...] which are float(0.)
437- Cube name is "probability_of_precipitation ".
438+ Cube name is "probability_of_precipitation_rate_above_threshold ".
438439 Cube has added attribute {'relative_to_threshold': 'above'}
439440 """
440441 self .fg_cube = add_forecast_reference_time_and_forecast_period (
441442 set_up_cube_with_no_realizations (zero_point_indices = [],
442443 num_grid_points = 3 ),
443444 fp_point = 0.0 )
444- self .fg_cube .rename ("probability_of_lightning " )
445+ self .fg_cube .rename ("probability_of_lightning_rate_above_threshold " )
445446 self .precip_cube = (
446447 add_forecast_reference_time_and_forecast_period (
447448 set_up_cube (num_realization_points = 3 ,
@@ -451,7 +452,8 @@ def setUp(self):
451452 threshold_coord .points = [0.5 , 7.0 , 35.0 ]
452453 threshold_coord .rename ('threshold' )
453454 threshold_coord .units = cf_units .Unit ('mm hr-1' )
454- self .precip_cube .rename ("probability_of_precipitation" )
455+ self .precip_cube .rename (
456+ "probability_of_precipitation_rate_above_threshold" )
455457 self .precip_cube .attributes .update ({'relative_to_threshold' : 'above' })
456458 self .precip_cube .data [1 :, 0 , ...] = 0.
457459 self .plugin = Plugin ()
@@ -598,19 +600,20 @@ def setUp(self):
598600 Data:
599601 self.fg_cube:
600602 All points contain float(1.)
601- Cube name is "probability_of_lightning ".
603+ Cube name is "probability_of_lightning_rate_above_threshold ".
602604 self.ice_cube:
603605 With extra coordinate of length(3) "threshold" containing
604606 points [0.5, 1., 2.] kg m^-2.
605607 Time and forecast_period dimensions "sqeezed" to be Scalar coords.
606608 All points contain float(0.)
607- Cube name is "probability_of_vertical_integral_of_ice".
609+ Cube name is
610+ "probability_of_vertical_integral_of_ice_above_threshold".
608611 """
609612 self .fg_cube = add_forecast_reference_time_and_forecast_period (
610613 set_up_cube_with_no_realizations (zero_point_indices = [],
611614 num_grid_points = 3 ),
612615 fp_point = 0.0 )
613- self .fg_cube .rename ("probability_of_lightning " )
616+ self .fg_cube .rename ("probability_of_lightning_rate_above_threshold " )
614617 self .ice_cube = squeeze (
615618 add_forecast_reference_time_and_forecast_period (
616619 set_up_cube (num_realization_points = 3 ,
@@ -622,7 +625,8 @@ def setUp(self):
622625 threshold_coord .rename ('threshold' )
623626 threshold_coord .units = cf_units .Unit ('kg m^-2' )
624627 self .ice_cube .data = np .zeros_like (self .ice_cube .data )
625- self .ice_cube .rename ("probability_of_vertical_integral_of_ice" )
628+ self .ice_cube .rename (
629+ "probability_of_vertical_integral_of_ice_above_threshold" )
626630 self .plugin = Plugin ()
627631
628632 def test_basic (self ):
@@ -748,7 +752,7 @@ def setUp(self):
748752 Data:
749753 self.fg_cube:
750754 All points contain float(1.)
751- Cube name is "probability_of_lightning ".
755+ Cube name is "probability_of_lightning_rate_above_threshold ".
752756 self.ltng_cube:
753757 forecast_period (on time coord): 0.0 hours (simulates nowcast data)
754758 All points contain float(1.)
@@ -760,7 +764,7 @@ def setUp(self):
760764 All points contain float(1.) except the
761765 zero point [0, 0, 7, 7] which is float(0.)
762766 and [1:, 0, ...] which are float(0.)
763- Cube name is "probability_of_precipitation ".
767+ Cube name is "probability_of_precipitation_rate_above_threshold ".
764768 Cube has added attribute {'relative_to_threshold': 'above'}
765769 self.vii_cube:
766770 forecast_period (on time coord): 0.0 hours (simulates nowcast data)
@@ -769,11 +773,12 @@ def setUp(self):
769773 forecast_period (on time coord): 0.0 hours (simulates nowcast data)
770774 Time and forecast_period dimensions "sqeezed" to be Scalar coords.
771775 All points contain float(0.)
772- Cube name is "probability_of_vertical_integral_of_ice".
776+ Cube name is
777+ "probability_of_vertical_integral_of_ice_above_threshold".
773778 """
774779 self .fg_cube = add_forecast_reference_time_and_forecast_period (
775780 set_up_cube_with_no_realizations (zero_point_indices = []))
776- self .fg_cube .rename ("probability_of_lightning " )
781+ self .fg_cube .rename ("probability_of_lightning_rate_above_threshold " )
777782 self .ltng_cube = add_forecast_reference_time_and_forecast_period (
778783 set_up_cube_with_no_realizations (zero_point_indices = []),
779784 fp_point = 0.0 )
@@ -786,7 +791,8 @@ def setUp(self):
786791 threshold_coord .points = [0.5 , 7.0 , 35.0 ]
787792 threshold_coord .rename ('threshold' )
788793 threshold_coord .units = cf_units .Unit ('mm hr-1' )
789- self .precip_cube .rename ("probability_of_precipitation" )
794+ self .precip_cube .rename (
795+ "probability_of_precipitation_rate_above_threshold" )
790796 self .precip_cube .attributes .update ({'relative_to_threshold' : 'above' })
791797 self .precip_cube .data [1 :, 0 , ...] = 0.
792798 self .vii_cube = squeeze (
@@ -799,7 +805,8 @@ def setUp(self):
799805 threshold_coord .rename ('threshold' )
800806 threshold_coord .units = cf_units .Unit ('kg m^-2' )
801807 self .vii_cube .data = np .zeros_like (self .vii_cube .data )
802- self .vii_cube .rename ("probability_of_vertical_integral_of_ice" )
808+ self .vii_cube .rename (
809+ "probability_of_vertical_integral_of_ice_above_threshold" )
803810 self .plugin = Plugin ()
804811
805812 def set_up_vii_input_output (self ):
@@ -860,7 +867,8 @@ def test_basic(self):
860867 # We expect the threshold coordinate to have been removed.
861868 self .assertCountEqual (find_dimension_coordinate_mismatch (
862869 result , self .precip_cube ), ['threshold' ])
863- self .assertTrue (result .name () == 'probability_of_lightning' )
870+ self .assertTrue (
871+ result .name () == 'probability_of_lightning_rate_above_threshold' )
864872
865873 def test_basic_with_vii (self ):
866874 """Test that the method returns the expected cube type when vii is
@@ -874,13 +882,14 @@ def test_basic_with_vii(self):
874882 # We expect the threshold coordinate to have been removed.
875883 self .assertCountEqual (find_dimension_coordinate_mismatch (
876884 result , self .precip_cube ), ['threshold' ])
877- self .assertTrue (result .name () == 'probability_of_lightning' )
885+ self .assertTrue (
886+ result .name () == 'probability_of_lightning_rate_above_threshold' )
878887
879888 def test_no_first_guess_cube (self ):
880889 """Test that the method raises an error if the first_guess cube is
881890 omitted from the cubelist"""
882891 msg = (r"Got 0 cubes for constraint Constraint\(name=\'probability_of_"
883- r"lightning \'\), expecting 1." )
892+ r"lightning_rate_above_threshold \'\), expecting 1." )
884893 with self .assertRaisesRegex (ConstraintMismatchError , msg ):
885894 self .plugin .process (CubeList ([
886895 self .ltng_cube ,
@@ -900,7 +909,7 @@ def test_no_precip_cube(self):
900909 """Test that the method raises an error if the precip cube is
901910 omitted from the cubelist"""
902911 msg = (r"Got 0 cubes for constraint Constraint\(name=\'probability_of_"
903- r"precipitation \'\), expecting 1." )
912+ r"precipitation_rate_above_threshold \'\), expecting 1." )
904913 with self .assertRaisesRegex (ConstraintMismatchError , msg ):
905914 self .plugin .process (CubeList ([
906915 self .fg_cube ,
0 commit comments