Masdar will invest EUR817m in the transaction, which values the portfolio at EUR1.7bn, making it one of Spain’s largest renewable energy deals