forked from official-apps/SeismicHazardForecasting
		
	catch null result from ground motion forecasting
This commit is contained in:
		@@ -462,6 +462,11 @@ verbose: {verbose}")
 | 
			
		||||
        end = timer()
 | 
			
		||||
        logger.info(f"Ground motion exceedance computation time: {round(end - start, 1)} seconds")
 | 
			
		||||
 | 
			
		||||
        if np.isnan(iml_grid_raw).all():
 | 
			
		||||
            msg = "No valid ground motion intensity measures were forecasted. Try a different ground motion model."
 | 
			
		||||
            logger.error(msg)
 | 
			
		||||
            raise Exception(msg)
 | 
			
		||||
 | 
			
		||||
        # create list of one empty list for each imt
 | 
			
		||||
        iml_grid = [[] for _ in range(len(products))]  # final ground motion grids
 | 
			
		||||
        iml_grid_prep = iml_grid.copy()  # temp ground motion grids
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user