Skip to content

Commit

Permalink
svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfiex committed Nov 7, 2024
1 parent 786c1fb commit 7d71df6
Show file tree
Hide file tree
Showing 1,479 changed files with 348,351 additions and 10 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added data_descriptors/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no
Binary file added docs/.DS_Store
Binary file not shown.
67 changes: 67 additions & 0 deletions docs/CLD2vIV.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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')
try:
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)
except:
continue

# 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", 'w'), indent=4)


os.system('rm -f ' + folder + '*.jsonld')

11 changes: 11 additions & 0 deletions docs/activity/_context
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"@context": {
"@base": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/activity/",
"@vocab": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/activity/",
"id": "@id",
"type": "@type",
"mip-universe": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/",
"mip-variables": "https://wcrp-cmip.github.io/MIP_variables/"
},
"@embed": "@always"
}
8 changes: 8 additions & 0 deletions docs/activity/cmip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/activity/_context",
"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"
}
8 changes: 8 additions & 0 deletions docs/activity/lesfmip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/activity/_context",
"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"
}
27 changes: 27 additions & 0 deletions docs/core/_context
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"@context": {
"@base": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/core/",
"@vocab": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/core/",
"id": "@id",
"type": "@type",
"mip-universe": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/",
"mip-variables": "https://wcrp-cmip.github.io/MIP_variables/",
"drs": {
"@context": "cmip6plus:core/_context",
"@container": "@index"
},
"index": {
"@context": "cmip6plus:core/_context",
"@container": "@index"
},
"mip-era": {
"@context": "mip-cmor-tables:auxillary/mip-era/_context",
"@container": "@index"
},
"product": {
"@context": "mip-cmor-tables:auxillary/product/_context",
"@container": "@index"
}
},
"@embed": "@always"
}
132 changes: 132 additions & 0 deletions docs/core/descriptors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"@context": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/core/_context",
"id": "descriptors",
"type": "core",
"drs": {
"drs": {}
},
"index": {
"index": {}
},
"license": [
"^CMIP6Plus model data produced by .* is licensed under a Creative Commons .* License (https://creativecommons\\.org/.*)\\. *Consult https://pcmdi\\.llnl\\.gov/CMIP6Plus/TermsOfUse for terms of use governing CMIP6Plus output, including citation requirements and proper acknowledgment\\. *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\\.$"
],
"mip-era": {
"cmip6plus": {}
},
"product": {
"model-output": {}
},
"required-global-attributes": [
"Conventions",
"activity_id",
"creation_date",
"data_specs_version",
"experiment",
"experiment_id",
"forcing_index",
"frequency",
"grid",
"grid_label",
"initialization_index",
"institution",
"institution_id",
"license",
"mip_era",
"nominal_resolution",
"physics_index",
"realization_index",
"realm",
"source",
"source_id",
"source_type",
"sub_experiment",
"sub_experiment_id",
"table_id",
"tracking_id",
"variable_id",
"variant_label"
],
"table_id": [
"ACmon",
"ACmonZ",
"AE1hr",
"AE3hrPt",
"AE3hrPtLev",
"AE6hr",
"AE6hrPt",
"AE6hrPtLev",
"AEday",
"AEmon",
"AEmonLev",
"AEmonZ",
"AEsubhrPt",
"AEsubhrPtSite",
"AP1hr",
"AP1hrPt",
"AP3hr",
"AP3hrPt",
"AP3hrPtLev",
"AP6hr",
"AP6hrPt",
"AP6hrPtLev",
"AP6hrPtZ",
"APday",
"APdayLev",
"APdayZ",
"APfx",
"APmon",
"APmonClim",
"APmonClimLev",
"APmonDiurnal",
"APmonLev",
"APmonZ",
"APsubhrPt",
"APsubhrPtLev",
"APsubhrPtSite",
"GIAfx",
"GIAmon",
"GIAyr",
"GIGfx",
"GIGmon",
"GIGyr",
"LI3hrPt",
"LI6hrPt",
"LIday",
"LIfx",
"LImon",
"LIsubhrPtSite",
"LP3hr",
"LP3hrPt",
"LP6hrPt",
"LPday",
"LPfx",
"LPmon",
"LPyr",
"LPyrPt",
"OBday",
"OBmon",
"OBmonLev",
"OByr",
"OByrLev",
"OP3hrPt",
"OPday",
"OPdec",
"OPdecLev",
"OPdecZ",
"OPfx",
"OPmon",
"OPmonClim",
"OPmonClimLev",
"OPmonLev",
"OPmonZ",
"OPyr",
"OPyrLev",
"SIday",
"SImon",
"SImonPt"
],
"tracking-id": [
"hdl:21.14100/.*"
]
}
11 changes: 11 additions & 0 deletions docs/core/drs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"@context": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/core/_context",
"id": "drs",
"type": "core",
"directory-path-example": "CMIP6Plus/CMIP/MOHC/HadGEM3-GC31-MM/historical/r1i1p1f3/Amon/tas/gn/v20191207/",
"directory-path-sub-experiment-example": "CMIP6Plus/DCPP/MOHC/HadGEM3-GC31-MM/dcppA-hindcast/s1960-r1i1p1f2/Amon/tas/gn/v20200417/",
"directory-path-template": "<mip_era>/<activity_id>/<institution_id>/<source_id>/<experiment_id>/<member_id>/<table_id>/<variable_id>/<grid_label>/<version>",
"filename-example": "tas_Amon_HadGEM3-GC31-MM_historical_r1i1p1f3_gn_185001-186912.nc",
"filename-sub-experiment-example": "tas_Amon_HadGEM3-GC31-MM_dcppA-hindcast_s1960-r1i1p1f2_gn_196011-196012.nc",
"filename-template": "<variable_id>_<table_id>_<source_id>_<experiment_id >_<member_id>_<grid_label>[_<time_range>].nc"
}
23 changes: 23 additions & 0 deletions docs/core/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"@context": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/core/_context",
"id": "index",
"type": "core",
"conventions": [
"^CF-1.7 CMIP-6.[0-2,5]\\( UGRID-1.0\\)\\{0,\\}$"
],
"forcing-index": [
"^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$"
],
"initialization-index": [
"^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$"
],
"physics-index": [
"^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$"
],
"realization-index": [
"^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$"
],
"variant-label": [
"r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$"
]
}
46 changes: 46 additions & 0 deletions docs/experiment/1pctco2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"@context": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/experiment/_context",
"id": "1pctco2",
"type": "experiment",
"activity": [
{
"cmip": {}
}
],
"description": "DECK: 1pctCO2",
"model_realms": {
"aogcm": {
"is_required": true
},
"aer": {
"is_required": false
},
"chem": {
"is_required": false
},
"bgc": {
"is_required": false
}
},
"name": "1pctCO2",
"parameters": {
"end": -999,
"min-number-yrs-per-sim": 150,
"start": -999,
"id": "additional_parameters"
},
"parent_activity": [
{
"cmip": {}
}
],
"parent_experiment": [
{
"picontrol": {}
}
],
"sub_experiment": {
"none": {}
},
"tier": 1
}
11 changes: 11 additions & 0 deletions docs/experiment/_context
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"@context": {
"@base": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/experiment/",
"@vocab": "https://WCRP-CMIP.github.io/CMIP6Plus_CVs/experiment/",
"id": "@id",
"type": "@type",
"mip-universe": "https://wcrp-cmip.github.io/WCRP-UNIVERSE/",
"mip-variables": "https://wcrp-cmip.github.io/MIP_variables/"
},
"@embed": "@always"
}
Loading

0 comments on commit 7d71df6

Please sign in to comment.