https://github.com/usgs/shakecast-aebm/blob/06a7ece25cef414a01ce6fc903da2d901ac3979b/shakecastaebm/capacity.py#L527