@@ -106,29 +106,29 @@ def _check_sizes(self):
106106 size (exp_len = num_entries , var = self .member , var_name = "Forecast.member" )
107107 size (exp_len = num_entries , var = self .lead_time , var_name = "Forecast.lead_time" )
108108
109- def _reduce_attrs (self , reduce_method : str ):
109+ def _reduce_attrs (self , event_name : str ):
110110 """
111111 Reduce the attributes of a HazardForecast to a single value.
112112
113113 Attributes are modified as follows:
114114 - lead_time: set to NaT
115115 - member: set to -1
116116 - event_id: set to 0
117- - event_name: set to reduce_method
118- - date: set to the minimum value
117+ - event_name: set to the name of the reduction method (default)
118+ - date: set to 0
119119 - frequency: set to 1
120120
121121 Parameters
122122 ----------
123- reduce_method : str
124- The reduction method used to reduce the attributes .
123+ event_name : str
124+ The event_name given to the reduced data .
125125 """
126126 reduced_attrs = {
127127 "lead_time" : np .array ([np .timedelta64 ("NaT" )]),
128128 "member" : np .array ([- 1 ]),
129129 "event_id" : np .array ([0 ]),
130- "event_name" : np .array ([reduce_method ]),
131- "date" : np .array ([self . date . min () ]),
130+ "event_name" : np .array ([event_name ]),
131+ "date" : np .array ([0 ]),
132132 "frequency" : np .array ([1 ]),
133133 "orig" : np .array ([True ]),
134134 }
@@ -137,7 +137,7 @@ def _reduce_attrs(self, reduce_method: str):
137137
138138 def min (self ):
139139 """
140- Reduce the impact matrix and at_event of a HazardForecast to the minimum
140+ Reduce the intensity and fraction of a HazardForecast to the minimum
141141 value.
142142
143143 Parameters
@@ -171,7 +171,7 @@ def min(self):
171171
172172 def max (self ):
173173 """
174- Reduce the impact matrix and at_event of a HazardForecast to the maximum
174+ Reduce the intensity and fraction of a HazardForecast to the maximum
175175 value.
176176
177177 Parameters
@@ -205,10 +205,7 @@ def max(self):
205205
206206 def mean (self ):
207207 """
208- Reduce the impact matrix and at_event of a HazardForecast to the mean value.
209-
210- The mean value is computed by taking the mean of the impact matrix along the
211- exposure points axis (axis=1) and then taking the mean of the resulting array.
208+ Reduce the intensity and fraction of a HazardForecast to the mean value.
212209
213210 Parameters
214211 ----------
0 commit comments