JGCRI/demeter

Example data mismatch with demeter version 2.0.0

Closed this issue · 3 comments

Hi, I'd like to use the Demeter model to generate raster land use data. However, when I attempt to download the example data, I encounter some errors, as shown below:

KeyError Traceback (most recent call last)
File ~/anaconda3/lib/python3.11/site-packages/demeter/install_supplement.py:34, in InstallSupplement.fetch_zenodo(self)
33 try:
---> 34 data_link = InstallSupplement.DATA_VERSION_URLS[current_version]
36 except KeyError:
KeyError: '2.0.0'
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
Cell In[11], line 7
4 data_dir = "demeter_case"
6 # download and unzip the package data to your local machine
----> 7 demeter.get_package_data(data_dir)
File ~/anaconda3/lib/python3.11/site-packages/demeter/install_supplement.py:66, in get_package_data(example_data_directory)
53 """Download and unpack example data supplement from Zenodo that matches the current installed
54 distribution.
55
(...)
61
62 """
64 zen = InstallSupplement(example_data_directory)
---> 66 zen.fetch_zenodo()
File ~/anaconda3/lib/python3.11/site-packages/demeter/install_supplement.py:38, in InstallSupplement.fetch_zenodo(self)
36 except KeyError:
37 msg = "Link to data missing for current version: {}. Please contact admin."
---> 38 raise(msg.format(current_version))
40 # retrieve content from URL
41 print("Downloading example data for Demeter version {}...".format(current_version))
TypeError: exceptions must derive from BaseException

It seems that the example data version hasn't been updated with Demeter. I would appreciate it if someone could give me some suggestions.

@debibooo It seems you figured out the error. If not, the example workflow is available here- https://zenodo.org/records/7240315

@kanishkan91 Thanks a lot for your help. I have successfully run the example case. When I substituted the reference projection data with my GCAM projections, I noticed a 25 km^2 discrepancy in the total area of China between the GCAM outputs and the reference CSV projections. Do I need to perform any initialization tasks, or could it be that the GCAM outputs are inaccurate?

@debibooo Well, it may be that the basemap's land value and China's total land value may be different based on definitions of land. For example, the basemap in demeter excludes glaciers, rivulets and other water bodies which can sometimes be included in other land datasets used in GCAM. However 25 km2 seems like a very small discrepancy. That could also be rounding since the GCAM data are initialized in thous km2.