5 import matplotlib.pyplot 
as plt
     6 import output_parser_globals 
as g
     7 from output_parser_lib 
import *
    26   if g.printAATablesFlag:
    39   g.forIFiles    = [ 
'results/forestData_'+i+
'.csv' for i 
in  g.scenarios]
    40   g.carbonIFiles = [ 
'results/carbonBalance_'+i+
'.csv' for i 
in  g.scenarios]
    44   g.years = [str(y) 
for y 
in range(2012,2051)]     
    45   g.printChartsFlag = 
True    46   g.printTablesFlag = 
True    47   g.printAATablesFlag = 
False    48   g.chartoutdir = 
'charts'    49   g.tableoutdir = 
'tables'    53   g.spGroups = [
'Fut_Feu', 
'Fut_Mix', 
'Fut_Con', 
'Mel_Feu', 
'Mel_Mix', 
'Tail_Feu',]
    55   g.countries = {
'FRA': [[
'AlsChaLor',
'AquPoi',
'AuvLim',
'BasHau',
'BouFra',
'BrePay',
'Cen',
'Cor',
'IleNorPic',
'LanPro',
'Mid',
'Rho'],
'France']}
    57   g.regions = {
'AlsChaLor': 
'Alsace ; Champagne Ardenne ; Lorraine',
    58                'AquPoi':    
'Aquitaine ; Poitou Charentes',
    59                'AuvLim':    
'Auvergne ; Limousin',
    60                'BasHau':    
'Basse Normandie ; Haute Normandie',
    61                'BouFra':    
'Bourgogne : Franche Comté',
    62                'BrePay':    
'Bretagne ; pays de la Loire',
    63                'Cen':       
'Centre Val de Loire',
    65                'IleNorPic': 
'Ile de France ; Nord Pas de Calais ; Picardie',
    66                'LanPro':    
'Languedoc Roussillon ; Provence Alpes Côtes d\'Azur',
    67                'Mid':       
'Midi Pyrénées',
    68                'Rho':       
'Rhône Alpes',} 
    73   g.pProd    = [
'hardWRoundW',
'softWRoundW',
'pulpWFuelW']
    74   g.tProd    = [
'fuelW',
'hardWSawnW',
'softWSawnW',
'plyW',
'pulpW',
'pannels']
    81   g.spAggregates = {
'00_Total': [[
'Fut_Feu', 
'Fut_Mix', 
'Fut_Con', 
'Mel_Feu', 
'Mel_Mix', 
'Tail_Feu',],
'-',4,
''],
    82                     '01_Broadleaved': [[
'Fut_Feu', 
'Mel_Feu',
'Tail_Feu'],
'--',3,
'broadL'],
    83                     '02_Coniferous': [[
'Fut_Con'],
':',3,
'con'],
    84                     '03_Mixed': [[
'Fut_Mix',
'Mel_Mix'],
'-.',3,
'mixedBC']
    90   print (
"Printing charts..")
    93   title(
'c',
'subsection', 
"Carbon charts")
    95   plotCarbonChart([
'default',
'debug'],
'FRA',
'',
'cbalance_ecoeffect_example')
   100   print (
"Printing tables..")
   110   outvars = [
'expReturns',
'harvestedArea',
'hV',
'regArea',
'vReg',
'forArea',
'vol']
   111   outvars_state = [
'forArea',
'vol']
   112   outvars_flow = [
'expReturns',
'harvestedArea',
'hV',
'regArea',
'vReg']
   113   printTable(
'debug',[
'default'],outvars,[
'FRA'],[
'2050'],
'[2050 vs 2012]',
'example',
False,2012)
   115   title(
't',
'subsection',
"Carbon tables")
   117   printCarbonTable(
'debug',[
'default'],
'FRA', 
'2012', 
'2050', 
"\\ce{CO2} balance [yearly avg. 2012-2050]",
'cbalance_11000', 
True, 
False)
   121   print (
"Printing area allocation tables..")
 def printTable(ref_scenario, comparing_scenarios, variables_h, regions_h, years_h, title, filename, singleComparation=False, refYear=0)
 
def printCarbonTable(ref_scenario, comparing_scenarios, region, year_start, year_end, title, filename, avg=False, singleComparation=True)
 
def title(cat, level, title)
 
def plotCarbonChart(scenarios_h, region, title, filename)