Skip to content

Instantly share code, notes, and snippets.

@stephenpascoe
Created January 21, 2013 12:40
Show Gist options
  • Select an option

  • Save stephenpascoe/4585769 to your computer and use it in GitHub Desktop.

Select an option

Save stephenpascoe/4585769 to your computer and use it in GitHub Desktop.
Find all CMIP5 datasets from MPI-M in 4 lines of Python. A simple example of using esgf-pyclient
from pyesgf.search import SearchConnection
conn = SearchConnection('http://esgf-index1.ceda.ac.uk/esg-search/search', distrib=True)
ctx = conn.new_context(latest=True, institute='MPI-M')
for result in ctx.search():
print result.json['master_id'], result.json['version']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment