-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
302 changed files
with
5,679 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Load JSON Key Display</title> | ||
<link rel='stylesheet' href='https://bootswatch.com/5/sketchy/bootstrap.css'> | ||
<style> | ||
body { padding:10px; } | ||
h2 { font-size:0.8rem; margin-left: 10px } | ||
h3 { font-size:0.6rem; margin-left: 15px ; color:gray } | ||
p { margin-left: 30px } | ||
pre {border: none; padding:40px} | ||
ul {padding-left: 40px} | ||
</style> | ||
</head> | ||
<body> | ||
<h1 id='title'>Data Descriptor</h1> | ||
<div> | ||
<code id="content"></code> | ||
</div> | ||
|
||
<script src='https://wcrp-cmip.github.io/CMIP-LD/static/404_restful.js'> | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import glob | ||
import json | ||
from collections import OrderedDict | ||
import os | ||
import subprocess | ||
|
||
|
||
|
||
|
||
|
||
remote_url = subprocess.check_output(["git", "remote", "get-url", "origin"], text=True).strip() | ||
user_repo = remote_url.split("github.com")[-1].replace(":", "/").replace(".git", "").strip("/") | ||
pages_url = f"https://{user_repo.split('/')[0]}.github.io/{user_repo.split('/')[1]}" | ||
|
||
# print(remote_url) | ||
# print(user_repo) | ||
# print(pages_url) | ||
# https://github.com/WCRP-CMIP/WCRP-UNIVERSE.git | ||
# WCRP-CMIP/WCRP-UNIVERSE | ||
# https://WCRP-CMIP.github.io/WCRP-UNIVERSE | ||
|
||
|
||
folders = glob.glob('*/') | ||
|
||
|
||
for folder in folders: | ||
print(folder) | ||
files = glob.glob(folder + '*.json') | ||
for file in files: | ||
with open(file, 'r') as f: | ||
|
||
js = json.load(f) | ||
|
||
if '@type' not in js: | ||
continue | ||
js['id'] = file.split('/')[-1] | ||
js['type'] = js['@type'].replace('-', '_') | ||
js['@context'] = f'{pages_url}/data_descriptors/{folder}_context' | ||
del js['@type'], js['@id'] | ||
|
||
js = OrderedDict(sorted(js.items())) | ||
|
||
|
||
json.dump(js, open(file,'w') , indent=4) | ||
# print(file) | ||
|
||
|
||
# context new file | ||
location = f"{pages_url}/data_descriptors/{folder}" | ||
context = { | ||
|
||
"@context": { | ||
"@base": location, | ||
"@vocab": location, | ||
"id": "@id", | ||
"type": "@type" | ||
}, | ||
"@embed": "@always" | ||
} | ||
|
||
json.dump(context, open(f"{folder}_context.json", 'w'), indent=4) | ||
|
||
|
||
os.system('rm -f ' + folder + '*.jsonld') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"@context": { | ||
"id": "@id", | ||
"type": "@type", | ||
"wcrp-universe:": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/", | ||
"mip-variables:": "https://WCRP-CMIP/github.io/MIPvariables/", | ||
"cmip6plus:": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/", | ||
"cmip7:": "https://WCRP-CMIP.github.io/CMIP7_CVs/", | ||
"mip-cmor-tables:": "https://PCMDI.github.io/mip-cmor-tables/", | ||
"cf": "https://WCRP-CMIP.github.io/WCRP-CMIP/CF/" | ||
}, | ||
"@embed": "@always" | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"@context": { | ||
"@base": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/", | ||
"@vocab": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/", | ||
"id": "@id", | ||
"type": "@type", | ||
"cf": "https://WCRP-CMIP.github.io/WCRP-CMIP/CF/", | ||
"cmip6plus": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/", | ||
"cmip7": "https://WCRP-CMIP.github.io/CMIP7_CVs/", | ||
"mip-variables": "https://WCRP-CMIP/github.io/MIPvariables/", | ||
"wcrp-universe": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/" | ||
}, | ||
"@embed": "@always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "cmip", | ||
"@type": "activity", | ||
"description": "CMIP DECK: 1pctCO2, abrupt4xCO2, amip, esm-piControl, esm-historical, historical, and piControl experiments", | ||
"name": "CMIP", | ||
"url": "https://gmd.copernicus.org/articles/9/1937/2016/gmd-9-1937-2016.pdf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "cmip", | ||
"@type": "activity", | ||
"description": "CMIP DECK: 1pctCO2, abrupt4xCO2, amip, esm-piControl, esm-historical, historical, and piControl experiments", | ||
"name": "CMIP", | ||
"url": "https://gmd.copernicus.org/articles/9/1937/2016/gmd-9-1937-2016.pdf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"@context": { | ||
"@base": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/", | ||
"@vocab": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/", | ||
"id": "@id", | ||
"type": "@type", | ||
"cmip6plus:": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/", | ||
"cmip7:": "https://WCRP-CMIP.github.io/CMIP7_CVs/", | ||
"mip-cmor-tables:": "https://PCMDI.github.io/mip-cmor-tables/", | ||
"mip-variables:": "https://WCRP-CMIP/github.io/MIPvariables/", | ||
"wcrp-universe:": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/", | ||
"cf": "https://WCRP-CMIP.github.io/WCRP-CMIP/CF/", | ||
"cmip6plus": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/", | ||
"cmip7": "https://WCRP-CMIP.github.io/CMIP7_CVs/", | ||
"mip-variables": "https://WCRP-CMIP/github.io/MIPvariables/", | ||
"wcrp-universe": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/" | ||
}, | ||
"@graph": [ | ||
{ | ||
"@id": "cmip", | ||
"@type": "activity", | ||
"description": "CMIP DECK: 1pctCO2, abrupt4xCO2, amip, esm-piControl, esm-historical, historical, and piControl experiments", | ||
"name": "CMIP", | ||
"url": "https://gmd.copernicus.org/articles/9/1937/2016/gmd-9-1937-2016.pdf" | ||
}, | ||
{ | ||
"@id": "lesfmip", | ||
"@type": "activity", | ||
"description": "The Large Ensemble Single Forcing Model Intercomparison Project", | ||
"name": "LESFMIP", | ||
"url": "https://www.frontiersin.org/articles/10.3389/fclim.2022.955414/full" | ||
}, | ||
{ | ||
"@id": "ramip", | ||
"@type": "activity", | ||
"description": "Regional Aerosol Model Intercomparison Project", | ||
"name": "RAMIP", | ||
"url": "https://ramip.ncas.ac.uk" | ||
}, | ||
{ | ||
"@id": "tipmip", | ||
"@type": "activity", | ||
"description": "Tipping Point Model Intercomparison Project", | ||
"name": "TIPMIP", | ||
"url": "https://tipmip.pik-potsdam.de/" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"@context": { | ||
"@base": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/", | ||
"@vocab": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/", | ||
"id": "@id", | ||
"type": "@type", | ||
"cmip6plus:": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/", | ||
"cmip7:": "https://WCRP-CMIP.github.io/CMIP7_CVs/", | ||
"mip-cmor-tables:": "https://PCMDI.github.io/mip-cmor-tables/", | ||
"mip-variables:": "https://WCRP-CMIP/github.io/MIPvariables/", | ||
"wcrp-universe:": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/", | ||
"cf": "https://WCRP-CMIP.github.io/WCRP-CMIP/CF/", | ||
"cmip6plus": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/", | ||
"cmip7": "https://WCRP-CMIP.github.io/CMIP7_CVs/", | ||
"mip-variables": "https://WCRP-CMIP/github.io/MIPvariables/", | ||
"wcrp-universe": "https://WCRP-CMIP.github.io/WCRP-UNIVERSE/" | ||
}, | ||
"@graph": [ | ||
{ | ||
"@id": "cmip", | ||
"@type": "activity", | ||
"description": "CMIP DECK: 1pctCO2, abrupt4xCO2, amip, esm-piControl, esm-historical, historical, and piControl experiments", | ||
"name": "CMIP", | ||
"url": "https://gmd.copernicus.org/articles/9/1937/2016/gmd-9-1937-2016.pdf" | ||
}, | ||
{ | ||
"@id": "lesfmip", | ||
"@type": "activity", | ||
"description": "The Large Ensemble Single Forcing Model Intercomparison Project", | ||
"name": "LESFMIP", | ||
"url": "https://www.frontiersin.org/articles/10.3389/fclim.2022.955414/full" | ||
}, | ||
{ | ||
"@id": "ramip", | ||
"@type": "activity", | ||
"description": "Regional Aerosol Model Intercomparison Project", | ||
"name": "RAMIP", | ||
"url": "https://ramip.ncas.ac.uk" | ||
}, | ||
{ | ||
"@id": "tipmip", | ||
"@type": "activity", | ||
"description": "Tipping Point Model Intercomparison Project", | ||
"name": "TIPMIP", | ||
"url": "https://tipmip.pik-potsdam.de/" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"@context":{"@base":"https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/","@vocab":"https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/","id":"@id","type":"@type","cmip6plus:":"https://WCRP-CMIP.github.io/CMIP6Plus_CVs/","cmip7:":"https://WCRP-CMIP.github.io/CMIP7_CVs/","mip-cmor-tables:":"https://PCMDI.github.io/mip-cmor-tables/","mip-variables:":"https://WCRP-CMIP/github.io/MIPvariables/","wcrp-universe:":"https://WCRP-CMIP.github.io/WCRP-UNIVERSE/","cf":"https://WCRP-CMIP.github.io/WCRP-CMIP/CF/","cmip6plus":"https://WCRP-CMIP.github.io/CMIP6Plus_CVs/","cmip7":"https://WCRP-CMIP.github.io/CMIP7_CVs/","mip-variables":"https://WCRP-CMIP/github.io/MIPvariables/","wcrp-universe":"https://WCRP-CMIP.github.io/WCRP-UNIVERSE/"},"@graph":[{"@id":"cmip","@type":"activity","description":"CMIP DECK: 1pctCO2, abrupt4xCO2, amip, esm-piControl, esm-historical, historical, and piControl experiments","name":"CMIP","url":"https://gmd.copernicus.org/articles/9/1937/2016/gmd-9-1937-2016.pdf"},{"@id":"lesfmip","@type":"activity","description":"The Large Ensemble Single Forcing Model Intercomparison Project","name":"LESFMIP","url":"https://www.frontiersin.org/articles/10.3389/fclim.2022.955414/full"},{"@id":"ramip","@type":"activity","description":"Regional Aerosol Model Intercomparison Project","name":"RAMIP","url":"https://ramip.ncas.ac.uk"},{"@id":"tipmip","@type":"activity","description":"Tipping Point Model Intercomparison Project","name":"TIPMIP","url":"https://tipmip.pik-potsdam.de/"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"@context":{"@base":"https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/","@vocab":"https://wcrp-cmip.github.io/WCRP-UNIVERSE/activity/","id":"@id","type":"@type","cmip6plus:":"https://WCRP-CMIP.github.io/CMIP6Plus_CVs/","cmip7:":"https://WCRP-CMIP.github.io/CMIP7_CVs/","mip-cmor-tables:":"https://PCMDI.github.io/mip-cmor-tables/","mip-variables:":"https://WCRP-CMIP/github.io/MIPvariables/","wcrp-universe:":"https://WCRP-CMIP.github.io/WCRP-UNIVERSE/","cf":"https://WCRP-CMIP.github.io/WCRP-CMIP/CF/","cmip6plus":"https://WCRP-CMIP.github.io/CMIP6Plus_CVs/","cmip7":"https://WCRP-CMIP.github.io/CMIP7_CVs/","mip-variables":"https://WCRP-CMIP/github.io/MIPvariables/","wcrp-universe":"https://WCRP-CMIP.github.io/WCRP-UNIVERSE/"},"@graph":[{"@id":"cmip","@type":"activity","description":"CMIP DECK: 1pctCO2, abrupt4xCO2, amip, esm-piControl, esm-historical, historical, and piControl experiments","name":"CMIP","url":"https://gmd.copernicus.org/articles/9/1937/2016/gmd-9-1937-2016.pdf"},{"@id":"lesfmip","@type":"activity","description":"The Large Ensemble Single Forcing Model Intercomparison Project","name":"LESFMIP","url":"https://www.frontiersin.org/articles/10.3389/fclim.2022.955414/full"},{"@id":"ramip","@type":"activity","description":"Regional Aerosol Model Intercomparison Project","name":"RAMIP","url":"https://ramip.ncas.ac.uk"},{"@id":"tipmip","@type":"activity","description":"Tipping Point Model Intercomparison Project","name":"TIPMIP","url":"https://tipmip.pik-potsdam.de/"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "lesfmip", | ||
"@type": "activity", | ||
"description": "The Large Ensemble Single Forcing Model Intercomparison Project", | ||
"name": "LESFMIP", | ||
"url": "https://www.frontiersin.org/articles/10.3389/fclim.2022.955414/full" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "lesfmip", | ||
"@type": "activity", | ||
"description": "The Large Ensemble Single Forcing Model Intercomparison Project", | ||
"name": "LESFMIP", | ||
"url": "https://www.frontiersin.org/articles/10.3389/fclim.2022.955414/full" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "ramip", | ||
"@type": "activity", | ||
"description": "Regional Aerosol Model Intercomparison Project", | ||
"name": "RAMIP", | ||
"url": "https://ramip.ncas.ac.uk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "ramip", | ||
"@type": "activity", | ||
"description": "Regional Aerosol Model Intercomparison Project", | ||
"name": "RAMIP", | ||
"url": "https://ramip.ncas.ac.uk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "tipmip", | ||
"@type": "activity", | ||
"description": "Tipping Point Model Intercomparison Project", | ||
"name": "TIPMIP", | ||
"url": "https://tipmip.pik-potsdam.de/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@id": "tipmip", | ||
"@type": "activity", | ||
"description": "Tipping Point Model Intercomparison Project", | ||
"name": "TIPMIP", | ||
"url": "https://tipmip.pik-potsdam.de/" | ||
} |
Oops, something went wrong.