Commit afec4fa2 authored by Kennedy, Joseph H's avatar Kennedy, Joseph H
Browse files

Update much of the data documentation

* More details in many READMEs
* Bibtex files for all data
* html2bib now can combine multiple bib files

Also fix a bad racmo data path
parent 646dec49
# coding=utf-8
from __future__ import absolute_import, print_function, unicode_literals
import six
import pybtex.database
import pybtex.io
......@@ -10,35 +15,100 @@ class HTMLBackend(BaseBackend):
super(HTMLBackend, self).__init__(*args, **kwargs)
self._html = ''
def output(self, html):
self._html += html
def format_protected(self, text):
if text[:4] == 'http':
return self.format_href(text, text)
else:
return r'<span class="bibtex-protected">{}</span>'.format(text)
def write_prologue(self):
self.output('<div class="bibliography"><dl>')
def write_epilogue(self):
self.output('</dl></div>')
def _repr_html(self, formatted_bibliography):
self.write_prologue()
for entry in formatted_bibliography:
self.write_entry(entry.key, entry.label, entry.text.render(self))
self.write_epilogue()
return self._html.replace('\n', ' ').replace('\\url <a', '<a')
def bib2html(bib_file):
style = PlainStyle()
backend = HTMLBackend()
# FIXME: For python 3.7+ only...
# from functools import singledispatch
# from collections.abc import Iterable
#
# # noinspection PyUnusedLocal
# @singledispatch
# def bib2html(bib, style=None, backend=None):
# raise NotImplementedError('I do not now how to convert a {} type to a bibliography'.format(type(bib)))
def bib2html(bib, style=None, backend=None):
if isinstance(bib, six.string_types):
return _bib2html_string(bib, style=style, backend=backend)
if isinstance(bib, (list, set, tuple)):
return _bib2html_list(bib, style=style, backend=backend)
if isinstance(bib, pybtex.database.BibliographyData):
return _bib2html_bibdata(bib, style=style, backend=backend)
else:
raise NotImplementedError('I do not now how to convert a {} type to a bibliography'.format(type(bib)))
# FIXME: For python 3.7+ only...
# @bib2html.register
# def _bib2html_string(bib: str, style=None, backend=None):
def _bib2html_string(bib, style=None, backend=None):
if style is None:
style = PlainStyle()
if backend is None:
backend = HTMLBackend()
formatted_bib = style.format_bibliography(pybtex.database.parse_file(bib))
return backend._repr_html(formatted_bib)
# FIXME: For python 3.7+ only...
# @bib2html.register
# def _bib2html_list(bib: Iterable, style=None, backend=None):
def _bib2html_list(bib, style=None, backend=None):
if style is None:
style = PlainStyle()
if backend is None:
backend = HTMLBackend()
bibliography = pybtex.database.BibliographyData()
for bib_file in bib:
temp_bib = pybtex.database.parse_file(bib_file)
for key, entry in temp_bib.entries.items():
try:
bibliography.add_entry(key, entry)
except pybtex.database.BibliographyDataError:
continue
formatted_bib = style.format_bibliography(bibliography)
return backend._repr_html(formatted_bib)
# FIXME: For python 3.7+ only...
# @bib2html.register
# def _bib2html_bibdata(bib: pybtex.database.BibliographyData, style=None, backend=None):
def _bib2html_bibdata(bib, style=None, backend=None):
if style is None:
style = PlainStyle()
if backend is None:
backend = HTMLBackend()
formatted_bib = style.format_bibliography(bib)
bib = pybtex.database.parse_file(bib_file)
fbib = style.format_bibliography(bib)
return backend._repr_html(fbib)
return backend._repr_html(formatted_bib)
{
"clouds_cesm" : {
"module" : "clouds/clouds.py",
"references" : "clouds/clouds_model.bib",
"references" : ["data/clouds/cloudsat/Kay2009.bib",
"data/clouds/isccp/Rossow1999.bib",
"data/cism/glissade/cism-glissade.bib",
"data/cesm/cesm.bib",
"data/livvkit.bib"],
"atm_glob": "data/cesm/atm/b.e10.BG20TRCN.f09_g16.002_??_aavg_climo.nc",
"atm_climo": "data/cesm/atm/b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc",
"glc_surf": "data/cism/glissade/Greenland_5km_v1.1_SacksRev_c110629.nc",
......
{
"clouds_e3sm" : {
"module" : "clouds/clouds.py",
"references" : "clouds/clouds_model.bib",
"references" : ["data/clouds/cloudsat/Kay2009.bib",
"data/clouds/isccp/Rossow1999.bib",
"data/cism/glissade/cism-glissade.bib",
"data/e3sm/Evans2019.bib",
"data/livvkit.bib"],
"atm_glob": "data/e3sm/atm/20180612.B_case.T62_oEC60to30v3wLI.modified_runoff_mapping.edison_??_aavg_climo.nc",
"atm_climo": "data/e3sm/atm/20180612.B_case.T62_oEC60to30v3wLI.modified_runoff_mapping.edison_JJA_climo.nc",
"glc_surf": "data/cism/glissade/Greenland_5km_v1.1_SacksRev_c110629.nc",
......
@article {Kennedy2017,
AUTHOR = {Kennedy, Joseph H. and Bennett, Andrew R. and Evans, Katherine J. and Price, Stephen and Hoffman, Matthew and Lipscomb, William H. and Fyke, Jeremy and Vargo, Lauren and Boghozian, Adrianna and Norman, Matthew and Worley, Patrick H.},
TITLE = {LIVVkit: An extensible, python-based, land ice verification and validation toolkit for ice sheet models},
JOURNAL = {Journal of Advances in Modeling Earth Systems},
VOLUME = {9},
NUMBER = {2},
ISSN = {1942-2466},
DOI = {10.1002/2017MS000916},
PAGES = {854--869},
YEAR = {2017},
}
@Article{isccp99,
AUTHOR = {R. B. Rossow and R.A. Schiffer},
title = {Advances in understanding clouds from ISCCP},
YEAR = {1999},
JOURNAL = {Bulletin of the American Meteorological Society},
VOLUME = {80},
DOI = {10.1175/1520-0477(1999)080<2261:AIUCFI>2.0.CO;2},
PAGES = {2261--2287}
}
@article {kg09,
AUTHOR = {Kay, Jennifer E. and Gettelman, Andrew},
TITLE = {Cloud influence on and response to seasonal Arctic sea ice loss},
JOURNAL = {Journal of Geophysical Research: Atmospheres},
VOLUME = {114},
NUMBER = {D18},
DOI = {10.1029/2009JD011773},
YEAR = {2009},
NOTE = {D18204},
}
\ No newline at end of file
......@@ -21,7 +21,12 @@ Please include the following references when using this data:
and van den Broeke, M. R.: Greenland Surface Mass Balance as Simulated by
the Community Earth System Model. Part I: Model Evaluation and 1850–2005
Results, J. Climate, 26, 7993–7812, 2013.
`doi:10.1175/JCLI-D-12-00615.1 <https://doi.org/10.1175/JCLI-D-12-00615.1>`_.
`doi:10.1175/JCLI-D-12-00615.1 <https://doi.org/10.1175/JCLI-D-12-00615.1>`_.
This citation has been provided in BibTeX form in the
``$LEX/data/cesm/cesm.bib``
file with ``Evans2019`` and ``Vizicaino2013`` as the citation keys, and will be
rendered in the references section on the output website.
Subdirectories
--------------
......
@Article{Evans2019,
AUTHOR = {Evans, K. J. and Kennedy, J. H. and Lu, D. and Forrester, M. M. and Price, S. and Fyke, J. and Bennett, A. R. and Hoffman, M. J. and Tezaur, I. and Zender, C. S. and Vizcaíno, M.},
TITLE = {LIVVkit 2.1: Automated and extensible ice sheet model validation},
JOURNAL = {Geoscientific Model Development Discussions},
VOLUME = {2018},
YEAR = {2018},
PAGES = {1--31},
URL = {https://www.geosci-model-dev-discuss.net/gmd-2018-70/},
DOI = {10.5194/gmd-2018-70}
}
@article{Vizcaino2013,
author = {Vizcaíno, Miren and Lipscomb, William H. and Sacks, William J. and van Angelen, Jan H. and Wouters, Bert and van den Broeke, Michiel R.},
title = {Greenland Surface Mass Balance as Simulated by the Community Earth System Model. Part I: Model Evaluation and 1850–2005 Results},
journal = {Journal of Climate},
volume = {26},
number = {20},
pages = {7793-7812},
year = {2013},
doi = {10.1175/JCLI-D-12-00615.1},
URL = {https://doi.org/10.1175/JCLI-D-12-00615.1}
}
......@@ -13,7 +13,7 @@ Usage
Because this data is intended as an example only, it is not recommended for
scientific analyses. However, if you do use any part of this data, please
include the following reference when using this dataset:
include the following references when using this dataset:
S. F. Price, M. J. Hoffman, J. A. Bonin, I. M. Howat, T. Neumann, J. Saba,
I. Tezaur, J. Guerber, D. P. Chambers, K. J. Evans, J. H. Kennedy,
......@@ -23,8 +23,24 @@ include the following reference when using this dataset:
255-270, 2017.
`doi:10.5194/gmd-10-255-2017 <https://doi.org/10.5194/gmd-10-255-2017>`_.
This citation has been provided in BibTeX form in the ``gmd-10-255-2017.bib``
file with ``Price2017`` as the citation key, and will be rendered in the
Joughin, I., B. Smith, I. Howat, and T. Scambos. 2010. MEaSUREs Greenland
Ice Sheet Velocity Map from InSAR Data, Version 1. Boulder, Colorado USA.
NASA National Snow and Ice Data Center Distributed Active Archive Center.
`doi:10.5067/MEASURES/CRYOSPHERE/nsidc-0478.001 <https://doi.org/10.5067/MEASURES/CRYOSPHERE/nsidc-0478.001>`_.
Joughin, I., Smith, B., Howat, I., Scambos, T., & Moon, T. (2010). Greenland
flow variability from ice-sheet-wide velocity mapping. Journal of Glaciology,
56(197), 415-430.
`doi:10.3189/002214310792447734 <https://doi.org/10.3189/002214310792447734>`_.
van Angelen, J.H., van den Broeke, M.R., Wouters, B. and Lenaerts, J. T. M.
Contemporary (19602012) Evolution of the Climate and Surface Mass Balance
of the Greenland Ice Sheet. Surv Geophys (2014) 35: 1155.
`doi:10.1007/s10712-013-9261-z <https://doi.org/10.1007/s10712-013-9261-z>`_.
These citations have been provided in BibTeX form in the ``gmd-10-255-2017.bib``
file with ``Price2017``, ``insar2010b``, ``insar2010a``, ``racmo20`` as the
citation keys, respectively. These references will be rendered in the
references section on the output website.
......
@article {Kennedy2017,
AUTHOR = {Kennedy, Joseph H. and Bennett, Andrew R. and Evans, Katherine J. and Price, Stephen and Hoffman, Matthew and Lipscomb, William H. and Fyke, Jeremy and Vargo, Lauren and Boghozian, Adrianna and Norman, Matthew and Worley, Patrick H.},
TITLE = {LIVVkit: An extensible, python-based, land ice verification and validation toolkit for ice sheet models},
JOURNAL = {Journal of Advances in Modeling Earth Systems},
VOLUME = {9},
NUMBER = {2},
ISSN = {1942-2466},
DOI = {10.1002/2017MS000916},
PAGES = {854--869},
YEAR = {2017},
}
@misc{Zwally2012,
AUTHOR = {H. Jay Zwally and Mario B. Giovinetto and Matthew A. Beckley and Jack L. Saba},
TITLE = {Antarctic and Greenland Drainage Systems},
NOTE = {GSFC Cryospheric Sciences Laboratory},
HOWPUBLISHED = {\url{http://icesat4.gsfc.nasa.gov/cryo_data/ant_grn_drainage_systems.php}},
YEAR = {2012}
@Article{Price2017,
AUTHOR = {Price, S. F. and Hoffman, M. J. and Bonin, J. A. and Howat, I. M. and Neumann, T. and Saba, J. and Tezaur, I. and Guerber, J. and Chambers, D. P. and Evans, K. J. and Kennedy, J. H. and Lenaerts, J. and Lipscomb, W. H. and Perego, M. and Salinger, A. G. and Tuminaro, R. S. and van den Broeke, M. R. and Nowicki, S. M. J.},
TITLE = {An ice sheet model validation framework for the Greenland ice sheet},
JOURNAL = {Geoscientific Model Development},
VOLUME = {10},
YEAR = {2017},
NUMBER = {1},
PAGES = {255--270},
URL = {https://www.geosci-model-dev.net/10/255/2017/},
DOI = {10.5194/gmd-10-255-2017}
}
@techreport{insar2010b,
......@@ -49,13 +40,3 @@
YEAR = {2013},
PAGES = {1155--1174}
}
@article{noel15 ,
AUTHOR = {B. N{\"o}el and W. J. van de Berg and E. van Meijgaard and P. Kuipers Munneke and R. S. W. van de Wal and M. R. van den Broeke},
TITLE = {Evaluation of the updated regional climate model RACMO2.3: summer snowfall impact on the Greenland ice sheet},
JOURNAL = {The Cryosphere},
YEAR = {2015},
DOI = {10.5194/tc-9-1831-2015},
VOLUME = {9},
PAGES = {1831--1844}
}
@Article{Price2017,
AUTHOR = {Price, S. F. and Hoffman, M. J. and Bonin, J. A. and Howat, I. M. and Neumann, T. and Saba, J. and Tezaur, I. and Guerber, J. and Chambers, D. P. and Evans, K. J. and Kennedy, J. H. and Lenaerts, J. and Lipscomb, W. H. and Perego, M. and Salinger, A. G. and Tuminaro, R. S. and van den Broeke, M. R. and Nowicki, S. M. J.},
TITLE = {An ice sheet model validation framework for the Greenland ice sheet},
JOURNAL = {Geoscientific Model Development},
VOLUME = {10},
YEAR = {2017},
NUMBER = {1},
PAGES = {255--270},
URL = {https://www.geosci-model-dev.net/10/255/2017/},
DOI = {10.5194/gmd-10-255-2017}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ Usage
Because this data is intended as input only, it is not recommended for
scientific analyses. However, if you do use any part of this data, please
include the following reference when using this dataset:
include the following references when using this dataset:
Lipscomb, W. H., Price, S. F., Hoffman, M. J., Leguy, G. R., Bennett, A. R.,
Bradley, S. L., Evans, K. J., Fyke, J. G., Kennedy, J. H., Perego, M.,
......@@ -18,8 +18,24 @@ include the following reference when using this dataset:
Geosci. Model Dev. Discuss., in review, 2018.
`doi:10.5194/gmd-2018-151 <https://doi.org/10.5194/gmd-2018-151>`_.
This citation has been provided in BibTeX form in the ``gmd-2018-151.bib``
file with ``Lipscomb2018`` as the citation key, and will be rendered in the
Joughin, I., B. Smith, I. Howat, and T. Scambos. 2010. MEaSUREs Greenland
Ice Sheet Velocity Map from InSAR Data, Version 1. Boulder, Colorado USA.
NASA National Snow and Ice Data Center Distributed Active Archive Center.
`doi:10.5067/MEASURES/CRYOSPHERE/nsidc-0478.001 <https://doi.org/10.5067/MEASURES/CRYOSPHERE/nsidc-0478.001>`_.
Joughin, I., Smith, B., Howat, I., Scambos, T., & Moon, T. (2010). Greenland
flow variability from ice-sheet-wide velocity mapping. Journal of Glaciology,
56(197), 415-430.
`doi:10.3189/002214310792447734 <https://doi.org/10.3189/002214310792447734>`_.
van Angelen, J.H., van den Broeke, M.R., Wouters, B. and Lenaerts, J. T. M.
Contemporary (1960–2012) Evolution of the Climate and Surface Mass Balance
of the Greenland Ice Sheet. Surv Geophys (2014) 35: 1155.
`doi:10.1007/s10712-013-9261-z <https://doi.org/10.1007/s10712-013-9261-z>`_.
These citations have been provided in BibTeX form in the ``gmd-2018-151.bib``
file with ``Lipscomb2018``, ``insar2010b``, ``insar2010a``, ``racmo20`` as the
citation keys, respectively. These references will be rendered in the
references section on the output website.
......
......@@ -8,4 +8,35 @@ YEAR = {2018},
PAGES = {1--65},
URL = {https://www.geosci-model-dev-discuss.net/gmd-2018-151/},
DOI = {10.5194/gmd-2018-151}
}
\ No newline at end of file
}
@techreport{insar2010b,
AUTHOR = {Joughin, I. and B. Smith and I. Howat and T. Scambos},
TITLE = {{MEaSUREs Greenland Ice Velocity Map from InSAR Data}},
INSTITUTION = {National Snow and Ice Data Center},
ADDRESS = {Boulder, Colorado USA},
URL = {http://nsidc.org/data/docs/measures/nsidc0478_joughin/},
YEAR = {2010},
MONTH = {April},
DOI = {10.5067/MEASURES/CRYOSPHERE/nsidc-0478.001}
}
@Article{insar2010a,
AUTHOR = {Joughin, I. and B. Smith and I. M. Howat and T. Scambos and T. Moon},
TITLE = {Greenland Flow Variability from Ice-Sheet-Wide Velocity Mapping},
JOURNAL = {Journal of Glaciology},
VOLUME = {56},
YEAR = {2010},
PAGES = {415--430},
DOI = {10.3189/002214310792447734}
}
@article{racmo20,
AUTHOR = {van Angelen, J. H. and M.R. Van Den Broeke and B. Wouters and J. T. M. Lenaerts},
TITLE = {Contemporary (1960–2012) Evolution of the Climate and Surface Mass Balance of the Greenland Ice Sheet},
JOURNAL = {Surv. Geophys.},
DOI = {10.1007/s10712-013-9261-z},
VOLUME = {35},
YEAR = {2013},
PAGES = {1155--1174}
}
......@@ -2,9 +2,10 @@
author = {Kay, Jennifer E. and Gettelman, Andrew},
title = {Cloud influence on and response to seasonal Arctic sea ice loss},
journal = {Journal of Geophysical Research: Atmospheres},
year = 2009,
volume = {114},
number = {D18},
pages = {},
pages = {204},
keywords = {clouds, sea ice, Arctic},
doi = {10.1029/2009JD011773},
url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2009JD011773},
......
@Article{Evans2019,
AUTHOR = {Evans, K. J. and Kennedy, J. H. and Lu, D. and Forrester, M. M. and Price, S. and Fyke, J. and Bennett, A. R. and Hoffman, M. J. and Tezaur, I. and Zender, C. S. and Vizcaíno, M.},
TITLE = {LIVVkit 2.1: Automated and extensible ice sheet model validation},
JOURNAL = {Geoscientific Model Development Discussions},
VOLUME = {2018},
YEAR = {2018},
PAGES = {1--31},
URL = {https://www.geosci-model-dev-discuss.net/gmd-2018-70/},
DOI = {10.5194/gmd-2018-70}
}
......@@ -20,6 +20,10 @@ include the following reference when using this dataset:
Geosci. Model Dev. Discuss., in review, 2018.
`doi:10.5194/gmd-2018-70 <https://doi.org/10.5194/gmd-2018-70>`_.
This citation has been provided in BibTeX form in the
``$LEX/data/e3sm/Evans2019.bib``
file with ``Evans2019`` as the citation key, and will be
rendered in the references section on the output website.
Subdirectories
--------------
......
......@@ -9,3 +9,14 @@
PAGES = {854--869},
YEAR = {2017},
}
@Article{Evans2019,
AUTHOR = {Evans, K. J. and Kennedy, J. H. and Lu, D. and Forrester, M. M. and Price, S. and Fyke, J. and Bennett, A. R. and Hoffman, M. J. and Tezaur, I. and Zender, C. S. and Vizcaíno, M.},
TITLE = {LIVVkit 2.1: Automated and extensible ice sheet model validation},
JOURNAL = {Geoscientific Model Development Discussions},
VOLUME = {2018},
YEAR = {2018},
PAGES = {1--31},
URL = {https://www.geosci-model-dev-discuss.net/gmd-2018-70/},
DOI = {10.5194/gmd-2018-70}
}
@Article{Noel2015,
AUTHOR = {No\"el, B. and van de Berg, W. J. and van Meijgaard, E. and Kuipers Munneke, P. and van de Wal, R. S. W. and van den Broeke, M. R.},
TITLE = {Evaluation of the updated regional climate model RACMO2.3: summer snowfall impact on the Greenland Ice Sheet},
JOURNAL = {The Cryosphere},
VOLUME = {9},
YEAR = {2015},
NUMBER = {5},
PAGES = {1831--1844},
URL = {https://www.the-cryosphere.net/9/1831/2015/},
DOI = {10.5194/tc-9-1831-2015}
}
......@@ -16,7 +16,7 @@ Please include the following reference when using this dataset:
The Cryosphere, 9:1831–1844, 2015.
`do:10.5194/tc-9-1831-2015 <https://doi.org/10.5194/tc-9-1831-2015>`_.
This citation has been provided in BibTeX form in the ``data/racmo/racmo23.bib``
This citation has been provided in BibTeX form in the ``data/racmo/Noel2015.bib``
file with ``Noel2015`` as the citation key, and will be rendered in the
references section on the output website.
......
......@@ -20,7 +20,7 @@ PLease include the following reference when using these measurements:
Journal of Geophysical Research: Atmospheres, 114(D6):D06116, 2009.
`doi:10.1029/2008JD011208 <https://doi.org/10.1029/2008JD011208>`_.
This citation has been provided in BibTeX form in the ``smb/smb_icecores.bib``
This citation has been provided in BibTeX form in the ``$LEX/data/smb/smb_icecores.bib``
file with ``Bales2009`` as the citation key, and will be rendered in the
references section on the output website.
......
......@@ -15,7 +15,7 @@ PLease include the following reference when using these measurements:
*Journal of Geophysical Research: Atmospheres*, 109(D18):D18101, 2004.
`doi:10.1029/2003JD004449 <https://doi.org/10.1029/2003JD004449>`_.
This citation has been provided in BibTeX form in the ``smb/smb_icecores.bib``
This citation has been provided in BibTeX form in the ``$LEX/data/smb/smb_icecores.bib``
file with ``Cogley2004`` as the citation key, and will be rendered in the
references section on the output website.
......
......@@ -17,7 +17,7 @@ PLease include the following reference when using these measurements:
airborne accumulation radar. The Cryosphere, 11(2):773–788, 2017.
`doi:10.5194/tc-11-773-2017 <https://doi.org/10.5194/tc-11-773-2017>`_.
This citation has been provided in BibTeX form in the ``smb/smb_icecores.bib``
This citation has been provided in BibTeX form in the ``$LEX/data/smb/smb_icecores.bib``
file with ``Lewis2017`` as the citation key, and will be rendered in the
references section on the output website.
......
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