diff --git a/Tables/CMIP6Plus_CV.json b/Tables/CMIP6Plus_CV.json index 37f65b442..28fc082d5 100644 --- a/Tables/CMIP6Plus_CV.json +++ b/Tables/CMIP6Plus_CV.json @@ -1,7 +1,7 @@ { "DRS": { - "directory_path_example": "CMIP6/CMIP/MOHC/HadGEM3-GC31-MM/historical/r1i1p1f3/Amon/tas/gn/v20191207/", - "directory_path_sub_experiment_example": "CMIP6/DCPP/MOHC/HadGEM3-GC31-MM/dcppA-hindcast/s1960-r1i1p1f2/Amon/tas/gn/v20200417/", + "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": "/////////", "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", @@ -7871,7 +7871,7 @@ "https://furtherinfo.es-doc.org/.*" ], "license": [ - "^CMIP6 model data produced by .* is licensed under a Creative Commons .* License (https://creativecommons\\.org/.*)\\. *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\\.$" + "^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\\. *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\\.$" ], "mip_era": "CMIP6Plus", "required_global_attributes": [ @@ -11251,7 +11251,7 @@ "CV_collection_modified": "2022-09-05", "CV_collection_version": "6.3.0.0", "author": "Matt Mizielinski ", - "checksum": "md5: 2df90b953ab04a1688212335e61c948e", + "checksum": "md5: 18eda695660d8e337af5183fc2c80a4d", "institution_id": "MOHC", "previous_commit": "To be added", "specs_doc": "v6.3.0 (link TBC)" diff --git a/src/exploration/CMIP6_variable_remap.ipynb b/src/exploration/CMIP6_variable_remap.ipynb index ba8a10514..dd9e585e3 100644 --- a/src/exploration/CMIP6_variable_remap.ipynb +++ b/src/exploration/CMIP6_variable_remap.ipynb @@ -20,6 +20,7 @@ "import json, os\n", "from collections import defaultdict\n", "from copy import copy, deepcopy\n", + "import glob\n", "import shutil\n", "import hashlib\n", "\n", @@ -1428,7 +1429,10 @@ "outputs": [], "source": [ "for filename in os.listdir(OUTPUT_LOCATION):\n", - " os.unlink(os.path.join(OUTPUT_LOCATION, filename))" + " try:\n", + " os.unlink(os.path.join(OUTPUT_LOCATION, filename))\n", + " except IsADirectoryError:\n", + " pass" ] }, { @@ -2034,9 +2038,12 @@ "\n", "# update CMIP6Plus CVs\n", "\n", - "project_cv_data['DRS']['directory_path_example'].replace('CMIP6', 'CMIP6Plus')\n", - "project_cv_data['DRS']['directory_path_sub_experiment_example'].replace('CMIP6', 'CMIP6Plus')\n", - "project_cv_data['license'][0].replace('CMIP6', 'CMIP6Plus')\n", + "project_cv_data['DRS']['directory_path_example'] = \\\n", + " project_cv_data['DRS']['directory_path_example'].replace('CMIP6', 'CMIP6Plus')\n", + "project_cv_data['DRS']['directory_path_sub_experiment_example'] = \\\n", + " project_cv_data['DRS']['directory_path_sub_experiment_example'].replace('CMIP6', 'CMIP6Plus')\n", + "project_cv_data['license'][0] = \\\n", + " project_cv_data['license'][0].replace('CMIP6', 'CMIP6Plus')\n", "project_cv_data['mip_era'] = 'CMIP6Plus'\n", "\n", "# Write out\n", @@ -2149,7 +2156,7 @@ } ], "source": [ - "sorted(os.listdir(OUTPUT_LOCATION))" + "[i for i in sorted(os.listdir(OUTPUT_LOCATION)) if i.endswith('.json')]" ] }, { @@ -2159,6 +2166,14 @@ "metadata": {}, "outputs": [], "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e802b9e3-924c-4b46-9efd-d818c158649e", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {