import os
os.environ['ROOK_URL'] = 'http://rook.dkrz.de/wps'
from rooki import rooki
check that subset operator is working
resp = rooki.subset(
collection='c3s-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803',
time='1985-01-01/2014-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-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803',
)
resp.ok
True
resp.download_urls()
['https://data.mips.copernicus-climate.eu/thredds/fileServer/esg_c3s-cmip6/CMIP/IPSL/IPSL-CM6A-LR/historical/r1i1p1f1/Amon/rlds/gr/v20180803/rlds_Amon_IPSL-CM6A-LR_historical_r1i1p1f1_gr_185001-201412.nc']
Error: not available time range
resp = rooki.subset(
collection='c3s-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803',
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-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803'}
False
resp.status
'Process error: No files found in given time range for c3s-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803'
Error: invalid time parameter
resp = rooki.subset(
collection='c3s-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803',
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-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803',
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 could not be identified and force was set to false'}
Process error: The project could not be identified and force was set to false
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 project could not be identified and force was set to false'}
Process error: The project could not be identified and force was set to false
Error: operation failed ...0 meridian not supported
Update: this is solved!
resp = rooki.subset(
collection='c3s-cmip6.CMIP.IPSL.IPSL-CM6A-LR.historical.r1i1p1f1.Amon.rlds.gr.v20180803',
time='1901-01-01/1921-12-30',
area='-20, 40, 20, 70',
)
resp
Metalink URL: http://rook1.cloud.dkrz.de:80/outputs/rook/a7b09ae6-76b3-11eb-94aa-fa163eac7aff/input.meta4, num files: 1