diff --git a/JSONLD/scripts/organisations.ipynb b/JSONLD/scripts/organisations.ipynb index 2235a1db8..7d1eff404 100644 --- a/JSONLD/scripts/organisations.ipynb +++ b/JSONLD/scripts/organisations.ipynb @@ -28,10 +28,9 @@ "# await lddata\n", "\n", "frame = cmipld.Frame(lddata,frame).clean(['rmld','untag'])\n", - "data = frame.filterkeys(['cmip-acronym','name','ror'],True).keyval('cmip-acronym')\n", "\n", - "# sort dictionary\n", - "data = dict(sorted(data.items()))\n", + "data = cmipld.utils.sorted_dict(frame.filterkeys(['cmip-acronym','name','ror'],True).keyval('cmip-acronym'))\n", + "\n", "import json\n", "json.dump(data,open(base+'/MIP_organisations.json','w'),indent=4)\n" ] diff --git a/JSONLD/scripts/organisations.py b/JSONLD/scripts/organisations.py index ca4d5555a..397d688be 100644 --- a/JSONLD/scripts/organisations.py +++ b/JSONLD/scripts/organisations.py @@ -12,9 +12,8 @@ # await lddata frame = cmipld.Frame(lddata,frame).clean(['rmld','untag']) -data = frame.filterkeys(['cmip-acronym','name','ror'],True).keyval('cmip-acronym') +data = cmipld.utils.sorted_dict(frame.filterkeys(['cmip-acronym','name','ror'],True,'consortium').keyval('cmip-acronym')) -# sort dictionary -data = dict(sorted(data.items())) -import json -json.dump(data,open(base+'/MIP_organisations.json','w'),indent=4) \ No newline at end of file + + +cmipld.utils.wjsn(data,base+'/MIP_organisations.json') \ No newline at end of file diff --git a/MIP_organisations.json b/MIP_organisations.json index 02441cf21..80d4c3dd2 100644 --- a/MIP_organisations.json +++ b/MIP_organisations.json @@ -133,7 +133,7 @@ }, "MIROC": { "name": "MIROC Consortium", - "ror": null + "ror": "consortium" }, "MOHC": { "name": "Met Office", @@ -181,7 +181,7 @@ }, "NCC": { "name": "NCC Consortium", - "ror": null + "ror": "consortium" }, "NERC": { "name": "Natural Environment Research Council", @@ -233,7 +233,7 @@ }, "SOLARIS HEPPA": { "name": "SOLARIS HEPPA Consortium", - "ror": null + "ror": "consortium" }, "THU": { "name": "Tsinghua University",