In [1]:
import utils as ut
from pint import UnitRegistry
import pandas as pd
import seaborn as sns
from tabulate import tabulate
from numpy import average as avg
import numpy as np
from matplotlib import pyplot as plt
from functools import partial

In [2]:
%load_ext autoreload
%autoreload 2
%matplotlib inline

In [3]:
sqdb = ut.sqlitedb('fcat_biomass')

In [4]:
wood_dens = ut.gData('138FWlGeW57MKdcz2UkWxtWV4o50SZO8sduB1R6JOFp8', 1297253755)

In [5]:
sathre4 = ut.gData('13UQtRfNBSJ81PXxbYSnB2LrjHePNcvhJhrsxRBjHpoY',546564075, hrow =3)
sathre4.to_sql('so4',sqdb['cx'], if_exists = 'replace')

Wood products DF with and without logging slash utilization

Using studies from Sathre and O'Connor in the US.


In [8]:
HWu = pd.read_sql('''SELECT *
                        FROM so4
                        WHERE harvestslash = "X"
                        AND processingresidues = "X" 
                        AND "post-usewoodproduct" = "X"
                        AND stumps is null''', sqdb['cx'],index_col = 'index')
HWo = pd.read_sql('''SELECT *
                        FROM so4
                        WHERE harvestslash is null
                        AND processingresidues = "X" 
                        AND stumps is null
                        AND "post-usewoodproduct" = "X"''', sqdb['cx'], index_col = 'index')

In [9]:
#HWo
print tabulate(HWo[['reference','df']], headers = ['index','reference','displacement factor'],tablefmt="pipe")


|   index | reference               |   displacement factor |
|--------:|:------------------------|----------------------:|
|       0 | Eriksson et al. (2007)  |                   1.7 |
|       3 | Eriksson et al. (2007)  |                   2.2 |
|      24 | Salazar and Meil (2009) |                   4.9 |
|      34 | Werner et al. (2005)    |                   1.7 |

In [10]:
#HWu
print tabulate(HWu[['reference','df']], headers = ['index','reference','displacement factor'],tablefmt="pipe")


|   index | reference                 |   displacement factor |
|--------:|:--------------------------|----------------------:|
|       1 | Eriksson et al. (2007)    |                   1.9 |
|       4 | Eriksson et al. (2007)    |                   2.5 |
|       6 | Gustavsson et al. (2006)  |                   4   |
|       7 | Gustavsson et al. (2006)  |                   5.6 |
|       8 | Gustavsson et al. (2006)  |                   2.2 |
|       9 | Gustavsson et al. (2006)  |                   3.3 |
|      22 | Pingoud and Perala (2000) |                   3.2 |

In [11]:
constants = {'me' : {'value':0.5,
                     'desc': 'Mill Efficiency'},
             'DFu' : {'value': np.average(HWu.df),
                      'desc': 'Displacement factor with logging residual utilization',
                      'source': '''\cite{Sathre2010}'''},
             'DFo' : {'value': np.average(HWo.df),
                      'desc': 'Displacement factor without logging residual utilization'},
             'wDens' : {'value': sum(wood_dens.pct/100 * wood_dens.density_lbscuft),
                        'units' : 'lbs/cuft',
                        'desc': 'average harvested wood density weighted by species harvested',
                        'source': '\cite{Mciver2012}'}
             }

In [32]:
constants['wDens']['value']


Out[32]:
27.940920999860715

Timber Products Output

The TPO estimates logging redisues produced from commercial timber harvesting operations. The follwoing is in million cubic feet (MCF)


In [18]:
tpoData = ut.gData('1GDdquzrCoq2cxVN2fbCpP4gwi2yrMnONNrWbfhZKZu4', 872275354, hrow=1)
tpoData.to_sql('tpo', sqdb['cx'], if_exists = 'replace')
print tabulate(tpoData, headers = ['Ownership','Roundwood Products','Logging Residues', 'Year'],tablefmt="pipe")


|    | Ownership       |   Roundwood Products |   Logging Residues |   Year |
|---:|:----------------|---------------------:|-------------------:|-------:|
|  0 | National Forest |                 72.4 |               20.7 |   2012 |
|  1 | Other Public    |                 16.2 |                3.4 |   2012 |
|  2 | Forest Industry |                328.9 |               72.4 |   2012 |
|  3 | Other Private   |                 53   |               11.2 |   2012 |
|  4 | National Forest |                 52.8 |               16.3 |   2006 |
|  5 | Other Public    |                  1.1 |                0.3 |   2006 |
|  6 | Forest Industry |                274.3 |               59.6 |   2006 |
|  7 | Other Private   |                139.2 |               33.2 |   2006 |
|  8 | National Forest |                 90.8 |               22.6 |   2000 |
|  9 | Other Public    |                  5.2 |                1.6 |   2000 |
| 10 | Forest Industry |                372.5 |               70.6 |   2000 |
| 11 | Other Private   |                159.4 |               49.1 |   2000 |
| 12 | National Forest |                132.1 |               11.2 |   1994 |
| 13 | Other Public    |                 24.7 |                4.3 |   1994 |
| 14 | Forest Industry |                396.1 |               63.1 |   1994 |
| 15 | Other Private   |                174.7 |               22.3 |   1994 |

Board of Equalization Data

The board of equalization


In [34]:
pd.read_csv('boe_hh.csv').to_sql('boe',sqdb['cx'], if_exists = 'replace')

In [35]:
pd.read_sql('select * from boe', sqdb['cx'])


Out[35]:
index year total_mmbf gvt_mmbf gvt_pct pvt_mmbf
0 0 1978 4491 1725 0.3840 2766
1 1 1979 3991 1723 0.4320 2268
2 2 1980 3164 1228 0.3880 1936
3 3 1981 2672 950 0.3560 1722
4 4 1982 2318 818 0.3530 1500
5 5 1983 3358 1468 0.4370 1890
6 6 1984 3546 1446 0.4080 2100
7 7 1985 3818 1613 0.4220 2205
8 8 1986 4265 1869 0.4380 2396
9 9 1987 4500 1860 0.4130 2640
10 10 1988 4670 2048 0.4390 2622
11 11 1989 4424 1791 0.4050 2633
12 12 1990 4021 1326 0.3300 2695
13 13 1991 3195 1142 0.3570 2053
14 14 1992 2973 841 0.2830 2132
15 15 1993 2871 608 0.2120 2263
16 16 1994 2316 344 0.1490 1972
17 17 1995 2306 375 0.1630 1931
18 18 1996 2273 288 0.1270 1985
19 19 1997 2400 357 0.1490 2043
20 20 1998 2091 254 0.1210 1837
21 21 1999 2144 241 0.1120 1903
22 22 2000 1966 265 0.1350 1701
23 23 2001 1603 128 0.0798 1475
24 24 2002 1690 169 0.1000 1521
25 25 2003 1663 155 0.0920 1508
26 26 2004 1706 113 0.0660 1593
27 27 2005 1725 230 0.1330 1495
28 28 2006 1631 200 0.1230 1431
29 29 2007 1626 187 0.1150 1439
30 30 2008 1372 99 0.0720 1273
31 31 2009 805 60 0.0740 745
32 32 2010 1161 136 0.1170 1025
33 33 2011 1288 158 0.1220 1130
34 34 2012 1307 150 0.1140 1157
35 35 2013 1645 223 0.1360 1422
36 36 2014 1466 235 0.1600 1231

McIver and Morgan annual in cubic

Figure 2 from morgan and mciver presents total roundwood harvest from 1947 through 2012 in MMBF. To convert MMBF to MCF we use a sawlog conversion of 5.44. This is an approximation as the actual sawlog conversion varies with the log size on average over time has changed.


In [19]:
mm_histHarvest = ut.gData('13UQtRfNBSJ81PXxbYSnB2LrjHePNcvhJhrsxRBjHpoY', 2081880100).fillna(value=0)

In [20]:
mm_histHarvest.to_sql('mm_hist', sqdb['cx'], if_exists = 'replace')

In [21]:
mm_histHarvest


Out[21]:
year private state tribal blm nat_forest
0 1947 3100 0.0 0.00 0.0000 0
1 1948 4000 0.0 0.00 0.0000 0
2 1949 3800 0.0 0.00 0.0000 0
3 1950 4400 0.0 0.00 0.0000 0
4 1951 4900 0.0 0.00 0.0000 0
5 1952 4400 14.0 26.00 6.0000 613
6 1953 5320 18.0 15.00 7.0000 633
7 1954 4790 16.0 25.00 13.0000 757
8 1955 4930 14.0 33.00 13.0000 1030
9 1956 4690 24.0 29.00 26.0000 1100
10 1957 4360 27.0 36.00 10.0000 918
11 1958 4470 30.0 38.00 23.0000 1110
12 1959 4290 27.0 50.00 41.0000 1480
13 1960 3700 28.0 48.00 32.0000 1330
14 1961 3850 29.0 55.00 33.0000 1380
15 1962 4050 34.0 47.00 29.0000 1380
16 1963 3690 22.0 54.00 36.0000 1660
17 1964 3500 25.0 49.00 34.0000 1860
18 1965 3220 31.0 53.00 55.0000 1920
19 1966 2970 32.0 45.00 33.0000 1930
20 1967 3060 35.0 41.00 34.0000 1900
21 1968 2950 48.0 79.00 36.0000 2360
22 1969 2880 40.0 54.00 27.0000 2000
23 1970 2620 34.0 28.00 39.0000 1840
24 1971 2590 39.0 70.00 24.0000 2060
25 1972 3220 37.0 66.00 19.0000 2220
26 1973 2810 33.0 51.00 12.0000 2010
27 1974 2860 40.0 51.00 16.0000 1740
28 1975 2710 35.0 18.00 46.0000 1520
29 1976 2760 40.0 38.00 6.0000 1890
... ... ... ... ... ... ...
36 1983 1890 43.0 14.00 25.0000 1680
37 1984 2100 34.0 21.00 7.0000 1560
38 1985 2210 36.0 5.00 17.0000 1830
39 1986 2400 29.0 27.00 27.0000 1960
40 1987 2640 42.0 41.00 15.0000 1970
41 1988 2620 31.0 14.00 16.0000 2180
42 1989 2630 37.0 11.00 12.0000 2020
43 1990 2700 24.0 14.00 10.0000 1530
44 1991 2050 38.0 24.00 11.0000 1340
45 1992 2130 23.0 32.00 9.0000 1030
46 1993 2260 34.0 13.00 8.0000 739
47 1994 1970 17.0 15.00 19.0000 808
48 1995 1930 40.0 16.00 6.0000 544
49 1996 1990 55.0 13.00 12.0000 458
50 1997 2040 47.0 15.00 5.0000 548
51 1998 1940 26.0 16.00 1.0000 453
52 1999 1900 0.0 0.00 0.0000 529
53 2000 1880 19.0 10.00 8.0000 337
54 2001 1480 16.0 10.00 8.0000 297
55 2002 1520 1.0 13.60 1.7300 169
56 2003 1510 1.0 17.90 1.9500 155
57 2004 1590 1.0 16.60 0.0305 113
58 2005 1500 1.0 10.60 7.5000 230
59 2006 1730 4.0 12.90 1.3500 225
60 2007 1440 1.0 19.30 10.6000 308
61 2008 1270 1.0 13.50 0.0745 205
62 2009 745 1.0 3.91 2.1900 163
63 2010 1030 1.0 9.76 6.3800 265
64 2011 1130 1.0 11.40 1.5000 300
65 2012 1190 27.9 8.10 0.4000 203

66 rows × 6 columns

Bioenergy consumption

To apply the apropriate DF for harvested wood we need to know what fraction of the logging residues were utilized as bioenergy feedstock. McIver and Morgan (Table 6) reports bioenergy consumption from 2000 forward. For years previous, we use the average bioenergy consumption from 2000 -- 2012.


In [12]:
bioEnergy = ut.gData('138FWlGeW57MKdcz2UkWxtWV4o50SZO8sduB1R6JOFp8', 529610043)
bioEnergy.set_index('producttype').transpose().to_sql('mciver_bio', sqdb['cx'], if_exists = 'replace')
bio_pct = pd.read_sql('select "index" as year,"Bioenergy"/100 as biopct from mciver_bio where "Bioenergy" is not null', sqdb['cx'])
bio_dict = bio_pct.set_index('year').to_dict('index')
print tabulate(bio_pct, headers = ['year', 'bioenergy % of harvest'],tablefmt="pipe")


|    |   year |   bioenergy % of harvest |
|---:|-------:|-------------------------:|
|  0 |   2000 |                    0.024 |
|  1 |   2006 |                    0.036 |
|  2 |   2012 |                    0.082 |
/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:2: UserWarning: The spaces in these column names will not be changed. In pandas versions < 0.14, spaces were converted to underscores.
  from ipykernel import kernelapp as app

In [13]:
def bioPct(year):
#    if year < 1980:
#        return 0
    if year in bio_dict.keys():
        return bio_dict[year]['biopct']
    else:
        return np.average(bio_pct.biopct)

Logging residuals

The BOE data does not specifically estimate logging residuals, it simply reports harvested roundwood. To accurately ascribe fate to roundwood harvested, an estimation of logging residuals must be made

Calculating emissions reductions

The following functions calculate the displaced emissions resulting from wood harvested with and without logging residue utilization. They return estimates in metric tons of CO2 equivalents.


In [22]:
def WPu (rw_harvest, lr, year, mill_efficiency = constants['me']['value'], wdens = constants['wDens']['value'], df = constants['DFu']['value']):
    '''
    Calculates the emissions reduction resulting from harvested wood with with utilization of loggin residuals for bioenergy
    '''
    # establish the aproporiate bioenergy consumption, if no data on bioenergy consumption exists, use average from 2000-2012
    if year in bio_dict.keys():
        bioe_pct = bio_dict[year]['biopct']
    else:
        bioe_pct = np.average(bio_pct.biopct)
    #Calculate total volume used in bioenergy
    bioevol = bioe_pct * rw_harvest
    #Establish utilization ratio for bioenergy
    lrUsed = bioevol/lr
    #Calcuate roundwood harvest volume fromwhich loggin residues were utilized
    HWu = lrUsed * rw_harvest
    #Calculate volume of final wood product produced using mill efficiency. S&O use volume of wood product not sawlogs for DF
    WPu = HWu * mill_efficiency * wdens * 1000000 / 2204.62 * 0.5 * df
    #Per comment from Roger Sathre,needs to be reduced by 50% before applying the DF as the DF is meant for tC not tWood..
    #This is in MT
    
    return WPu

In [23]:
def WPo (rw_harvest, lr, year, mill_efficiency = constants['me']['value'], wdens = constants['wDens']['value'], df = constants['DFo']['value']):
    '''
    Calculates the emissions reduction resulting from harvested wood without utilization of 
    logging residuals for bioenergy
    '''
    # establish the aproporiate bioenergy consumption lever for a given year, if no data on bioenergy consumption exists, use average from 2000-2012
    if year in bio_dict.keys():
        bioe_pct = bio_dict[year]['biopct']
    else:
        bioe_pct = np.average(bio_pct.biopct)
    #Calculate total volume used in bioenergy
    bioevol = bioe_pct * rw_harvest
    #Establish utilization ratio for bioenergy
    lrUsed = bioevol/lr
    #Calcuate roundwood harvest volume fromwhich loggin residues were utilized
    HWo = (1-lrUsed) * rw_harvest
    #Calculate volume of final wood product produced using mill efficiency. S&O use volume of wood product not sawlogs for DF
    WPo = HWo * mill_efficiency * wdens * 1000000 / 2204.62 * 0.5 * df
    #This is in MT
    
    return WPo

Emissions reduction from harvested wood with LR utilized

Emissions reductions resulting from harvested roundwood with logging residue utilized in bioenergy


In [24]:
erWPu = []
for row in tpoData.index:
    rw,lr,yr = tpoData.iloc[row][['roundwoodproducts','loggingresidues', 'year']].tolist()
    erWPu.append(WPu(rw,lr,yr))
tpoData['erWPu'] = erWPu


/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:6: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

In [27]:
erWPo = []
for row in tpoData.index:
    rw,lr,yr = tpoData.iloc[row][['roundwoodproducts','loggingresidues', 'year']].tolist()
    erWPo.append(WPo(rw,lr,yr))
tpoData['erWPo'] = erWPo


/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:7: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

Emissions reduction from harvested wood without LR utilization

Emissions reductions resulting from harvested roundwood without logging residue utilized in bioenergy. Though wood with LR utilization rate has a higher displacement factor, the majority of loggin residues wer not utilized.


In [31]:
tpoData['erTotal'] = tpoData.erWPo+tpoData.erWPu
tpoData.to_sql('tpo_emreduc', sqdb['cx'], if_exists='replace')
tpoData['bioe_pct'] = tpoData.year.apply(bioPct)
tpoData['bioe_t'] = tpoData.bioe_pct * tpoData.loggingresidues * 1e6* constants['wDens']['value']/2204.62


/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:4: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

Using M&M Historical data


In [32]:
erWPo = []
for row in mm_histHarvest.index:
    r = mm_histHarvest.iloc[row]
    yr = r['year'] ## year
    rw = (r.state+r.private+r.tribal+r.blm+r.nat_forest)/5.44 
    qry = 'select avg(loggingresidues/roundwoodproducts) lr from tpo where year = {}'.format(yr)
    if yr in tpoData.year.tolist():
        lr = pd.read_sql(qry, sqdb['cx'])*rw
    else:
        lr = pd.read_sql('select avg(loggingresidues/roundwoodproducts) lr from tpo', sqdb['cx'])*rw
    erWPo.append(WPo(rw,lr,yr).lr[0])
mm_histHarvest['erWPo'] = erWPo


/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:7: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

In [33]:
erWPu = []
lrVect = []
tHarv = []
for row in mm_histHarvest.index:
    r = mm_histHarvest.iloc[row]
    yr = r['year'] ## year
    rw = (r.state+r.private+r.tribal+r.blm+r.nat_forest)/5.44 
    qry = 'select avg(loggingresidues/roundwoodproducts) lr from tpo where year = {}'.format(yr)
    if yr in tpoData.year.tolist():
        lr = pd.read_sql(qry, sqdb['cx'])*rw
    else:
        lr = pd.read_sql('select avg(loggingresidues/roundwoodproducts) lr from tpo', sqdb['cx'])*rw
    lrVect.append(lr.lr[0])
    tHarv.append(rw)
    erWPu.append(WPu(rw,lr,yr).lr[0])
mm_histHarvest['erWPu'] = erWPu
mm_histHarvest['loggingresidues'] = lrVect
mm_histHarvest['totalharvest'] = tHarv


/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:6: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

Total emissions reduction from harvested wood products

Sum of emissions reductions from harvested wood with and without LR utilization


In [34]:
mm_histHarvest['erTotal'] = mm_histHarvest.erWPo+mm_histHarvest.erWPu
mm_histHarvest.to_sql('mm_emreduc', sqdb['cx'], if_exists='replace')
mm_histHarvest['bioe_pct'] = mm_histHarvest.year.apply(bioPct)
mm_histHarvest['bioe_t'] = mm_histHarvest.bioe_pct * mm_histHarvest.loggingresidues * 1e6* constants['wDens']['value']/2204.62
mm_histHarvest.to_sql()


/home/pete/src/fcat_biomass/lib/python2.7/site-packages/ipykernel/__main__.py:4: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-34-2bf817493209> in <module>()
      3 mm_histHarvest['bioe_pct'] = mm_histHarvest.year.apply(bioPct)
      4 mm_histHarvest['bioe_t'] = mm_histHarvest.bioe_pct * mm_histHarvest.loggingresidues * 1e6* constants['wDens']['value']/2204.62
----> 5 mm_histHarvest.to_sql()

TypeError: to_sql() takes at least 3 arguments (1 given)

In [35]:
mm_histHarvest


Out[35]:
year private state tribal blm nat_forest erWPo erWPu loggingresidues totalharvest erTotal bioe_pct bioe_t
0 1947 3100 0.0 0.00 0.0000 0 3732558.333185 1244038.111338 126.950318 569.852941 4976596.444524 0.047333 76156.654414
1 1948 4000 0.0 0.00 0.0000 0 4816204.300884 1605210.466243 163.806862 735.294118 6421414.767127 0.047333 98266.650856
2 1949 3800 0.0 0.00 0.0000 0 4575394.085840 1524949.942931 155.616519 698.529412 6100344.028771 0.047333 93353.318313
3 1950 4400 0.0 0.00 0.0000 0 5297824.730973 1765731.512867 180.187548 808.823529 7063556.243840 0.047333 108093.315942
4 1951 4900 0.0 0.00 0.0000 0 5899850.268583 1966382.821148 200.663406 900.735294 7866233.089731 0.047333 120376.647299
5 1952 4400 14.0 26.00 6.0000 613 6091294.389543 2030189.937181 207.174729 929.963235 8121484.326724 0.047333 124282.746670
6 1953 5320 18.0 15.00 7.0000 633 7215878.093800 2405006.581048 245.423631 1101.654412 9620884.674848 0.047333 147228.009645
7 1954 4790 16.0 25.00 13.0000 757 6743890.072313 2247695.955357 229.370558 1029.595588 8991586.027670 0.047333 137597.877862
8 1955 4930 14.0 33.00 13.0000 1030 7248387.472831 2415841.751696 246.529327 1106.617647 9664229.224526 0.047333 147891.309539
9 1956 4690 24.0 29.00 26.0000 1100 7066575.760472 2355245.056595 240.345618 1078.860294 9421820.817067 0.047333 144181.743469
10 1957 4360 27.0 36.00 10.0000 918 6442877.303508 2147370.301216 219.132630 983.639706 8590247.604724 0.047333 131456.212183
11 1958 4470 30.0 38.00 23.0000 1110 6828173.647579 2275787.138516 232.237178 1042.463235 9103960.786094 0.047333 139317.544252
12 1959 4290 27.0 50.00 41.0000 1480 7089452.730901 2362869.806310 241.123701 1082.352941 9452322.537211 0.047333 144648.510060
13 1960 3700 28.0 48.00 32.0000 1330 6186414.424486 2061892.843889 210.409914 944.485294 8248307.268375 0.047333 126223.513025
14 1961 3850 29.0 55.00 33.0000 1380 6438061.099207 2145765.090750 218.968823 982.904412 8583826.189957 0.047333 131357.945532
15 1962 4050 34.0 47.00 29.0000 1380 6670442.956725 2223216.495746 226.872504 1018.382353 8893659.452471 0.047333 136099.311436
16 1963 3690 22.0 54.00 36.0000 1660 6576526.972857 2191914.891655 223.678270 1004.044118 8768441.864512 0.047333 134183.111744
17 1964 3500 25.0 49.00 34.0000 1860 6583751.279309 2194322.707354 223.923980 1005.147059 8778073.986663 0.047333 134330.511721
18 1965 3220 31.0 53.00 55.0000 1920 6356185.626092 2118476.512824 216.184106 970.404412 8474662.138916 0.047333 129687.412468
19 1966 2970 32.0 45.00 33.0000 1930 6032295.886857 2010526.108969 205.168095 920.955882 8042821.995827 0.047333 123078.980198
20 1967 3060 35.0 41.00 34.0000 1900 6104538.951371 2034604.265963 207.625197 931.985294 8139143.217334 0.047333 124552.979960
21 1968 2950 48.0 79.00 36.0000 2360 6589771.534685 2196329.220437 224.128739 1006.066176 8786100.755122 0.047333 134453.345034
22 1969 2880 40.0 54.00 27.0000 2000 6021459.427180 2006914.385420 204.799529 919.301471 8028373.812601 0.047333 122857.880233
23 1970 2620 34.0 28.00 39.0000 1840 5491676.954083 1830341.234134 186.780774 838.419118 7322018.188217 0.047333 112048.548639
24 1971 2590 39.0 70.00 24.0000 2060 5758976.292782 1919430.415010 195.872055 879.227941 7678406.707792 0.047333 117502.347761
25 1972 3220 37.0 66.00 19.0000 2220 6696932.080379 2232045.153311 227.773441 1022.426471 8928977.233690 0.047333 136639.778016
26 1973 2810 33.0 51.00 12.0000 2010 5919115.085787 1972803.663013 201.318633 903.676471 7891918.748799 0.047333 120769.713902
27 1974 2860 40.0 51.00 16.0000 1740 5667468.411065 1888931.416151 192.759725 865.257353 7556399.827217 0.047333 115635.281395
28 1975 2710 35.0 18.00 46.0000 1520 5212337.104632 1737239.027091 177.279976 795.772059 6949576.131723 0.047333 106349.082889
29 1976 2760 40.0 38.00 6.0000 1890 5699977.790096 1899766.586799 193.865421 870.220588 7599744.376895 0.047333 116298.581288
... ... ... ... ... ... ... ... ... ... ... ... ... ...
36 1983 1890 43.0 14.00 25.0000 1680 4397194.526707 1465557.155680 149.555665 671.323529 5862751.682387 0.047333 89717.452232
37 1984 2100 34.0 21.00 7.0000 1560 4481478.101973 1493648.338839 152.422285 684.191176 5975126.440812 0.047333 91437.118622
38 1985 2210 36.0 5.00 17.0000 1830 4934201.306256 1644538.122666 167.820130 753.308824 6578739.428922 0.047333 100674.183802
39 1986 2400 29.0 27.00 27.0000 1960 5349598.927207 1782987.525379 181.948472 816.727941 7132586.452586 0.047333 109149.682439
40 1987 2640 42.0 41.00 15.0000 1970 5668672.462141 1889332.718768 192.800676 865.441176 7558005.180909 0.047333 115659.848058
41 1988 2620 31.0 14.00 16.0000 2180 5852892.276649 1950732.019102 199.066289 893.566176 7803624.295751 0.047333 119418.547453
42 1989 2630 37.0 11.00 12.0000 2020 5671080.564291 1890135.324001 192.882580 865.808824 7561215.888292 0.047333 115708.981383
43 1990 2700 24.0 14.00 10.0000 1530 5150930.499796 1716772.593647 175.191439 786.397059 6867703.093442 0.047333 105096.183091
44 1991 2050 38.0 24.00 11.0000 1340 4169628.873490 1389710.961150 141.815791 636.580882 5559339.834640 0.047333 85074.352979
45 1992 2130 23.0 32.00 9.0000 1030 3881860.666513 1293799.635792 132.028331 592.647059 5175660.302304 0.047333 79202.920590
46 1993 2260 34.0 13.00 8.0000 739 3677171.983725 1225578.190976 125.066539 561.397059 4902750.174702 0.047333 75026.587929
47 1994 1970 17.0 15.00 19.0000 808 2824917.982111 1853460.610819 70.962127 520.036765 4678378.592930 0.047333 42569.709707
48 1995 1930 40.0 16.00 6.0000 544 3053473.526761 1017703.435598 103.853550 466.176471 4071176.962359 0.047333 62301.056643
49 1996 1990 55.0 13.00 12.0000 458 3043841.118159 1014493.014666 103.525937 464.705882 4058334.132824 0.047333 62104.523341
50 1997 2040 47.0 15.00 5.0000 548 3196755.604712 1065458.446969 108.726805 488.051471 4262214.051681 0.047333 65224.489506
51 1998 1940 26.0 16.00 1.0000 453 2933068.419238 977573.173942 99.758379 447.794118 3910641.593180 0.047333 59844.390371
52 1999 1900 0.0 0.00 0.0000 529 2924640.061712 974764.055626 99.471717 446.507353 3899404.117338 0.047333 59672.423732
53 2000 1880 19.0 10.00 8.0000 337 2827177.382304 764634.597115 109.193797 414.338235 3591811.979419 0.047333 65504.635390
54 2001 1480 16.0 10.00 8.0000 297 2180536.497225 726759.038591 74.163557 332.904412 2907295.535817 0.047333 44490.226175
55 2002 1520 1.0 13.60 1.7300 169 2053304.420107 684353.391100 69.836189 313.479779 2737657.811206 0.047333 41894.266926
56 2003 1510 1.0 17.90 1.9500 155 2029849.505161 676536.016129 69.038450 309.898897 2706385.521290 0.047333 41415.708337
57 2004 1590 1.0 16.60 0.0305 113 2071727.003583 690493.521784 70.462771 316.292371 2762220.525367 0.047333 42270.149149
58 2005 1500 1.0 10.60 7.5000 230 2106005.735669 701918.406626 71.628646 321.525735 2807924.142296 0.047333 42969.549753
59 2006 1730 4.0 12.90 1.3500 225 2466192.311830 680317.921317 94.058143 362.729779 3146510.233147 0.047333 56424.856870
60 2007 1440 1.0 19.30 10.6000 308 2141886.457711 713877.224600 72.849007 327.003676 2855763.682311 0.047333 43701.636302
61 2008 1270 1.0 13.50 0.0745 205 1793523.778347 597770.144412 61.000631 273.818842 2391293.922759 0.047333 36593.874329
62 2009 745 1.0 3.91 2.1900 163 1101827.138935 367232.024415 37.474915 168.216912 1469059.163350 0.047333 22480.953050
63 2010 1030 1.0 9.76 6.3800 265 1579883.577841 526565.215294 53.734384 241.202206 2106448.793135 0.047333 32234.900814
64 2011 1130 1.0 11.40 1.5000 300 1738529.347512 579440.848052 59.130182 265.422794 2317970.195564 0.047333 35471.804293
65 2012 1190 27.9 8.10 0.4000 203 1739161.992800 551272.329665 60.909559 262.757353 2290434.322465 0.047333 36539.240505

66 rows × 13 columns


In [36]:
sns.set_style("whitegrid")
fig2, ax2 = plt.subplots(figsize=(12, 10))
ax2 = sns.barplot(x ='year', y='erTotal', data=mm_histHarvest.sort_values('year'))
ax2.set_ylabel('Emissions reduction (MT CO2e)')
ax2.set_title('Emissions reductions resulting \nfrom roundwood harvest in CA')
ax2.set_xticklabels(ax2.get_xticklabels(),rotation=90)


/home/pete/src/fcat_biomass/local/lib/python2.7/site-packages/matplotlib/__init__.py:892: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
  warnings.warn(self.msg_depr % (key, alt_key))
Out[36]:
[<matplotlib.text.Text at 0x7fdb32ccd450>,
 <matplotlib.text.Text at 0x7fdb32ceb610>,
 <matplotlib.text.Text at 0x7fdb32322450>,
 <matplotlib.text.Text at 0x7fdb32322bd0>,
 <matplotlib.text.Text at 0x7fdb3232b390>,
 <matplotlib.text.Text at 0x7fdb3232bb10>,
 <matplotlib.text.Text at 0x7fdb323342d0>,
 <matplotlib.text.Text at 0x7fdb32334a50>,
 <matplotlib.text.Text at 0x7fdb322be210>,
 <matplotlib.text.Text at 0x7fdb322be990>,
 <matplotlib.text.Text at 0x7fdb322c8150>,
 <matplotlib.text.Text at 0x7fdb322c88d0>,
 <matplotlib.text.Text at 0x7fdb322d2090>,
 <matplotlib.text.Text at 0x7fdb322d2810>,
 <matplotlib.text.Text at 0x7fdb322d2f90>,
 <matplotlib.text.Text at 0x7fdb322db750>,
 <matplotlib.text.Text at 0x7fdb322dbed0>,
 <matplotlib.text.Text at 0x7fdb322e6690>,
 <matplotlib.text.Text at 0x7fdb322e6e10>,
 <matplotlib.text.Text at 0x7fdb322ef5d0>,
 <matplotlib.text.Text at 0x7fdb322efd50>,
 <matplotlib.text.Text at 0x7fdb32279510>,
 <matplotlib.text.Text at 0x7fdb32279c90>,
 <matplotlib.text.Text at 0x7fdb32284450>,
 <matplotlib.text.Text at 0x7fdb32284bd0>,
 <matplotlib.text.Text at 0x7fdb3228e390>,
 <matplotlib.text.Text at 0x7fdb3228eb10>,
 <matplotlib.text.Text at 0x7fdb322962d0>,
 <matplotlib.text.Text at 0x7fdb32296a50>,
 <matplotlib.text.Text at 0x7fdb322a0210>,
 <matplotlib.text.Text at 0x7fdb322a0990>,
 <matplotlib.text.Text at 0x7fdb322ab150>,
 <matplotlib.text.Text at 0x7fdb322ab8d0>,
 <matplotlib.text.Text at 0x7fdb322b4090>,
 <matplotlib.text.Text at 0x7fdb322b4810>,
 <matplotlib.text.Text at 0x7fdb322b4f90>,
 <matplotlib.text.Text at 0x7fdb3223f750>,
 <matplotlib.text.Text at 0x7fdb3223fed0>,
 <matplotlib.text.Text at 0x7fdb32248690>,
 <matplotlib.text.Text at 0x7fdb32248e10>,
 <matplotlib.text.Text at 0x7fdb322535d0>,
 <matplotlib.text.Text at 0x7fdb32253d50>,
 <matplotlib.text.Text at 0x7fdb3225d510>,
 <matplotlib.text.Text at 0x7fdb3225dc90>,
 <matplotlib.text.Text at 0x7fdb32267450>,
 <matplotlib.text.Text at 0x7fdb32267bd0>,
 <matplotlib.text.Text at 0x7fdb32270390>,
 <matplotlib.text.Text at 0x7fdb32270b10>,
 <matplotlib.text.Text at 0x7fdb321f92d0>,
 <matplotlib.text.Text at 0x7fdb321f9a50>,
 <matplotlib.text.Text at 0x7fdb32204210>,
 <matplotlib.text.Text at 0x7fdb32204990>,
 <matplotlib.text.Text at 0x7fdb3220e150>,
 <matplotlib.text.Text at 0x7fdb3220e8d0>,
 <matplotlib.text.Text at 0x7fdb32219090>,
 <matplotlib.text.Text at 0x7fdb32219810>,
 <matplotlib.text.Text at 0x7fdb32219f90>,
 <matplotlib.text.Text at 0x7fdb32222750>,
 <matplotlib.text.Text at 0x7fdb32222ed0>,
 <matplotlib.text.Text at 0x7fdb3222c690>,
 <matplotlib.text.Text at 0x7fdb3222ce10>,
 <matplotlib.text.Text at 0x7fdb322365d0>,
 <matplotlib.text.Text at 0x7fdb32236d50>,
 <matplotlib.text.Text at 0x7fdb321c0510>,
 <matplotlib.text.Text at 0x7fdb321c0c90>,
 <matplotlib.text.Text at 0x7fdb321c9450>]

In [37]:
[fig2.savefig('graphics/ann_hh_em_reduc.{}'.format(i)) for i in ['pdf','png']]


Out[37]:
[None, None]

In [38]:
sns.set_style("whitegrid")
fig, ax = plt.subplots()
ax = sns.barplot(x ='year', y='erTotal', hue="ownership", data=tpoData.sort_values('year'))
ax.set_ylabel('Emissions reduction (MT CO2e)')
ax.set_title('Emissions reductions resulting from roundwood harvest in CA')


Out[38]:
<matplotlib.text.Text at 0x7fdb32236150>

In [39]:
[fig.savefig('graphics/harv_em_reductions.{}'.format(i)) for i in ['pdf','png']]


Out[39]:
[None, None]

Total emissions reductions from roundwood harvesting in CA, 2012


In [40]:
pd.read_sql('select sum("erTotal") from tpo_emreduc where year = "2012"', sqdb['cx'])


Out[40]:
sum("erTotal")
0 4105541.16538

Emissions from un-utilized logging residuals

From logging residuals not used in bioenergy, emmisions are produced from combustion of the residual material or from decomposition of the material over time. To calculate the ratio of burned to decompsed logging residues I begin with the CARB estimate of PM2.5 produced from forest management:


In [41]:
tName = 'cpe_allyears'
sqdb['crs'].executescript('drop table if exists {0};'.format(tName))
for y in [2000, 2005, 2010, 2012, 2015]:
    url = 'http://www.arb.ca.gov/app/emsinv/2013/emsbyeic.csv?F_YR={0}&F_DIV=0&F_SEASON=A&SP=2013&SPN=2013_Almanac&F_AREA=CA'
    df = pd.read_csv(url.format(y))
    df.to_sql(tName, sqdb['cx'], if_exists = 'append')

In [42]:
pmAnn = pd.read_sql('''
                        select year,
                                eicsoun,
                                "PM2_5"*365 an_pm25_av
                        from cpe_allyears
                        where eicsoun = 'FOREST MANAGEMENT';
                    ''', sqdb['cx'])
pmAnn


Out[42]:
YEAR EICSOUN an_pm25_av
0 2000 FOREST MANAGEMENT 5474.3065
1 2005 FOREST MANAGEMENT 5474.3065
2 2010 FOREST MANAGEMENT 5474.3065
3 2012 FOREST MANAGEMENT 5477.2995
4 2015 FOREST MANAGEMENT 5480.5115

Estimate biomass, CO2, CH4 and BC from PM2.5

To estimate total biomass from PM2.5 I assume 90% consumption of biomass in piles and use the relationship of pile tonnage to PM emissions calculated using the Piled Fuels Biomass and Emissions Calculator provided by the Washington State Department of Natural resources. This calculator is based on the Consume fire behavior model published by the US Forest Service.


In [43]:
pfbec = pd.read_csv('fera_pile_cemissions.csv', header=1)
ward = ut.gData('13UQtRfNBSJ81PXxbYSnB2LrjHePNcvhJhrsxRBjHpoY', 475419971)
def sp2bio(pm, species = 'PM2.5 (tons)'):
    return pm * (pfbec[species]/pfbec['Pile Biomass (tons)'])

def bioPm(pm):
    return pm * (pfbec['Pile Biomass (tons)']/pfbec['PM2.5 (tons)'])
co2t = lambda x: sp2bio(x,'CO2 (tons)')
ch4t = lambda x: sp2bio(x,'CH4 (tons)')

pmAnn['biomass_t']=pmAnn.an_pm25_av.apply(bioPm)
pmAnn['co2_t'] = pmAnn.biomass_t.apply(co2t)
pmAnn['ch4_t'] = pmAnn.biomass_t.apply(ch4t)
pmAnn['ch4_co2e'] = pmAnn.ch4_t * 56
pmAnn['bc_co2e']= pmAnn.an_pm25_av.apply(ut.pm2bcgwpPiles)
pmAnn['t_co2e']= pmAnn.co2_t + pmAnn.ch4_co2e + pmAnn.bc_co2e

print tabulate(pmAnn[['YEAR','EICSOUN','co2_t','ch4_co2e','bc_co2e','t_co2e']], headers = ['Year','Emissions source','CO2 (t)', 'CH4 (tCO2e)', 'BC (tCO2e)', 'Pile Burn Total (tCO2e)'],tablefmt="pipe")


|    |   Year | Emissions source   |     CO2 (t) |   CH4 (tCO2e) |   BC (tCO2e) |   Pile Burn Total (tCO2e) |
|---:|-------:|:-------------------|------------:|--------------:|-------------:|--------------------------:|
|  0 |   2000 | FOREST MANAGEMENT  | 1.34928e+06 |        127280 |       248255 |               1.72481e+06 |
|  1 |   2005 | FOREST MANAGEMENT  | 1.34928e+06 |        127280 |       248255 |               1.72481e+06 |
|  2 |   2010 | FOREST MANAGEMENT  | 1.34928e+06 |        127280 |       248255 |               1.72481e+06 |
|  3 |   2012 | FOREST MANAGEMENT  | 1.35002e+06 |        127349 |       248391 |               1.72576e+06 |
|  4 |   2015 | FOREST MANAGEMENT  | 1.35081e+06 |        127424 |       248536 |               1.72677e+06 |

Estimating GHG emissions from decomposition of unitilized logging slash

To provide a full picture of the emissions from residual material produced from commercial timber harvesting in California, decomposition of unutilized logging residuals left on-site that are not burned must be accounted for. To establish the fraction of logging residue that is left to decompose, residues burned and used in bioenergy are subtracted from the total reported by the TPO:

To calculate the GHG emissions from decomposition of piles we use the following equation:


In [44]:
annLrAvg = pd.read_sql('''with ann as (select sum(loggingresidues) lr
                                                        from tpo
                                                        group by year)
                                                    select avg(lr) foo
                                                    from ann;''', sqdb['cx'])['foo'][0]
pctLR_bio = (np.average(pmAnn.biomass_t)/1e6)/annLrAvg

In [45]:
annLrAvg


Out[45]:
115.47500000000001

In [46]:
pmAnn


Out[46]:
YEAR EICSOUN an_pm25_av biomass_t co2_t ch4_t ch4_co2e bc_co2e t_co2e
0 2000 FOREST MANAGEMENT 5474.3065 901120.411523 1349279.491835 2272.850958 127279.653646 248254.982385 1724814.127867
1 2005 FOREST MANAGEMENT 5474.3065 901120.411523 1349279.491835 2272.850958 127279.653646 248254.982385 1724814.127867
2 2010 FOREST MANAGEMENT 5474.3065 901120.411523 1349279.491835 2272.850958 127279.653646 248254.982385 1724814.127867
3 2012 FOREST MANAGEMENT 5477.2995 901613.086420 1350017.191400 2274.093607 127349.242004 248390.712301 1725757.145705
4 2015 FOREST MANAGEMENT 5480.5115 902141.810700 1350808.868981 2275.427182 127423.922194 248536.373675 1726769.164850

In [47]:
lr_t = 1e6*tpoData.loggingresidues*constants['wDens']['value']/2204.62
tpoData['unused_lr'] = 1e6*(lr_t-(pctLR_bio*lr_t))
tpoData['burned_lr'] = 1e6*lr_t*(np.average(pmAnn.biomass_t)/(annLrAvg*1e6))
tpoData['unburned_lr'] = (lr_t*1e6) - tpoData.bioe_t - tpoData.burned_lr
tpoData['unburned_lr_co2e'] = tpoData.unburned_lr.apply(ut.co2eDecomp)
tpoData


Out[47]:
ownership roundwoodproducts loggingresidues year erWPu erWPo erTotal bioe_pct bioe_t unused_lr burned_lr unburned_lr unburned_lr_co2e
0 National Forest 72.4 20.7 2012 123154.043886 502474.423768 625628.467654 0.047333 12417.792815 2.602998e+11 2.047944e+09 2.602998e+11 7.353469e+11
1 Other Public 16.2 3.4 2012 37539.890544 104350.908575 141890.799119 0.047333 2039.637467 4.275456e+10 3.363773e+08 4.275455e+10 1.207816e+11
2 Forest Industry 328.9 72.4 2012 726659.692498 2147311.487009 2873971.179506 0.047333 43432.280184 9.104205e+11 7.162858e+09 9.104205e+11 2.571938e+12
3 Other Private 53.0 11.2 2012 121976.342427 342074.376674 464050.719101 0.047333 6718.805774 1.408385e+11 1.108066e+09 1.408385e+11 3.978688e+11
4 National Forest 52.8 16.3 2006 83180.615691 371814.969847 454995.585538 0.047333 9778.261975 2.049704e+11 1.612632e+09 2.049704e+11 5.790413e+11
5 Other Public 1.1 0.3 2006 1961.579913 7561.059238 9522.639151 0.047333 179.968012 3.772461e+09 2.968035e+07 3.772461e+09 1.065720e+10
6 Forest Industry 274.3 59.6 2006 613970.133470 1784412.231263 2398382.364733 0.047333 35753.645013 7.494622e+11 5.896496e+09 7.494622e+11 2.117231e+12
7 Other Private 139.2 33.2 2006 283845.672130 927987.019453 1211832.691583 0.047333 19916.459974 4.174857e+11 3.284625e+09 4.174856e+11 1.179397e+12
8 National Forest 90.8 22.6 2000 177421.051116 611583.014373 789004.065489 0.047333 13557.590223 2.841920e+11 2.235920e+09 2.841920e+11 8.028425e+11
9 Other Public 5.2 1.6 2000 8219.181949 36596.162514 44815.344463 0.047333 959.829396 2.011979e+10 1.582952e+08 2.011979e+10 5.683841e+10
10 Forest Industry 372.5 70.6 2000 955849.996899 2324417.705211 3280267.702109 0.047333 42352.472113 8.877858e+11 6.984775e+09 8.877857e+11 2.507995e+12
11 Other Private 159.4 49.1 2000 251673.235233 1122036.795502 1373710.030734 0.047333 29454.764600 6.174261e+11 4.857684e+09 6.174260e+11 1.744229e+12
12 National Forest 132.1 11.2 1994 757756.207065 485318.007674 1243074.214739 0.047333 6718.805774 1.408385e+11 1.108066e+09 1.408385e+11 3.978688e+11
13 Other Public 24.7 4.3 1994 69002.899618 149578.564631 218581.464248 0.047333 2579.541503 5.407194e+10 4.254183e+08 5.407193e+10 1.527532e+11
14 Forest Industry 396.1 63.1 1994 1209267.039173 2315569.399933 3524836.439106 0.047333 37853.271818 7.934742e+11 6.242767e+09 7.934742e+11 2.241565e+12
15 Other Private 174.7 22.3 1994 665614.596034 914216.026639 1579830.622673 0.047333 13377.622211 2.804196e+11 2.206239e+09 2.804196e+11 7.921853e+11

Biomass residuals from non-commercial management activities

Data from TPO does not account for forest management activities that do not result in commercial products (timber sales, biomass sales). To estimate the amount of residual material produced from non commercial management activities we use data from the US Forest Service (FACTS) and from CalFires timber harvest plan data.

Forest Service ACtivity Tracking System (FACTS)

Data from TPO does not account for forest management activities that do not result in commercial products (timber sales, biomass sales). We use a range of 10-35 BDT/acre to convert acres reported in FACTS to volume.


In [48]:
pd.read_excel('lf/FACTS_Tabular_092115.xlsx', sheetname = 'CategoryCrosswalk').to_sql('facts_cat', sqdb['cx'], if_exists = 'replace')
pd.read_csv('pd/facts_notimber.csv').to_sql('facts_notimber', sqdb['cx'], if_exists='replace')

Querying FACTS

The USFS reports Hazardous Fuels Treatment (HFT) activities as well as Timber Sales (TS) derived from the FACTS database. We use these two datasets to estimate the number of acres treated that did not produce commercial material (sawlogs or biomass) and where burning was not used. The first step is to elimina all treatments in the HFT dataset that included timber sales. We accomplish this by eliminating all rows in the HFT dataset that have identical FACTS_ID fields in the TS dataset. We further filter the HFT dataset by removing any planned but not executed treatements (nbr_units1 >0 below -- nbr_units1 references NBR_UNITS_ACCOMPLISHED in the USFS dataset, see metadata for HFT here), and use text matching in the 'ACTIVITY' and 'METHOD' fields to remove any rows that contain reference to 'burning' or 'fire'. Finally, we remove all rows that that reference 'Biomass' in the method category as it is assumed that this means material was removed for bioenergy.


In [ ]:
usfs_acres = pd.read_sql('''select
                                sum(nbr_units1) acres,
                                method,
                                strftime('%Y',date_compl) year,
                                cat."ACTIVITY" activity,
                                cat."TENTATIVE_CATEGORY" r5_cat
                            from facts_notimber n 
                                join facts_cat cat
                                    on (n.activity = cat."ACTIVITY") 
                            where date_compl is not null
                                and nbr_units1 > 0
                                and cat."TENTATIVE_CATEGORY" != 'Burning'
                                and cat."ACTIVITY" not like '%ire%'
                                and method not like '%Burn%'
                                and method != 'Biomass'
                            group by cat."ACTIVITY",
                                year,
                                method,
                                cat."TENTATIVE_CATEGORY"
                            order by year;''', con = sqdb['cx'])

Converting acres to cubic feet

FACTS reports in acres. To estimate the production of biomass from acres treated we use a range of 10-35 BDT/acre. We assume that actual biomass residuals per acre are normally distributed with a mean of 22.5 and a standard deviation of (35-10)/4 = 6.25


In [ ]:
def sumBDT(ac, maxbdt = 35, minbdt = 10):
    av = (maxbdt + minbdt)/2
    stdev = (float(maxbdt) - float(minbdt))/4 
    d_frac = (ac-np.floor(ac))*np.random.normal(av, stdev, 1).clip(min=0)[0]
    t_bdt = np.sum(np.random.normal(av,stdev,np.floor(ac)).clip(min=0))
    return d_frac+t_bdt

In [ ]:
usfs_acres['bdt'] = usfs_acres['acres'].apply(sumBDT)
usfs_an_bdt = usfs_acres.groupby(['year']).sum()

Weighted average wood density

Average wood density weighted by harvested species percent. Derived from McIver and Morgan, Table 4


In [ ]:
wood_dens = ut.gData('138FWlGeW57MKdcz2UkWxtWV4o50SZO8sduB1R6JOFp8', 1297253755)
wavg_dens =sum(wood_dens.pct/100 * wood_dens.density_lbscuft)

Annual unutilized management residuals

  • [x] Public lands non-commercial management residuals
  • [ ] Private land non-commercial management residuals
  • [x] Public lands logging residuals
  • [x] Private lands logging residuals

In [ ]:
cat_codes = {'nf_ncmr': 'Unburned, non-commercial management residuals from National Forest lands',
             'nf_lr': 'Logging residuals generated from timber sales on National Forest lands',
             'opriv_lr': 'Logging residuals generated from timber sales on non-industrial private forest lands',
             'fi_lr': 'Logging residuals generated from timber sales on industrial private lands',
             'opub_lr': 'Logging residuals generated from timber sales on industrial private lands'}

In [ ]:
usfs_an_bdt['cuft']= usfs_an_bdt.bdt *wavg_dens
resid_stats=pd.DataFrame((usfs_an_bdt.iloc[6:,2]/1000000).describe())
resid_stats.columns = ['nf_ncmr']
resid_stats['nf_lr']=tpoData[tpoData.ownership.str.contains('National Forest')]['loggingresidues'].describe()
resid_stats['opriv_lr']=tpoData[tpoData.ownership.str.contains('Other Private')]['loggingresidues'].describe()
resid_stats['fi_lr']=tpoData[tpoData.ownership.str.contains('Forest Industry')]['loggingresidues'].describe()
resid_stats['opub_lr']=tpoData[tpoData.ownership.str.contains('Other Public')]['loggingresidues'].describe()
resid_stats

In [ ]:
print tabulate(resid_stats, headers = resid_stats.columns.tolist(), tablefmt ='pipe')

Estimating combined GHG and SLCP emissions from unutilized residues

Only a fraction of the


In [ ]:
ureg = UnitRegistry()
ureg.define('cubic foot =  cubic_centimeter/ 3.53147e-5 = cubic_foot' )
ureg.define('million cubic foot =  cubic_foot*1000000 = MMCF' )
ureg.define('board foot sawlog = cubic_foot / 5.44 = BF_saw')
ureg.define('board foot veneer = cubic_foot / 5.0 = BF_vo')
ureg.define('board foot bioenergy = cubic_foot / 1.0 = BF_bio')
ureg.define('bone-dry unit = cubic_foot * 96 = BDU')