diff --git a/pysteps/nowcasts/steps.py b/pysteps/nowcasts/steps.py index dd0ff1c3..1e7c8d87 100644 --- a/pysteps/nowcasts/steps.py +++ b/pysteps/nowcasts/steps.py @@ -144,13 +144,13 @@ def _nowcast_main(self): Main nowcast loop that iterates through the ensemble members and time steps to generate forecasts. """ - # Prepare state and params dictionaries - state = self._initialize_state() - params = self._initialize_params() - # Isolate the last time slice of precipitation precip = self.precip[-1, :, :] # Extract the last available precipitation field + # Prepare state and params dictionaries + state = self._initialize_state() + params = self._initialize_params(precip) + print("Starting nowcast computation.") # Run the nowcast main loop @@ -662,7 +662,7 @@ def _initialize_state(self): "randgen_prec": self.randgen_prec, } - def _initialize_params(self): + def _initialize_params(self, precip): """ Initialize the params dictionary used during the nowcast iteration. """ @@ -684,7 +684,7 @@ def _initialize_params(self): "phi": self.phi, "pert_gen": self.pert_gen, "probmatching_method": self.probmatching_method, - "precip": self.precip, + "precip": precip, "precip_thr": self.precip_thr, "recomp_method": self.recomp_method, "struct": self.struct,