#!/usr/bin/env python # coding: utf-8 # # Test: subset SAM0-UNICON/historical # # * Project: c3s-cmip6 # * Variable: pr # * Frequency: day # * *Complete* files # In[ ]: import os os.environ['ROOK_URL'] = 'http://rook.dkrz.de/wps' from rooki import operators as ops # In[ ]: wf = ops.Subset( ops.Input( 'cmip6', ['c3s-cmip6.CMIP.SNU.SAM0-UNICON.historical.r1i1p1f1.day.pr.gn.v20190323'] ), ) # In[ ]: resp = wf.orchestrate() assert resp.ok # In[ ]: resp.download_urls() # In[ ]: assert 'https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cmip6' in resp.download_urls()[0] assert 'pr_day_SAM0-UNICON_historical_r1i1p1f1_gn_18500101-18501231.nc' in resp.download_urls()[0] # In[ ]: assert 'https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cmip6' in resp.download_urls()[0] # In[ ]: assert resp.num_files == 165, resp.num_files # In[ ]: # TODO: file size needs fix ... new catalog assert int(resp.size_in_mb) == 0, resp.size_in_mb # Provenance: # * expected duration=1 sec # In[ ]: resp.provenance()