ecwood / GCAM-CDR-modeling

1 stars 0 forks source link

Figure Out How to Read the Output File #15

Open ecwood opened 1 year ago

ecwood commented 1 year ago

I tried to convert the debug_db.xml file into JSON and it created a 16GB file. This is not sustainable, so I need to create some automated methods to get the data I need from that file. The comment here will provide some guidance.

ecwood commented 1 year ago

Here is what temperature looks like: (cross reference with previously linked comment)

"global-mean-temperature": [
    {
        "#text": "0",
        "@unit": "degreesC",
        "@year": "1975"
    },
    {
        "#text": "0.345863",
        "@unit": "degreesC",
        "@year": "1980"
    },
    {
        "#text": "0.451742",
        "@unit": "degreesC",
        "@year": "1985"
    },
    {
        "#text": "0.563683",
        "@unit": "degreesC",
        "@year": "1990"
    },
    {
        "#text": "0.682267",
        "@unit": "degreesC",
        "@year": "1995"
    },
    {
        "#text": "0.798416",
        "@unit": "degreesC",
        "@year": "2000"
    },
    {
        "#text": "0.898257",
        "@unit": "degreesC",
        "@year": "2005"
    },
    {
        "#text": "1.01419",
        "@unit": "degreesC",
        "@year": "2010"
    },
    {
        "#text": "1.17374",
        "@unit": "degreesC",
        "@year": "2015"
    },
    {
        "#text": "1.32357",
        "@unit": "degreesC",
        "@year": "2020"
    },
    {
        "#text": "1.46477",
        "@unit": "degreesC",
        "@year": "2025"
    },
    {
        "#text": "1.60625",
        "@unit": "degreesC",
        "@year": "2030"
    },
    {
        "#text": "1.74752",
        "@unit": "degreesC",
        "@year": "2035"
    },
    {
        "#text": "1.88708",
        "@unit": "degreesC",
        "@year": "2040"
    },
    {
        "#text": "2.02431",
        "@unit": "degreesC",
        "@year": "2045"
    },
    {
        "#text": "2.1604",
        "@unit": "degreesC",
        "@year": "2050"
    },
    {
        "#text": "2.29598",
        "@unit": "degreesC",
        "@year": "2055"
    },
    {
        "#text": "2.43222",
        "@unit": "degreesC",
        "@year": "2060"
    },
    {
        "#text": "2.56913",
        "@unit": "degreesC",
        "@year": "2065"
    },
    {
        "#text": "2.70664",
        "@unit": "degreesC",
        "@year": "2070"
    },
    {
        "#text": "2.84526",
        "@unit": "degreesC",
        "@year": "2075"
    },
    {
        "#text": "2.98593",
        "@unit": "degreesC",
        "@year": "2080"
    },
    {
        "#text": "3.12642",
        "@unit": "degreesC",
        "@year": "2085"
    },
    {
        "#text": "3.26605",
        "@unit": "degreesC",
        "@year": "2090"
    },
    {
        "#text": "3.40484",
        "@unit": "degreesC",
        "@year": "2095"
    },
    {
        "#text": "3.54283",
        "@unit": "degreesC",
        "@year": "2100"
    }
]
ecwood commented 1 year ago

These are all of the different supplysector list @name fields:

[
    "regional biomass",
    "regional corn for ethanol",
    "regional sugar for ethanol",
    "regional biomassOil",
    "traded coal",
    "traded oil",
    "traded natural gas",
    "regional coal",
    "regional oil",
    "regional natural gas",
    "gas processing",
    "nuclearFuelGenII",
    "nuclearFuelGenIII",
    "refining",
    "electricity",
    "elect_td_bld",
    "H2 central production",
    "H2 pipeline",
    "H2 liquid truck",
    "H2 wholesale delivery",
    "H2 industrial",
    "H2 retail delivery",
    "H2 wholesale dispensing",
    "H2 retail dispensing",
    "trn_freight_road",
    "backup_electricity",
    "csp_backup",
    "delivered biomass",
    "delivered coal",
    "electricity_net_ownuse",
    "elect_td_ind",
    "elect_td_trn",
    "gas pipeline",
    "wholesale gas",
    "delivered gas",
    "refined liquids enduse",
    "refined liquids industrial",
    "other industrial energy use",
    "other industrial feedstocks",
    "other industry",
    "iron and steel",
    "agricultural energy use",
    "mining energy use",
    "construction",
    "construction energy use",
    "construction feedstocks",
    "chemical",
    "chemical energy use",
    "chemical feedstocks",
    "alumina",
    "aluminum",
    "cement",
    "process heat cement",
    "N fertilizer",
    "Exports_fertilizer",
    "resid heating",
    "resid cooling",
    "resid others",
    "comm heating",
    "comm cooling",
    "comm others",
    "trn_aviation_intl",
    "trn_freight",
    "trn_pass",
    "trn_pass_road",
    "trn_pass_road_LDV",
    "trn_shipping_intl",
    "trn_pass_road_LDV_4W",
    "carbon-storage",
    "NonFoodDemand_Forest",
    "FodderHerb_Residue",
    "Pasture_FodderGrass",
    "FeedCrops",
    "Scavenging_Other",
    "Beef",
    "Dairy",
    "Pork",
    "Poultry",
    "SheepGoat",
    "FoodDemand_Staples",
    "FoodDemand_NonStaples",
    "NonFoodDemand_Crops",
    "NonFoodDemand_Meat",
    "total biomass",
    "traded biomass",
    "traded corn",
    "traded fibercrop",
    "traded fruits",
    "traded legumes",
    "traded misccrop",
    "traded nuts_seeds",
    "traded oilcrop",
    "traded othergrain",
    "traded oilpalm",
    "traded rice",
    "traded root_tuber",
    "traded soybean",
    "traded sugarcrop",
    "traded vegetables",
    "traded wheat",
    "traded beef",
    "traded dairy",
    "traded pork",
    "traded poultry",
    "traded sheepgoat",
    "traded forest",
    "regional corn",
    "regional fibercrop",
    "regional fruits",
    "regional legumes",
    "regional misccrop",
    "regional nuts_seeds",
    "regional oilcrop",
    "regional othergrain",
    "regional oilpalm",
    "regional rice",
    "regional root_tuber",
    "regional soybean",
    "regional sugarcrop",
    "regional vegetables",
    "regional wheat",
    "regional beef",
    "regional dairy",
    "regional pork",
    "regional poultry",
    "regional sheepgoat",
    "regional forest",
    "desalinated water",
    "water_td_elec_C",
    "water_td_an_C",
    "water_td_ind_C",
    "water_td_pri_C",
    "water_td_muni_C",
    "water_td_elec_W",
    "water_td_an_W",
    "water_td_ind_W",
    "water_td_pri_W",
    "water_td_muni_W",
    "water_td_irr_PacArctic_W",
    "water_td_irr_PacArctic_C",
    "water_td_irr_NelsonR_W",
    "water_td_irr_NelsonR_C",
    "water_td_irr_FraserR_W",
    "water_td_irr_FraserR_C",
    "water_td_irr_MexCstNW_W",
    "water_td_irr_MexCstNW_C",
    "water_td_irr_Caribbean_W",
    "water_td_irr_Caribbean_C",
    "water_td_irr_California_W",
    "water_td_irr_California_C",
    "water_td_irr_MissppRN_W",
    "water_td_irr_MissppRN_C",
    "water_td_irr_MissppRS_W",
    "water_td_irr_MissppRS_C",
    "water_td_irr_UsaColoRN_W",
    "water_td_irr_UsaColoRN_C",
    "water_td_irr_UsaColoRS_W",
    "water_td_irr_UsaColoRS_C",
    "water_td_irr_GreatBasin_W",
    "water_td_irr_GreatBasin_C",
    "water_td_irr_MissouriR_W",
    "water_td_irr_MissouriR_C",
    "water_td_irr_ArkWhtRedR_W",
    "water_td_irr_ArkWhtRedR_C",
    "water_td_irr_TexasCst_W",
    "water_td_irr_TexasCst_C",
    "water_td_irr_UsaCstSE_W",
    "water_td_irr_UsaCstSE_C",
    "water_td_irr_GreatLakes_W",
    "water_td_irr_GreatLakes_C",
    "water_td_irr_OhioR_W",
    "water_td_irr_OhioR_C",
    "water_td_irr_UsaPacNW_W",
    "water_td_irr_UsaPacNW_C",
    "water_td_irr_TennR_W",
    "water_td_irr_TennR_C",
    "water_td_irr_RioGrande_W",
    "water_td_irr_RioGrande_C",
    "water_td_irr_UsaCstNE_W",
    "water_td_irr_UsaCstNE_C",
    "water_td_irr_UsaCstE_W",
    "water_td_irr_UsaCstE_C",
    "water_td_irr_Hawaii_W",
    "water_td_irr_Hawaii_C",
    "PacArctic_desalinated water",
    "NelsonR_desalinated water",
    "FraserR_desalinated water",
    "MexCstNW_desalinated water",
    "Caribbean_desalinated water",
    "California_desalinated water",
    "MissppRN_desalinated water",
    "MissppRS_desalinated water",
    "UsaColoRN_desalinated water",
    "UsaColoRS_desalinated water",
    "GreatBasin_desalinated water",
    "MissouriR_desalinated water",
    "ArkWhtRedR_desalinated water",
    "TexasCst_desalinated water",
    "UsaCstSE_desalinated water",
    "GreatLakes_desalinated water",
    "OhioR_desalinated water",
    "UsaPacNW_desalinated water",
    "TennR_desalinated water",
    "RioGrande_desalinated water",
    "UsaCstNE_desalinated water",
    "UsaCstE_desalinated water",
    "Hawaii_desalinated water",
    "irrigation water abstraction",
    "industrial water abstraction",
    "industrial water treatment",
    "industrial wastewater treatment",
    "municipal water abstraction",
    "municipal water treatment",
    "municipal water distribution",
    "municipal wastewater treatment",
    "municipal water",
    "urban processes",
    "industrial processes",
    "CO2 removal",
    "process heat dac",
    "airCO2"
]
ecwood commented 1 year ago

This could help with emissions output reading: http://jgcri.github.io/gcam-doc/outputs_emissions.html

ecwood commented 1 year ago

I wanted to note for myself that the purpose of #18 is to decrease the output file size so that I can process it on my laptop (ran into memory limitations with the last run).

ecwood commented 1 year ago

I need to know how to extract atmospheric CO2 from the output. (Slide 45 of http://www.globalchange.umd.edu/data/annual-meetings/2019/GCAM_Overview-PM_20191106.pdf)