Skip to content

CMIP6 Unable to parse the time values entered #48

Description

@mendezr

I want to download CMIP6 a subset data between two dates using the cdsapi but didn't have success.

I tried to download with this configuration:

c.retrieve(
    'projections-cmip6',
    {
        'temporal_resolution': 'daily',
        'experiment': 'ssp5_8_5',
        'level': 'single_levels',
        'variable': 'precipitation',
        'model': 'cmcc_esm2',
        'date': '2020-01-01/2050-01-01',
        'format': 'zip',
    },
    'download.zip'

When I run the code below, got this error:

2021-11-30 15:06:50,278 INFO Welcome to the CDS
2021-11-30 15:06:50,278 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/projections-cmip6
2021-11-30 15:06:50,340 INFO Request is queued
2021-11-30 15:06:51,397 INFO Request is running
2021-11-30 15:07:03,855 INFO Request is failed
2021-11-30 15:07:03,855 ERROR Message: an internal error occurred processing your request
2021-11-30 15:07:03,855 ERROR Reason:  Process error: Unable to parse the time values entered
2021-11-30 15:07:03,856 ERROR   Traceback (most recent call last):
2021-11-30 15:07:03,856 ERROR     File "/usr/local/lib/python3.6/site-packages/rooki/results.py", line 33, in url
2021-11-30 15:07:03,856 ERROR       return self.response.get()[0]
2021-11-30 15:07:03,856 ERROR     File "/usr/local/lib/python3.6/site-packages/birdy/client/outputs.py", line 30, in get
2021-11-30 15:07:03,856 ERROR       raise ProcessFailed("Sorry, process failed.")
2021-11-30 15:07:03,856 ERROR   birdy.exceptions.ProcessFailed: Sorry, process failed.
Traceback (most recent call last):
  File "/PROJECTES/PUBLICDATA/adaptation/ejemplo.py", line 83, in <module>
    retrieve_data(target, model, period, date=requestDates)
  File "/PROJECTES/PUBLICDATA/adaptation/ejemplo.py", line 34, in retrieve_data
    c.retrieve(
  File "/home/isglobal.lan/rmendez/.conda/envs/tools/lib/python3.9/site-packages/cdsapi/api.py", line 348, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/isglobal.lan/rmendez/.conda/envs/tools/lib/python3.9/site-packages/cdsapi/api.py", line 506, in _api
    raise Exception(
Exception: an internal error occurred processing your request. Process error: Unable to parse the time values entered.

Also tried to use the toolbox request and got this error:

Traceback (most recent call last):
  File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 55, in handle_request
    result = cached(context.method, proc, context, context.args, context.kwargs)
  File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
    result = proc(context, *context.args, **context.kwargs)
  File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 118, in __call__
    return p(*args, **kwargs)
  File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 59, in __call__
    return self.proc(context, *args, **kwargs)
  File "/home/cds/cdsservices/services/retrieve.py", line 198, in execute
    remote = context.call_resource(name, request, update_specific_metadata={'app_scope': 'adaptor'})
  File "/opt/cdstoolbox/cdscompute/cdscompute/context.py", line 307, in call_resource
    return c.call_resource(service, *args, **kwargs).value
  File "/opt/cdstoolbox/cdsworkflows/cdsworkflows/future.py", line 76, in value
    raise self._result
cdsworkflows.error.ClientError: {'traceback': 'Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/rooki/results.py", line 33, in url
    return self.response.get()[0]
  File "/usr/local/lib/python3.6/site-packages/birdy/client/outputs.py", line 30, in get
    raise ProcessFailed("Sorry, process failed.")
birdy.exceptions.ProcessFailed: Sorry, process failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cds/cdsservices/services/esgf_wps/requests.py", line 60, in process
    results = response.download_urls()
  File "/usr/local/lib/python3.6/site-packages/rooki/results.py", line 78, in download_urls
    return [url.text for url in self.doc.find_all("metaurl")]
  File "/usr/local/lib/python3.6/site-packages/rooki/results.py", line 47, in doc
    self._doc = BeautifulSoup(self.xml, "xml")
  File "/usr/local/lib/python3.6/site-packages/rooki/results.py", line 41, in xml
    raise Exception(f"Could not download metalink document. {e}")
Exception: Could not download metalink document. Sorry, process failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/cds/cdsinf/python/lib/cdsinf/runner/dispatcher.py", line 616, in handle_request
    context.get("method_config", None))
  File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 55, in handle_request
    result = cached(context.method, proc, context, context.args, context.kwargs)
  File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
    result = proc(context, *context.args, **context.kwargs)
  File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 118, in __call__
    return p(*args, **kwargs)
  File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 59, in __call__
    return self.proc(context, *args, **kwargs)
  File "/home/cds/cdsservices/services/esgf_wps/__init__.py", line 41, in execute
    result = requests.process(context, request_facets, request, **process_kwargs)
  File "/home/cds/cdsservices/services/esgf_wps/requests.py", line 64, in process
    raise Exception(message)
Exception: Process error: Unable to parse the time values entered
'}

If I didn't select the date parameter (the whole available temporal range), the API works and the file is downloaded.

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions