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 license_info to models in CMIP6_CV.json #360

Closed
wants to merge 9 commits into from
Closed

Conversation

mauzey1
Copy link
Collaborator

@mauzey1 mauzey1 commented May 24, 2022

@durack1 These changes don't seem to affect the current CMOR usage of the license attribute so I think we can merge these changes now.

@mauzey1 mauzey1 requested a review from durack1 May 24, 2022 21:46
@durack1
Copy link
Contributor

durack1 commented May 24, 2022

@mauzey1 it would be great to catch the license template at https://github.com/PCMDI/cmip6-cmor-tables/blob/master/Tables/CMIP6_input_example.json#L40 and update this to reflect the final string after the "code" in WCRP-CMIP/CMIP6_CVs#1050 (comment)

@mauzey1
Copy link
Collaborator Author

mauzey1 commented May 24, 2022

@durack1 Okay. So we want to have the license template as described in WCRP-CMIP/CMIP6_CVs#1050 (comment) to be in CMIP6_CV.json, and have CMOR fill in the template to populate the license attribute?

@durack1
Copy link
Contributor

durack1 commented May 24, 2022

@mauzey1 I think that would be ideal, so we require inputs from the CMOR users, which are included in the input.json

@mauzey1
Copy link
Collaborator Author

mauzey1 commented May 24, 2022

@durack1 So license_id and license_url come from the user? But those don't get stored in the NetCDF file as license_id and license_ur, right?

@durack1
Copy link
Contributor

durack1 commented May 24, 2022

If we have a user provide two pieces of info institution_id = "AWI" we can look up the text from CMIP6_institution_id.json and license_id = "CC BY 4.0" from the CMIP6_license.json which are all available to CMOR, right? (or do we need to add these to the CMIP6_CV.json)

@mauzey1
Copy link
Collaborator Author

mauzey1 commented May 24, 2022

The current license template is in the script that builds CMIP6_CV.json from the WCRP files.

regexp["license"] = [ "^CMIP6 model data produced by .* is licensed under a Creative Commons Attribution.*ShareAlike 4.0 International License .https://creativecommons.org/licenses.* *Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment\\. *Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file).*\\. *The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose\\. *All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law\\.$" ]

We should replace that with the license template in the JSON file.

    "license":{
        "license":"CMIP6 model data produced by <Your Institution; see CMIP6_institution_id.json> is licensed under a <Creative Commons; select and insert a license_id; see below> License (<insert the matching license_url; see below>). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file)[ and at <some URL maintained by modeling group>]. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.",
        "license_options":{
            "CC BY 4.0":{
                "license_id":"Creative Commons Attribution 4.0 International",
                "license_url":"https://creativecommons.org/licenses/by/4.0/"
            },
            "CC BY-NC-SA 4.0":{
                "license_id":"Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International",
                "license_url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"
            },
            "CC BY-SA 4.0":{
                "license_id":"Creative Commons Attribution-ShareAlike 4.0 International",
                "license_url":"https://creativecommons.org/licenses/by-sa/4.0/"
            },
            "CC0 1.0":{
                "license_id":"Creative Commons CC0 1.0 Universal Public Domain Dedication",
                "license_url":"https://creativecommons.org/publicdomain/zero/1.0/"
            }
        }
    }

This will require a change to CMOR in order to work properly. Previous versions of CMOR will not work after changing the license template.

edit: Changing the license template in CMIP6_CV.json shouldn't affect the current version of CMOR. See #360 (comment)

@mauzey1 mauzey1 marked this pull request as draft May 25, 2022 00:26
@durack1
Copy link
Contributor

durack1 commented May 25, 2022

@mauzey1 thanks for the update. I assumed that we'd need to update CMOR to deal with the new format. I suggest we wrap this into the 3.7.0 changes planned, alongside the tweaks in PCMDI/cmor#628

@taylor13 @matthew-mizielinski pinging you guys here

@mauzey1
Copy link
Collaborator Author

mauzey1 commented May 25, 2022

@durack1 Yes, I have already made an issue for it here: PCMDI/cmor#656

@mauzey1
Copy link
Collaborator Author

mauzey1 commented May 27, 2022

@durack1

After further investigation, changing the license template should not affect the current version of CMOR. I've discovered that CMOR only acquires the license from the user input. Not adding a license attribute to your user input will cause an error in CMOR. CMOR currently ignores the license template from the CV file; deleting the license template from CMIP6_CV.json did not affect CMOR's operation.

This means we could proceed with adding a new license template to the CV file little issue. We can then add the feature to read the template in CMOR later.

Correction: CMOR does use the license template in CMIP6_CV.json, but only for validation of a user-provided license.

@mauzey1
Copy link
Collaborator Author

mauzey1 commented Jun 1, 2022

@durack1 Should we change the template text for the institution name to something that is MIP-neutral for CMOR?
From this...

<Your Institution; see CMIP6_institution_id.json>

to this...

<Your institution's name; see the institution_id section>

We can change the text from within the script that builds CMIP6_CV.json from the WCRP-CMIP files.

@durack1
Copy link
Contributor

durack1 commented Jun 1, 2022

@mauzey1 thanks for catching this, yes please, it would be great for this to be project neutral

@mauzey1 mauzey1 marked this pull request as ready for review June 15, 2022 23:22
@mauzey1
Copy link
Collaborator Author

mauzey1 commented Jun 16, 2022

The reason why the tests are not passing here is because the user input for them is using an outdated version of the license string. The changes from PCMDI/cmor#657 will update those license strings. The tests in that PR are using the CMIP6_CV.json from this branch's PR.

@durack1 As soon as PCMDI/cmor#657 is merged, I will update this PR.

@mauzey1
Copy link
Collaborator Author

mauzey1 commented Jun 17, 2022

@durack1 I will close this PR since these changes are now in the cron_test branch at #366.

@mauzey1 mauzey1 closed this Jun 17, 2022
@durack1
Copy link
Contributor

durack1 commented Jun 17, 2022

@mauzey1 perfect, thanks

@mauzey1 mauzey1 deleted the license_info branch June 17, 2022 16:03
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.

2 participants