Commit c51040ae authored by abuddenberg's avatar abuddenberg
Browse files

Added support for the semi-final round of figures

parent 29193426
...@@ -7,15 +7,15 @@ from collections import OrderedDict ...@@ -7,15 +7,15 @@ from collections import OrderedDict
webform = WebformClient('http://resources.assessment.globalchange.gov', webform_token) webform = WebformClient('http://resources.assessment.globalchange.gov', webform_token)
# gcis = GcisClient('http://data.gcis-dev-front.joss.ucar.edu', *gcis_dev_auth) gcis = GcisClient('http://data.gcis-dev-front.joss.ucar.edu', *gcis_dev_auth)
gcis = GcisClient('http://data-stage.globalchange.gov', *gcis_stage_auth) # gcis = GcisClient('http://data-stage.globalchange.gov', *gcis_stage_auth)
sync_metadata_tree = { sync_metadata_tree = {
#Reports #Reports
'nca3': OrderedDict([ 'nca3': OrderedDict([
#Chapter 2 #Chapter 2
('our-changing-climate', [ ('our-changing-climate', [
# (webform_url, gcis_id) (webform_url, gcis_id)
('/metadata/figures/3074', 'ten-indicators-of-a-warming-world'), # 2.1 ('/metadata/figures/3074', 'ten-indicators-of-a-warming-world'), # 2.1
('/metadata/figures/3293', 'observed-increase-in-frostfree-season-length'), # 2.10 ('/metadata/figures/3293', 'observed-increase-in-frostfree-season-length'), # 2.10
('/metadata/figures/3294', 'projected-changes-in-frostfree-season-length'), # 2.11 ('/metadata/figures/3294', 'projected-changes-in-frostfree-season-length'), # 2.11
...@@ -106,15 +106,15 @@ sync_metadata_tree = { ...@@ -106,15 +106,15 @@ sync_metadata_tree = {
]), ]),
#Chapter 10 #Chapter 10
('water-energy-land-use', [ ('water-energy-land-use', [
('/metadata/figures/2601', 'energy-water-land-and-climate-interactions'), # 10.1 # ('/metadata/figures/2601', 'energy-water-land-and-climate-interactions'), # 10.1
('/metadata/figures/2917', 'the-columbia-river-basin-land-use-and-land-cover'), # 10.10 # ('/metadata/figures/2917', 'the-columbia-river-basin-land-use-and-land-cover'), # 10.10
('/metadata/figures/2410', 'coasttocoast-100degree-days-in-2011'), # 10.2 # ('/metadata/figures/2410', 'coasttocoast-100degree-days-in-2011'), # 10.2
('/metadata/figures/2596', 'texas-summer-2011-record-heat-and-drought'), # 10.3 # ('/metadata/figures/2596', 'texas-summer-2011-record-heat-and-drought'), # 10.3
('/metadata/figures/3635', 'water-use-for-electricity-generation-by-fuel-and-cooling-technology'), # 10.5 # ('/metadata/figures/3635', 'water-use-for-electricity-generation-by-fuel-and-cooling-technology'), # 10.5
('/metadata/figures/3158', 'projected-landuse-intensity-in-2030'), # 10.6 # ('/metadata/figures/3158', 'projected-landuse-intensity-in-2030'), # 10.6
('/metadata/figures/2986', 'hydraulic-fracturing-and-water-use'), # 10.7 # ('/metadata/figures/2986', 'hydraulic-fracturing-and-water-use'), # 10.7
('/metadata/figures/2916', 'renewable-energy-and-land-use'), # 10.8 # ('/metadata/figures/2916', 'renewable-energy-and-land-use'), # 10.8
('/metadata/figures/2918', 'water-stress-in-the-us'), # 10.9 # ('/metadata/figures/2918', 'water-stress-in-the-us'), # 10.9
]), ]),
#Chapter 11 #Chapter 11
...@@ -159,13 +159,13 @@ sync_metadata_tree = { ...@@ -159,13 +159,13 @@ sync_metadata_tree = {
]), ]),
#Chapter 17 #Chapter 17
('southeast', [ ('southeast', [
('/metadata/figures/3577', 'billion-dollar-weatherclimate-disasters'), # 17.1 # ('/metadata/figures/3577', 'billion-dollar-weatherclimate-disasters'), # 17.1
('/metadata/figures/2633', 'trends-in-water-availability'), # 17.11 # ('/metadata/figures/2633', 'trends-in-water-availability'), # 17.11
('/metadata/figures/3108', 'shrinking-lands-for-tribal-communities'), # 17.2 # ('/metadata/figures/3108', 'shrinking-lands-for-tribal-communities'), # 17.2
('/metadata/figures/2562', 'southeast-temperature-observed-and-projected'), # 17.3 # ('/metadata/figures/2562', 'southeast-temperature-observed-and-projected'), # 17.3
('/metadata/figures/2998', 'projected-change-in-number-of-days-over-95-f'), # 17.4 # ('/metadata/figures/2998', 'projected-change-in-number-of-days-over-95-f'), # 17.4
('/metadata/figures/2999', 'projected-change-in-number-of-nights-below-32f'), # 17.5 # ('/metadata/figures/2999', 'projected-change-in-number-of-nights-below-32f'), # 17.5
('/metadata/figures/2857', 'local-planning'), # 17.9 # ('/metadata/figures/2857', 'local-planning'), # 17.9
]), ]),
#Chapter 18 #Chapter 18
('midwest', [ ('midwest', [
...@@ -178,13 +178,13 @@ sync_metadata_tree = { ...@@ -178,13 +178,13 @@ sync_metadata_tree = {
]), ]),
#Chapter 19 #Chapter 19
('great-plains', [ ('great-plains', [
('/metadata/figures/2697', 'temperature-and-precipitation-distribution-in-the-great-plains'), # 19.1 # ('/metadata/figures/2697', 'temperature-and-precipitation-distribution-in-the-great-plains'), # 19.1
('/metadata/figures/2989', 'projected-change-in-number-of-hot-days'), # 19.2 # ('/metadata/figures/2989', 'projected-change-in-number-of-hot-days'), # 19.2
('/metadata/figures/2990', 'projected-change-in-number-of-warm-nights'), # 19.3 # ('/metadata/figures/2990', 'projected-change-in-number-of-warm-nights'), # 19.3
('/metadata/figures/2991', 'projected-change-in-number-of-heavy-precipitation-days'), # 19.4 # ('/metadata/figures/2991', 'projected-change-in-number-of-heavy-precipitation-days'), # 19.4
('/metadata/figures/3002', 'projected-change-in-number-of-consecutive-dry-days'), # 19.5 # ('/metadata/figures/3002', 'projected-change-in-number-of-consecutive-dry-days'), # 19.5
('/metadata/figures/2829', 'increases-in-irrigated-farmland-in-the-great-plains'), # 19.6 # ('/metadata/figures/2829', 'increases-in-irrigated-farmland-in-the-great-plains'), # 19.6
('/metadata/figures/3280', 'historical-and-current-range-of-sage-grouse-habitat') #19.7 # ('/metadata/figures/3280', 'historical-and-current-range-of-sage-grouse-habitat') #19.7
]), ]),
#Chapter 20 #Chapter 20
('southwest', [ ('southwest', [
...@@ -249,12 +249,14 @@ sync_metadata_tree = { ...@@ -249,12 +249,14 @@ sync_metadata_tree = {
('appendix-climate-science-supplement', [ ('appendix-climate-science-supplement', [
('/metadata/figures/3097', 'human-influence-on-the-greenhouse-effect'), #33.1 ('/metadata/figures/3097', 'human-influence-on-the-greenhouse-effect'), #33.1
('/metadata/figures/3112', 'indicators-of-warming-from-multiple-data-sets'), # 33.10 ('/metadata/figures/3112', 'indicators-of-warming-from-multiple-data-sets'), # 33.10
('/metadata/figures/3113', 'precipitation-trends-past-century-past-30-years'), # 33.11
('/metadata/figures/3114', '1700-years-of-global-temperature-from-proxy-data'), # 33.12 ('/metadata/figures/3114', '1700-years-of-global-temperature-from-proxy-data'), # 33.12
('/metadata/figures/2797', 'la-nina-and-el-nino-patterns'), # 33.13 ('/metadata/figures/2797', 'la-nina-and-el-nino-patterns'), # 33.13
('/metadata/figures/3138', 'warming-trend-and-effects-of-el-nino-la-nina'), # 33.14 ('/metadata/figures/3138', 'warming-trend-and-effects-of-el-nino-la-nina'), # 33.14
('/metadata/figures/3140', 'longterm-warming-and-shortterm-variation'), # 33.15 ('/metadata/figures/3140', 'longterm-warming-and-shortterm-variation'), # 33.15
('/metadata/figures/2798', 'detection-and-attribution-as-forensics'), # 33.16 ('/metadata/figures/2798', 'detection-and-attribution-as-forensics'), # 33.16
('/metadata/figures/3301', 'human-influences-apparent-in-many-aspects-of-the-changing-climate'), # 33.17 ('/metadata/figures/3301', 'human-influences-apparent-in-many-aspects-of-the-changing-climate'), # 33.17
('/metadata/figures/3101', 'only-human-influence-can-explain-recent-warming'), # 33.18
('/metadata/figures/3267', 'emissions-concentrations-and-temperature-projections'), # 33.19 ('/metadata/figures/3267', 'emissions-concentrations-and-temperature-projections'), # 33.19
('/metadata/figures/2813', 'earths-energy-balance'), # 33.2 ('/metadata/figures/2813', 'earths-energy-balance'), # 33.2
('/metadata/figures/3141', 'projected-annually-averaged-temperature-change'), # 33.20 ('/metadata/figures/3141', 'projected-annually-averaged-temperature-change'), # 33.20
...@@ -286,10 +288,12 @@ sync_metadata_tree = { ...@@ -286,10 +288,12 @@ sync_metadata_tree = {
('/metadata/figures/3110', 'relative-strengths-of-warming-and-cooling-influences'), # 33.6 ('/metadata/figures/3110', 'relative-strengths-of-warming-and-cooling-influences'), # 33.6
('/metadata/figures/2796', 'development-of-observing-capabilities'), # 33.7 ('/metadata/figures/2796', 'development-of-observing-capabilities'), # 33.7
('/metadata/figures/3093', 'observed-change-in-global-average-temperature'), # 33.8 ('/metadata/figures/3093', 'observed-change-in-global-average-temperature'), # 33.8
('/metadata/figures/3111', 'temperature-trends-past-century-past-30-years') # 33.9
]), ]),
#Chapter 34: FAQ/CAQ #Chapter 34: FAQ/CAQ
('appendix-faqs', [ ('appendix-faqs', [
('/metadata/figures/2663', 'us-annual-temperature'), # 34.1 ('/metadata/figures/2663', 'us-annual-temperature'), # 34.1
('/metadata/figures/3135', 'early-scientists-who-established-the-scientific-basis-for-climate-change'), # 34.10
('/metadata/figures/3096', 'caq-human-influence-on-the-greenhouse-effect'), # 34.11 ('/metadata/figures/3096', 'caq-human-influence-on-the-greenhouse-effect'), # 34.11
('/metadata/figures/3264', 'measurements-of-surface-temperature-and-suns-energy'), # 34.12 ('/metadata/figures/3264', 'measurements-of-surface-temperature-and-suns-energy'), # 34.12
('/metadata/figures/3136', 'caq-carbon-emissions-in-the-industrial-age'), #34.4 ('/metadata/figures/3136', 'caq-carbon-emissions-in-the-industrial-age'), #34.4
...@@ -319,38 +323,34 @@ sync_metadata_tree = { ...@@ -319,38 +323,34 @@ sync_metadata_tree = {
} }
images_with_multiple_figures = { images_with_multiple_figures = {
# 'e13cdf2e-0699-4c52-a642-56c8fc3317c4': ['human-influence-on-the-greenhouse-effect', 'caq-human-influence-on-the-greenhouse-effect'], #33.1 #34.11 'e13cdf2e-0699-4c52-a642-56c8fc3317c4': ['human-influence-on-the-greenhouse-effect', 'caq-human-influence-on-the-greenhouse-effect'], #33.1 #34.11
# '03937439-cc5a-45c7-a0fd-78b863c49979': ['human-influence-on-the-greenhouse-effect', 'caq-human-influence-on-the-greenhouse-effect'], #33.1 #34.11 '03937439-cc5a-45c7-a0fd-78b863c49979': ['human-influence-on-the-greenhouse-effect', 'caq-human-influence-on-the-greenhouse-effect'], #33.1 #34.11
# '0bcb7984-50c0-4f94-9946-c3fa635125a4': ['ten-indicators-of-a-warming-world', 'caq-ten-indicators-of-a-warming-world'], #2.1 #34.2 '0bcb7984-50c0-4f94-9946-c3fa635125a4': ['ten-indicators-of-a-warming-world', 'caq-ten-indicators-of-a-warming-world'], #2.1 #34.2
# 'eb9bd7dc-3e3a-4001-9a64-f2a0763b3f64': ['shells-dissolve-in-acidified-ocean-water', 'ocean-acidification-and-the-food-web'], #2.31 #34.21 'eb9bd7dc-3e3a-4001-9a64-f2a0763b3f64': ['shells-dissolve-in-acidified-ocean-water', 'ocean-acidification-and-the-food-web'], #2.31 #34.21
# '8c679de0-4a6c-4fc9-bbd1-59251ffe3d7f': ['shells-dissolve-in-acidified-ocean-water', 'ocean-acidification-and-the-food-web'], #2.31 #34.21 '8c679de0-4a6c-4fc9-bbd1-59251ffe3d7f': ['shells-dissolve-in-acidified-ocean-water', 'ocean-acidification-and-the-food-web'], #2.31 #34.21
# 'a1bd40f2-424e-4af8-8d3d-f44ba7ba36b6': ['human-influences-apparent-in-many-aspects-of-the-changing-climate', 'caq-human-influences-apparent-in-many-aspects-of-the-changing-climate'], #33.17 #34.13 'a1bd40f2-424e-4af8-8d3d-f44ba7ba36b6': ['human-influences-apparent-in-many-aspects-of-the-changing-climate', 'caq-human-influences-apparent-in-many-aspects-of-the-changing-climate'], #33.17 #34.13
# '834f7624-40de-4a09-9ced-faaca30d4d6d': ['ice-cover-in-the-great-lakes', 'midwest-ice-cover-in-the-great-lakes'], #2.27 #18.7 '834f7624-40de-4a09-9ced-faaca30d4d6d': ['ice-cover-in-the-great-lakes', 'midwest-ice-cover-in-the-great-lakes'], #2.27 #18.7
# 'eab9f2d3-6ebf-40ef-9d9b-fc7f9d62e693': ['cs-trends-in-flood-magnitude', 'trends-in-flood-magnitude'], 'eab9f2d3-6ebf-40ef-9d9b-fc7f9d62e693': ['cs-trends-in-flood-magnitude', 'trends-in-flood-magnitude'],
# 'd6b03280-7a3e-47ab-b109-caffc4bee634': ['projected-temperature-change-of-hottest-and-coldest-days', 'projected-temperature-change-of-hottest-days'], #2.20 #9.4 'd6b03280-7a3e-47ab-b109-caffc4bee634': ['projected-temperature-change-of-hottest-and-coldest-days', 'projected-temperature-change-of-hottest-days'], #2.20 #9.4
# '9015558c-b1ad-4eb2-afe8-c7ea2caee2cd': ['projected-temperature-change-of-hottest-and-coldest-days', 'projected-temperature-change-of-hottest-days'], #2.20 #9.4 '9015558c-b1ad-4eb2-afe8-c7ea2caee2cd': ['projected-temperature-change-of-hottest-and-coldest-days', 'projected-temperature-change-of-hottest-days'], #2.20 #9.4
# 'bdbc59c7-c91e-496f-b4bd-9f584404df97': ['projected-change-in-heavy-precipitation-events', 'health-projected-change-in-heavy-precipitation-events'], #2.19 #9.6 'bdbc59c7-c91e-496f-b4bd-9f584404df97': ['projected-change-in-heavy-precipitation-events', 'health-projected-change-in-heavy-precipitation-events'], #2.19 #9.6
# 'add6d6e7-30f0-4f44-bc2a-5b4a2ee4ce14': ['projected-change-in-heavy-precipitation-events', 'health-projected-change-in-heavy-precipitation-events'], #2.19 #9.6 'add6d6e7-30f0-4f44-bc2a-5b4a2ee4ce14': ['projected-change-in-heavy-precipitation-events', 'health-projected-change-in-heavy-precipitation-events'], #2.19 #9.6
# '47b50ae0-e3d1-4e29-aff7-09de2bdf6648': ['separating-human-and-natural-influences-on-climate', 'caq-separating-human-and-natural-influences-on-climate'], #2.3 #34.15 '47b50ae0-e3d1-4e29-aff7-09de2bdf6648': ['separating-human-and-natural-influences-on-climate', 'caq-separating-human-and-natural-influences-on-climate'], #2.3 #34.15
# 'ebc4e8fb-f987-40da-9bbf-e36802241556': ['caq-carbon-emissions-in-the-industrial-age', 'carbon-emissions-in-the-industrial-age'], #33.3 #34.4 'ebc4e8fb-f987-40da-9bbf-e36802241556': ['caq-carbon-emissions-in-the-industrial-age', 'carbon-emissions-in-the-industrial-age'], #33.3 #34.4
# '2d6fb90b-7d3d-4fce-8f63-36459f80d366': ['projected-annually-averaged-temperature-change', 'observed-and-projected-us-temperature-change'], #33.20 #34.19 '2d6fb90b-7d3d-4fce-8f63-36459f80d366': ['projected-annually-averaged-temperature-change', 'observed-and-projected-us-temperature-change'], #33.20 #34.19
'40d9d5ef-fe78-4d80-bdf8-024cac2c0176': ['observed-change-in-global-average-temperature', 'caq-observed-change-in-global-average-temperature'], #33.8 #34.16 '40d9d5ef-fe78-4d80-bdf8-024cac2c0176': ['observed-change-in-global-average-temperature', 'caq-observed-change-in-global-average-temperature'], #33.8 #34.16
# 'a405fab3-ee62-401c-8d93-347261d9eab9': ['emissions-levels-determine-temperature-rises', 'caq-emissions-levels-determine-temperature-rises'], #2.4 #34.23 'a405fab3-ee62-401c-8d93-347261d9eab9': ['emissions-levels-determine-temperature-rises', 'caq-emissions-levels-determine-temperature-rises'], #2.4 #34.23
# '6dafc8d5-9e40-4dd6-a63d-d456ec61a551': ['emissions-levels-determine-temperature-rises', 'caq-emissions-levels-determine-temperature-rises'], #2.4 #34.23 '6dafc8d5-9e40-4dd6-a63d-d456ec61a551': ['emissions-levels-determine-temperature-rises', 'caq-emissions-levels-determine-temperature-rises'], #2.4 #34.23
} }
def main(): def main():
# print gcis.test_login() print gcis.test_login()
# sync_dataset_metadata(gcis, webform.get_webform('/metadata/figures/3264').images[0].datasets[0:1]) sync(replace=False)
# sync(replace=True) cleanup_after_replace()
# cleanup_after_replace()
count = 0
for x in sync_metadata_tree['nca3']:
count += len(sync_metadata_tree['nca3'][x])
print float(count - 11) / 284.0
def sync(replace=False): def sync(replace=False):
count = 0 count = 0
......
...@@ -579,6 +579,9 @@ class Parent(Gcisbase): ...@@ -579,6 +579,9 @@ class Parent(Gcisbase):
'The Physical Science Basis. Contribution of Working Group I to the Fourth AR4 of IPCC': 'ipcc-wg1-ar5-physical-science-basis', 'The Physical Science Basis. Contribution of Working Group I to the Fourth AR4 of IPCC': 'ipcc-wg1-ar5-physical-science-basis',
'2005 Louisiana Hurricane Impact Atlas': 'lgic-lahurricane-2006', '2005 Louisiana Hurricane Impact Atlas': 'lgic-lahurricane-2006',
'2009 State of the Climate Highlights': 'noaa-stateofclim-2009', '2009 State of the Climate Highlights': 'noaa-stateofclim-2009',
'Climate of the Southeast United States: Variability, change, impacts and vulnerability.': ('book', '7951fbd8-5877-41aa-ae62-9da3eb56b5c5'),
'A Reef Manager\'s Guide to Coral Bleaching': ('book', 'd6f69088-1025-4ce7-b0e1-54ab6403a951'),
'Climate Stabilization Targets: Emissions, Concentrations, and Impacts over Decades to Millennia': ('book', 'f5b281a2-38d2-4633-84db-fd37fa0fb3e6')
}, },
'webpage': { 'webpage': {
...@@ -603,7 +606,8 @@ class Parent(Gcisbase): ...@@ -603,7 +606,8 @@ class Parent(Gcisbase):
'Billion-Dollar Weather/Climate Disasters: Mapping': 'd70d7a59-45d7-4b38-baf2-86a7fcf12da3', 'Billion-Dollar Weather/Climate Disasters: Mapping': 'd70d7a59-45d7-4b38-baf2-86a7fcf12da3',
'Before and After: 50 Years of Rising Tides and Sinking Marshes': '6778161f-897b-4f89-942f-8ad2f01f11a0', 'Before and After: 50 Years of Rising Tides and Sinking Marshes': '6778161f-897b-4f89-942f-8ad2f01f11a0',
'Influence of El Nino and La Nina on Southwest Rainfall': '6d0a1cba-70fe-4fa3-a630-c45409115ab8', 'Influence of El Nino and La Nina on Southwest Rainfall': '6d0a1cba-70fe-4fa3-a630-c45409115ab8',
'Map of Sea Level Trends': '2ab182cc-171d-4edd-9f9f-51e8b4cc2584' 'Map of Sea Level Trends': '2ab182cc-171d-4edd-9f9f-51e8b4cc2584',
'Climate changing our nation\'s landscapes: NOAA, American Public Gardens Association unveil partnership to enhance awareness': 'e4160240-e5ad-41ee-ad56-9cbdaf162369'
}, },
...@@ -618,6 +622,8 @@ class Parent(Gcisbase): ...@@ -618,6 +622,8 @@ class Parent(Gcisbase):
'Climate change impacts of US reactive nitrogen': '10.1073/pnas.1114243109', 'Climate change impacts of US reactive nitrogen': '10.1073/pnas.1114243109',
'Range-wide patterns of greater sage-grouse persistence': '10.1111/j.1472-4642.2008.00502.x', 'Range-wide patterns of greater sage-grouse persistence': '10.1111/j.1472-4642.2008.00502.x',
'Monitoring and understanding changes in heat waves, cold waves, floods and droughts in the United States: State of Knowledge': '10.1175/BAMS-D-12-00066.1', 'Monitoring and understanding changes in heat waves, cold waves, floods and droughts in the United States: State of Knowledge': '10.1175/BAMS-D-12-00066.1',
'How do we know the world has warmed?': '10.1175/BAMS-91-7-StateoftheClimate',
'Attribution of observed historical near-surface temperature variations to anthropogenic and natural causes usingCMIP5simulations': '10.1002/jgrd.50239'
}, },
'book': { 'book': {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment