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

Add sanity checks for variables? #51

Open
orichters opened this issue Feb 9, 2024 · 1 comment
Open

Add sanity checks for variables? #51

orichters opened this issue Feb 9, 2024 · 1 comment
Labels
question Further information is requested

Comments

@orichters
Copy link
Contributor

Dear @danielhuppmann,

I wonder whether it is planned or advisable to add some "sanity checks" for variables:

- Consumption:
    description: total consumption of all goods, by all consumers in a region
    unit: billion US$2010/yr
    min: 0
- Consumption Share|Food:
    description: share of consumption allocated to food
    unit: %
    min: 0
    max: 100

There were such attempts in CDLINKS and I think that would be really useful (and could in the future also be checked in the submission process):

@orichters orichters added the question Further information is requested label Feb 9, 2024
@danielhuppmann
Copy link
Member

Yes, and pyam v2.1 added a validate() method that will be able to directly use attributes as in your suggestion. Just need some free time on our hands to implement it in nomenclature, and come up with a good syntax for the yaml files: shares should always be between 0 and 100, but global CO2 emissions should be between 35000 and 45000 Mt only in 2020 (but not apply the validation to other years).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants