& gencost_avgperiod,
gencost_avgperiod(k) = ' '
if ( gencost_avgperiod(k) .NE. 'day ' .AND.
& gencost_avgperiod(k) .NE. 'DAY ' .AND.
& gencost_avgperiod(k) .NE. 'month' .AND.
& gencost_avgperiod(k) .NE. 'MONTH' .AND.
& gencost_avgperiod(k) .NE. 'step' .AND.
& gencost_avgperiod(k) .NE. 'STEP' .AND.
& gencost_avgperiod(k) .NE. 'const' .AND.
& gencost_avgperiod(k) .NE. 'CONST' .AND.
& gencost_avgperiod(k) .NE. 'year ' .AND.
& gencost_avgperiod(k) .NE. 'YEAR ' ) then
& (gencost_avgperiod(k).NE.' ') ) ) then
if ( gencost_avgperiod(k) .EQ. 'day' .OR.
& gencost_avgperiod(k) .EQ. 'DAY' ) then
else if ( gencost_avgperiod(k) .EQ. 'month' .OR.
& gencost_avgperiod(k) .EQ. 'MONTH' ) then
else if ( gencost_avgperiod(k) .EQ. 'year' .OR.
& gencost_avgperiod(k) .EQ. 'YEAR' ) then
else if ( gencost_avgperiod(k) .EQ. 'step' .OR.
& gencost_avgperiod(k) .EQ. 'STEP' ) then
else if ( gencost_avgperiod(k) .EQ. 'const' .OR.
& gencost_avgperiod(k) .EQ. 'CONST' ) then
character*(5) gencost_avgperiod(NGENCOST)