icenet-ai / icenet-notebooks

A set of notebooks instructing and demonstrating usage of the IceNet core library.
MIT License
2 stars 5 forks source link

Issue with ERA5 downloader #6

Closed SamuelHall700 closed 1 year ago

SamuelHall700 commented 1 year ago

running the ERA5 downloader results in this error message. A folder data/era5 has been created, but it's empty

(icenet) samhall@bs-samhall-l1:~/repos/icenet-pipeline$ icenet_data_era5 south -d --vars uas,vas,tas,zg --levels ',,,500|250' 2020-1-1 2020-4-30
[18-05-23 14:09:34 :INFO    ] - ERA5 Data Downloading
[18-05-23 14:09:34 :WARNING ] - !!! Deletions of temp files are switched off: be careful with this, you need to manage your files manually
[18-05-23 14:09:34 :INFO    ] - Building request(s), downloading and daily averaging from ERA5 API
[18-05-23 14:09:34 :INFO    ] - Processing single download for uas @ None with 121 dates
[18-05-23 14:09:34 :INFO    ] - Processing single download for vas @ None with 121 dates
[18-05-23 14:09:34 :INFO    ] - Processing single download for tas @ None with 121 dates
[18-05-23 14:09:34 :INFO    ] - Downloading data for tas...
[18-05-23 14:09:34 :INFO    ] - Processing single download for zg @ 500 with 121 dates
[18-05-23 14:09:34 :INFO    ] - Downloading data for vas...
[18-05-23 14:09:34 :INFO    ] - Processing single download for zg @ 250 with 121 dates
[18-05-23 14:09:34 :INFO    ] - Downloading data for uas...
[18-05-23 14:09:34 :INFO    ] - Downloading data for zg500...
[18-05-23 14:09:34 :INFO    ] - Downloading data for zg250...
2023-05-18 14:09:34,776 INFO Welcome to the CDS
[18-05-23 14:09:34 :INFO    ] - Welcome to the CDS
2023-05-18 14:09:34,776 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels
[18-05-23 14:09:34 :INFO    ] - Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels
2023-05-18 14:09:34,789 INFO Welcome to the CDS
[18-05-23 14:09:34 :INFO    ] - Welcome to the CDS
2023-05-18 14:09:34,789 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
[18-05-23 14:09:34 :INFO    ] - Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
2023-05-18 14:09:34,795 INFO Welcome to the CDS
[18-05-23 14:09:34 :INFO    ] - Welcome to the CDS
2023-05-18 14:09:34,795 INFO Welcome to the CDS
[18-05-23 14:09:34 :INFO    ] - Welcome to the CDS
2023-05-18 14:09:34,796 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
[18-05-23 14:09:34 :INFO    ] - Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
2023-05-18 14:09:34,796 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
[18-05-23 14:09:34 :INFO    ] - Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels
2023-05-18 14:09:34,796 INFO Welcome to the CDS
[18-05-23 14:09:34 :INFO    ] - Welcome to the CDS
2023-05-18 14:09:34,799 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels
[18-05-23 14:09:34 :INFO    ] - Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels
[18-05-23 14:09:34 :ERROR   ] - /tmp/tmpe3s8wred/latlon_2020.nc.download not deleted, look at the problem
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - Thread failure: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 231, in download
    future.result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 269, in _single_download
    self.download_method(var,
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 191, in _single_api_download
    raise RuntimeError(e)
RuntimeError: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - /tmp/tmp3pw_gmc0/latlon_2020.nc.download not deleted, look at the problem
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - Thread failure: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 231, in download
    future.result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 269, in _single_download
    self.download_method(var,
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 191, in _single_api_download
    raise RuntimeError(e)
RuntimeError: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - /tmp/tmpbpbx0ioi/latlon_2020.nc.download not deleted, look at the problem
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - /tmp/tmpkahzi12j/latlon_2020.nc.download not deleted, look at the problem
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - Thread failure: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 231, in download
    future.result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 269, in _single_download
    self.download_method(var,
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 191, in _single_api_download
    raise RuntimeError(e)
RuntimeError: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - Thread failure: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 231, in download
    future.result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 269, in _single_download
    self.download_method(var,
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 191, in _single_api_download
    raise RuntimeError(e)
RuntimeError: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - /tmp/tmp822emc_2/latlon_2020.nc.download not deleted, look at the problem
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :ERROR   ] - Thread failure: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
Traceback (most recent call last):
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 442, in _api
    result.raise_for_status()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 185, in _single_api_download
    self.client.retrieve(dataset, retrieve_dict, download_path)
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 364, in retrieve
    result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/site-packages/cdsapi/api.py", line 464, in _api
    raise Exception(error)
Exception: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 231, in download
    future.result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/samhall/miniconda3/envs/icenet/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py", line 269, in _single_download
    self.download_method(var,
  File "/home/samhall/repos/icenet/icenet/data/interfaces/cds.py", line 191, in _single_api_download
    raise RuntimeError(e)
RuntimeError: Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
[18-05-23 14:09:34 :INFO    ] - 0 daily files downloaded
[18-05-23 14:09:34 :INFO    ] - No regrid batches to processing, moving on...
[18-05-23 14:09:34 :INFO    ] - Rotating wind data prior to merging
/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py:367: FutureWarning: Ignoring a datum in netCDF load for consistency with existing behaviour. In a future version of Iris, this datum will be applied. To apply the datum when loading, use the iris.FUTURE.datum_support flag.
  iris.load_cube(sic_day_path, 'sea_ice_area_fraction')
/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py:367: FutureWarning: Ignoring a datum in netCDF load for consistency with existing behaviour. In a future version of Iris, this datum will be applied. To apply the datum when loading, use the iris.FUTURE.datum_support flag.
  iris.load_cube(sic_day_path, 'sea_ice_area_fraction')
/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py:367: FutureWarning: Ignoring a datum in netCDF load for consistency with existing behaviour. In a future version of Iris, this datum will be applied. To apply the datum when loading, use the iris.FUTURE.datum_support flag.
  iris.load_cube(sic_day_path, 'sea_ice_area_fraction')
/home/samhall/repos/icenet/icenet/data/interfaces/downloader.py:367: FutureWarning: Ignoring a datum in netCDF load for consistency with existing behaviour. In a future version of Iris, this datum will be applied. To apply the datum when loading, use the iris.FUTURE.datum_support flag.
  iris.load_cube(sic_day_path, 'sea_ice_area_fraction')
[18-05-23 14:09:35 :INFO    ] - Rotating wind data in ./data/era5/south/uas ./data/era5/south/vas
[18-05-23 14:09:35 :INFO    ] - 0 files for uas
[18-05-23 14:09:35 :INFO    ] - 0 files for vas
(icenet) samhall@bs-samhall-l1:~/repos/icenet-pipeline$

It's returning a 403 error when calling the API, so I'm assuming it's a problem with my API key

JimCircadian commented 1 year ago

Thanks for raising Sam! As discussed please have a look at Client has not agreed to the required terms and conditions.. To access this resource, you first need to accept the termsof 'Licence to use Copernicus Products' at https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products

JimCircadian commented 1 year ago

I'll close this for the moment @SamuelHall700, if it remains an issue please let me know!