from rooki import rooki
check that subset operator is working
resp = rooki.subset(
collection='c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
time='1860-01-01/1900-12-30',
)
resp.ok
True
Error: missing collection parameter
try:
resp = rooki.subset()
except TypeError as e:
print(f"{e}")
subset() missing 1 required positional argument: 'collection'
Check which time range is available
resp = rooki.subset(
collection='c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
)
resp.ok
True
resp.download_urls()
['http://cp4cds-cn1.dkrz.de:80/outputs/rook/c726f584-f902-11ea-9c4f-f2e4655a10b7/tas_day_EC-EARTH_historical_r1i1p1_18500101-20091130.nc']
Error: not available time range
resp = rooki.subset(
collection='c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
time='2100-01-01/2200-12-30',
)
resp.ok
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: No files found in given time range for c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest'}
False
resp.status
'Process error: No files found in given time range for c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest'
Error: invalid time parameter
resp = rooki.subset(
collection='c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
time='1900-01-01',
)
resp
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: TimeParameter should be passed in as a range separated by /'}
Process error: TimeParameter should be passed in as a range separated by /
resp = rooki.subset(
collection='c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
time='today',
)
resp
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: TimeParameter should be passed in as a range separated by /'}
Process error: TimeParameter should be passed in as a range separated by /
Error: not available collection ... c3s-cmip7
resp = rooki.subset(
collection='c3s-cmip7.output1.MOHC.HadGEM2-ES.rcp85.mon.atmos.Amon.r1i1p1.latest.tas',
time='2085-01-01/2120-12-30',
)
resp
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: The project supplied is not known.'}
Process error: The project supplied is not known.
Error: invalid collection parameter
resp = rooki.subset(
collection='c3s-cmip5/tas',
time='2085-01-01/2120-12-30',
)
resp
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: The format of c3s-cmip5/tas is not known.'}
Process error: The format of c3s-cmip5/tas is not known.
Error: invalid data selection ... output1001
resp = rooki.subset(
collection='c3s-cmip5.output1001.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
)
resp
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: no files to open'}
Process error: no files to open
Error: operation failed ...0 meridian not supported
Open issue: https://github.com/roocs/clisops/issues/35
resp = rooki.subset(
collection='c3s-cmip5.output1.ICHEC.EC-EARTH.historical.day.atmos.day.r1i1p1.tas.latest',
time='1901-01-01/1921-12-30',
area='-20, 40, 20, 70',
)
resp
owslib.wps.WPSException : {'code': 'NoApplicableCode', 'locator': 'None', 'text': 'Process error: Input longitude bounds -20. 20. cross the 0 degree meridian but dataset longitudes are all positive.'}
Process error: Input longitude bounds -20. 20. cross the 0 degree meridian but dataset longitudes are all positive.