& gencost_spmin(k), gencost_spmax(k),
spmaxloc=gencost_spmax(igen_conc)
& gencost_spmin, gencost_spmax, gencost_spzero
_RL gencost_spmax(NGENCOST)
& gencost_spmax,
gencost_spmax(k) = 0. _d 0
& gencost_spmax(k) .EQ. 0. _d 0 ) then