Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

cate no longer opening Sea Level datasets #846

Open
cipogh opened this issue Jun 26, 2019 · 8 comments
Open

cate no longer opening Sea Level datasets #846

cipogh opened this issue Jun 26, 2019 · 8 comments
Assignees
Labels
Milestone

Comments

@cipogh
Copy link

cipogh commented Jun 26, 2019

Please read this carefully before submitting a new issue:

  1. Make sure the issue you are about to report has not been reported before!
  2. If you are allowed to assign labels, please
    • Use label "support_request" if you have a question
    • Use label "help_wanted" if you are a Cate developer and you have an issue that falls
      completely in your scope of activity, but with which you are stuck with and need help with.
    • Use label "discussion" for an issue that doesn't warrant code changes right away,
      but is rather meant as a place for discussion on how to solve a particular problem.
  3. The following template should be used for reporting bugs, inconsistencies, and feature requests.
    Note that you can use hashtag followed by issue number to refer to other issues (e.g. Provide template for new issues #234) and
    use the add character followed by a GitHub user name (e.g. @forman) to refer to other users.

Expected behavior

I expected cate to download the CCI Sea Level Datasets avaiable on ODP, i.e. esacci.SEALEVEL.*

Actual behavior

cate gives Invalid Reponse (not JSON-serializable)

Steps to reproduce the problem

  1. try to download a sea level dataset

Specifications

Traceback (most recent call last):
File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/site-packages/cate/util/web/jsonrpchandler.py", line 278, in _write_json_rpc_response
json_text = json.dumps(json_rpc_response)
File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type DatetimeJulian is not JSON serializable

@cipogh
Copy link
Author

cipogh commented Jun 26, 2019

In addition to my issue report - I v'e noticed I have the same issue (not JSON-serializable) also with LOCAL copies of the Sea Level datasets that used to be loaded correctly with the previous version of cate

@cipogh
Copy link
Author

cipogh commented Jun 26, 2019

Further addition: as with previous versions of cate I had not experienced this issue I just reverted to 2.0.0 rev20, which I am 100% sure was working fine for me (MacOS) at the time, and tire to load Sea Level and Ocean Colour CCI data both locally and from the Open Data Portal. In all cases I now get this JSON error ("TypeError: Object of type DatetimeJulian is not JSON serializable"). Note that the ODP datasets are indeed downloaded locally - so they are found, but the issue is in trying to open them. I have therefore edited the issue title

@cipogh cipogh changed the title cate no longer downloading esacci.SEALEVEL.* datasets cate no longer opening datasets Jun 26, 2019
@esacci
Copy link

esacci commented Jul 1, 2019

Title too broad & unspecific; implies no datasets loading at all.

@cipogh cipogh changed the title cate no longer opening datasets cate no longer opening Sea Level datasets Jul 1, 2019
@cipogh
Copy link
Author

cipogh commented Jul 1, 2019

Title amended to delimit issue, summarised again below

We get this error
TypeError: Object of type DatetimeJulian is not JSON serializable

when trying to open any of the esacci.SEALEVEL.*. files from ODP

Some problem happens trying to open local copies of esacci.SEALEVEL.*

@forman
Copy link
Member

forman commented Sep 30, 2019

@cipogh, still having the same problem?

@cipogh
Copy link
Author

cipogh commented Sep 30, 2019

@forman yes, I have just checked and I am still having the same "not JSON serializable" both with ODP and local Sea Level datasets.

@forman
Copy link
Member

forman commented Sep 30, 2019

And if you move away the data folder or specify a new one, does the problem persist?

Issue may be related to some updates in Cate's library dependencies, as this used to work before and there where no code changes since then.

@forman forman added the bug label Sep 30, 2019
@forman forman added this to the 3.0 milestone Apr 29, 2021
@forman forman self-assigned this May 4, 2021
@TonioF
Copy link
Contributor

TonioF commented May 18, 2021

Although we now have a total of 25 Sea Level datasets, it seems that none of them is supported perfectly. At best, we can open the dataset but only extract the same time value for all time steps (his happens, for most datasets with a monthly resolution). For datasets with a 10-day resolution, no valid timestamps can be derived. Then there are other datasets that have no lat and lon but dimensions as nbpoints or nbcycles.

It seems this issue is closely associated with esa-cci/xcube-cci#12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants