#!/usr/bin/env python # coding: utf-8 # # Run workfow with subset chain # # **Rooki** calls climate data operations on the **rook** processing service. # ## workflow with subset chain # In[ ]: import os os.environ['ROOK_URL'] = 'http://rook.dkrz.de/wps' from rooki import operators as ops # In[ ]: wf = ops.Subset( ops.Subset( ops.Input( 'tas', ['c3s-cmip6.ScenarioMIP.INM.INM-CM5-0.ssp245.r1i1p1f1.day.tas.gr1.v20190619'] ), time="2016-01-01/2020-12-30", ), time="2017-01-01/2017-12-30", ) # In[ ]: resp = wf.orchestrate() resp # **metalink output** # In[ ]: print(resp.xml) # **Size in MBytes** # In[ ]: resp.size_in_mb # **URLs in metalink document ...** # In[ ]: resp.download_urls() # **... and open with xarray** # In[ ]: ds = resp.datasets()[0] ds # **provenance** # In[ ]: from IPython.display import Image Image(resp.provenance_image())