Skip to content

Commit

Permalink
#3: update with CMIP6-> CMIP6Plus in example CV file
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-mizielinski committed Sep 5, 2022
1 parent 129d279 commit dea4b9b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Tables/CMIP6Plus_CV.json
Original file line number Diff line number Diff line change
@@ -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": "<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",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -11251,7 +11251,7 @@
"CV_collection_modified": "2022-09-05",
"CV_collection_version": "6.3.0.0",
"author": "Matt Mizielinski <[email protected]>",
"checksum": "md5: 2df90b953ab04a1688212335e61c948e",
"checksum": "md5: 18eda695660d8e337af5183fc2c80a4d",
"institution_id": "MOHC",
"previous_commit": "To be added",
"specs_doc": "v6.3.0 (link TBC)"
Expand Down
25 changes: 20 additions & 5 deletions src/exploration/CMIP6_variable_remap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -2149,7 +2156,7 @@
}
],
"source": [
"sorted(os.listdir(OUTPUT_LOCATION))"
"[i for i in sorted(os.listdir(OUTPUT_LOCATION)) if i.endswith('.json')]"
]
},
{
Expand All @@ -2159,6 +2166,14 @@
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "e802b9e3-924c-4b46-9efd-d818c158649e",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit dea4b9b

Please sign in to comment.