Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update chunking_introduction.ipynb #9

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

pl-marasco
Copy link
Collaborator

single kerchunk file doesn't require .open_mfdataset but only .open_dateset

single kerchunk file doesn't require .open_mfdataset but only  .open_dateset
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pl-marasco
Copy link
Collaborator Author

Also added a new link to the GAUL repository

@pl-marasco pl-marasco requested a review from acocac October 18, 2023 07:22
@review-notebook-app
Copy link

review-notebook-app bot commented Oct 18, 2023

View / edit / reply to this conversation on ReviewNB

acocac commented on 2023-10-18T09:26:40Z
----------------------------------------------------------------

Would it be possible to add a heading to this cell and the following one e.g. Load packages. We can also add some markdown describing the cells first check certain libraries such as openeo are available in the virtual environment. If not, this is installed via mamba.


pl-marasco commented on 2023-10-18T10:00:25Z
----------------------------------------------------------------

I would consider not that usefull but I will

@review-notebook-app
Copy link

review-notebook-app bot commented Oct 18, 2023

View / edit / reply to this conversation on ReviewNB

acocac commented on 2023-10-18T09:26:41Z
----------------------------------------------------------------

This should be a markdown cell and not raw.


pl-marasco commented on 2023-10-18T10:01:18Z
----------------------------------------------------------------

that's definetly a mistake indeed.

@review-notebook-app
Copy link

review-notebook-app bot commented Oct 18, 2023

View / edit / reply to this conversation on ReviewNB

acocac commented on 2023-10-18T09:26:42Z
----------------------------------------------------------------

I got the following error:

---------------------------------------------------------------------------
OpenEoApiError                            Traceback (most recent call last)
Input In [10], in <cell line: 1>()
----> 1 datacube.download(f"C_GLS_NDVI_20220101_20220701_{AOI_name}_S3_2.nc", format="NetCDF")

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/datacube.py:1964, in DataCube.download(self, outputfile, format, options)
1962 format = guess_format(outputfile)
1963 cube = self._ensure_save_result(format=format, options=options)
-> 1964 return self._connection.download(cube.flat_graph(), outputfile)

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/connection.py:1495, in Connection.download(self, graph, outputfile, timeout)
1484 """
1485 Downloads the result of a process graph synchronously,
1486 and save the result to the given file or return bytes object if no outputfile is specified.
(...)
1492 :param timeout: timeout to wait for response
1493 """
1494 request = self._build_request_with_process_graph(process_graph=graph)
-> 1495 response = self.post(
1496 path="/result",
1497 json=request,
1498 expected_status=200,
1499 stream=True,
1500 timeout=timeout or DEFAULT_TIMEOUT_SYNCHRONOUS_EXECUTE,
1501 )
1503 if outputfile is not None:
1504 with Path(outputfile).open(mode="wb") as f:

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/connection.py:210, in RestApiConnection.post(self, path, json, **kwargs)
202 def post(self, path: str, json: Optional[dict] = None, **kwargs) -> Response:
203 """
204 Do POST request to REST API.
205
(...)
208 :return: response: Response
209 """
--> 210 return self.request("post", path=path, json=json, allow_redirects=False, **kwargs)

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/connection.py:747, in Connection.request(self, method, path, headers, auth, check_error, expected_status, **kwargs)
740 return super(Connection, self).request(
741 method=method, path=path, headers=headers, auth=auth,
742 check_error=check_error, expected_status=expected_status, **kwargs,
743 )
745 try:
746 # Initial request attempt
--> 747 return _request()
748 except OpenEoApiError as api_exc:
749 if api_exc.http_status_code == 403 and api_exc.code == "TokenInvalid":
750 # Auth token expired: can we refresh?

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/connection.py:740, in Connection.request.<locals>._request()
739 def _request():
--> 740 return super(Connection, self).request(
741 method=method, path=path, headers=headers, auth=auth,
742 check_error=check_error, expected_status=expected_status, **kwargs,
743 )

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/connection.py:158, in RestApiConnection.request(self, method, path, headers, auth, check_error, expected_status, **kwargs)
156 expected_status = ensure_list(expected_status) if expected_status else []
157 if check_error and status >= 400 and status not in expected_status:
--> 158 self._raise_api_error(resp)
159 if expected_status and status not in expected_status:
160 raise OpenEoRestError("Got status code {s!r} for {m} {p} (expected {e!r}) with body {body}".format(
161 m=method.upper(), p=path, s=status, e=expected_status, body=resp.text)
162 )

File /srv/conda/envs/notebook/lib/python3.9/site-packages/openeo/rest/connection.py:189, in RestApiConnection._raise_api_error(self, response)
187 else:
188 exception = OpenEoApiError(http_status_code=status_code, message=text)
--> 189 raise exception

OpenEoApiError: [401] unknown: You do not have sufficient credits to perform this request. Please visit https://portal.terrascope.be/pages/pricing to find more information on how to buy additional credits.



pl-marasco commented on 2023-10-18T09:57:52Z
----------------------------------------------------------------

Right, as I was pointg during the discussion with the OpenEO guys it's not anymore possible to use the VITO's backend for free and credit's are now in place. Up to now I don't know other backend and I've to test other solution.

I would leave this as it is.

Morover this is not a notebook that will be used in the workshop but the purpose was only to let Michele follow the overall processing flow.

acocac commented on 2023-10-18T12:39:56Z
----------------------------------------------------------------

Great - It makes then sense to leave as it's. fyi, the wildfire notebook won't be used too. However, I've implemented the changes suggested by Michele.

Copy link
Member

@acocac acocac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pl-marasco
Thanks for working on these notebooks.
The chunking notebook works fine.
The xarray handson notebook requires some work. Please check my comments through ReviewNB.

Copy link
Collaborator Author

Right, as I was pointg during the discussion with the OpenEO guys it's not anymore possible to use the VITO's backend for free and credit's are now in place. Up to now I don't know other backend and I've to test other solution.

I would leave this as it is.

Morover this is not a notebook that will be used in the workshop but the purpose was only to let Michele follow the overall processing flow.


View entire conversation on ReviewNB

Copy link
Collaborator Author

I would consider not that usefull but I will


View entire conversation on ReviewNB

Copy link
Collaborator Author

that's definetly a mistake indeed.


View entire conversation on ReviewNB

Copy link
Member

acocac commented Oct 18, 2023

Great - It makes then sense to leave as it's. fyi, the wildfire notebook won't be used too. However, I've implemented the changes suggested by Michele.


View entire conversation on ReviewNB

@tinaok
Copy link
Collaborator

tinaok commented Oct 24, 2023

@acocac @pl-marasco can you please confirm that I can merge?

@acocac
Copy link
Member

acocac commented Oct 24, 2023

@acocac @pl-marasco can you please confirm that I can merge?

All is ok. The suggested changes affect mainly one of the notebooks within the example folder.

@acocac acocac merged commit de9bb09 into pangeo-data:main Oct 24, 2023
1 check passed
@pl-marasco pl-marasco deleted the pl-marasco-patch-1 branch October 25, 2023 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants