From 8a491a823075e01d825be08f9876557ae8ee1c69 Mon Sep 17 00:00:00 2001 From: Daniel Ellis Date: Thu, 12 Sep 2024 11:49:48 +0100 Subject: [PATCH] generate source-type --- JSONLD/scripts/source_type.py | 20 ++++++++++++++++++++ MIP_source_type.json | 17 +++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 JSONLD/scripts/source_type.py diff --git a/JSONLD/scripts/source_type.py b/JSONLD/scripts/source_type.py new file mode 100644 index 000000000..824c5bba1 --- /dev/null +++ b/JSONLD/scripts/source_type.py @@ -0,0 +1,20 @@ +from __setup__ import * + +lddata = cmipld.sync(lddata) + +name = 'source_type' + +frame = { + "@type": [ + f"mip:{name.replace('_','-')}", + ], + "@embed":"@always", +} + + +frame = cmipld.Frame(lddata,frame).clean(['rmld','untag']) + +data = cmipld.utils.sorted_dict(frame.keystr('name','description')) + + +cmipld.utils.wjsn(finalise(data,name),base+f'/MIP_{name}.json') \ No newline at end of file diff --git a/MIP_source_type.json b/MIP_source_type.json index 6a3506bee..eefd401d0 100644 --- a/MIP_source_type.json +++ b/MIP_source_type.json @@ -8,18 +8,15 @@ "ISM": "ice-sheet model that includes ice-flow", "LAND": "land model run uncoupled from the atmosphere", "OGCM": "ocean general circulation model run uncoupled from an AGCM but, usually including a sea-ice model", - "RAD": "rad iation component of an atmospheric model run 'offline'", + "RAD": "radiation component of an atmospheric model run 'offline'", "SLAB": "slab-ocean used with an AGCM in representing the atmosphere-ocean coupled system" }, "version_metadata": { - "version_tag": "v6.5.0.1", - "checksum": "md5: 8280247767edbecfec6d0f1814f7e4ee", - "MIP_source_type_modified": "Thu Feb 29 16:22:42 2024 +0000", - "MIP_source_type_note": "Updating versioning and model_components scripts to process files individually.", - "commit": "5bb3c8e69d5d99eb4d61b0ab08e67aff1658fc75", - "previous_commit": "", - "author": "Daniel Ellis", - "CV_collection_version": "v6.5.1.1", - "specs_doc": "v6.5.0" + "version_tag": "v6.5.0.2", + "checksum": "e050a90c2ef4a347b3f0a95103714178", + "commit": "f78f9858580e7ba7603c5f87b14d3e7413acaebd", + "previous_commit": "8255c9ed6dcf953cfdb23952c1f18eb50dd31b86", + "source_type_modified": "Thu, 12 Sep 2024 11:47:59 +0100", + "source_type_note": "generate resolution" } } \ No newline at end of file