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

order in required_global_attributes matters #737

Open
larsbuntemeyer opened this issue Apr 12, 2024 · 1 comment
Open

order in required_global_attributes matters #737

larsbuntemeyer opened this issue Apr 12, 2024 · 1 comment

Comments

@larsbuntemeyer
Copy link

larsbuntemeyer commented Apr 12, 2024

Just wanted to dump this here, since we now have fixed our required global attributes for CORDEX. I'm not sure if it's by intention, but it seems like the order of variables in the required_global_attributes tables seems to matter when they are evaluated during cmorization. This is probably related to #628. For example, if if have...

{
    "CV": {
        "required_global_attributes": [
            "domain_id",
            "domain",
        ],
        "domain_id": {
            "EUR-50": {
                "domain": "Europe",
                "domain_id": "EUR-50"
            }
        }
    }
}

... and my input dataset file contains domain_id: "EUR-50", cmor will correctly and automatically add the global attributes domain: "Europe" to the file. However, this wil not work if the domain attribute comes before the domain_id attribute in the list of required_global_attributes, e.g., this will not work...

"required_global_attributes": [
       "domain",
       "domain_id",
],

This is somehow confusing and it's not the case for attributes like, e.g., source_id and source....

@larsbuntemeyer larsbuntemeyer changed the title order in "required_global_attrbitues" matters order in required_global_attrbitues matters Apr 12, 2024
@larsbuntemeyer
Copy link
Author

Sorry, I'll try to provide a minmal example, but, e.g., see here...

@larsbuntemeyer larsbuntemeyer changed the title order in required_global_attrbitues matters order in required_global_attributes matters May 7, 2024
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

No branches or pull requests

1 participant