|
60 | 60 | "PJD 9 Mar 2025 - adding nominal_resolution, data_archive_id, and regions<br>\n",
|
61 | 61 | "PJD 9 Mar 2025 - frequency tweaks (correct for pt entries)<br>\n",
|
62 | 62 | "PJD 9 Mar 2025 - add nominal_resolution = 0.25 km; update region identifiers; remove monC frequency<br>\n",
|
| 63 | + "PJD 12 Mar 2025 - further updates to 1) add DRS; 2) remove nested branding_label dict; 3) remove nom*_res 1x1 degree<br>\n", |
| 64 | + "\n", |
63 | 65 | "TODO:\n",
|
64 | 66 | "\n",
|
65 | 67 | "**Links**"
|
|
83 | 85 | "name": "stdout",
|
84 | 86 | "output_type": "stream",
|
85 | 87 | "text": [
|
86 |
| - "CPU times: user 30.6 ms, sys: 12 ms, total: 42.6 ms\n", |
87 |
| - "Wall time: 51.1 ms\n" |
| 88 | + "CPU times: user 40.2 ms, sys: 17.4 ms, total: 57.6 ms\n", |
| 89 | + "Wall time: 65.8 ms\n" |
88 | 90 | ]
|
89 | 91 | }
|
90 | 92 | ],
|
|
153 | 155 | "APday\n",
|
154 | 156 | "OPmon\n",
|
155 | 157 | "OPmonLev\n",
|
156 |
| - "CPU times: user 8.02 ms, sys: 3.76 ms, total: 11.8 ms\n", |
157 |
| - "Wall time: 52.2 ms\n" |
| 158 | + "CPU times: user 36.7 ms, sys: 16.8 ms, total: 53.5 ms\n", |
| 159 | + "Wall time: 15.8 s\n" |
158 | 160 | ]
|
159 | 161 | }
|
160 | 162 | ],
|
|
371 | 373 | "data": {
|
372 | 374 | "text/plain": [
|
373 | 375 | "{'Header': {'Conventions': 'CF-1.11 CMIP-7.0.0.0',\n",
|
374 |
| - " 'checksum': 'b9dab11b03ca4d3bd46329321eefd569',\n", |
| 376 | + " 'checksum': '16d968eb7e89b5b95d1e119e32aaa0db',\n", |
375 | 377 | " 'cmor_version': '3.10',\n",
|
376 | 378 | " 'generic_levels': 'alevel alevhalf',\n",
|
377 | 379 | " 'int_missing_value': '-999',\n",
|
378 | 380 | " 'missing_value': '1e20',\n",
|
379 | 381 | " 'product': 'model-output',\n",
|
380 |
| - " 'table_date': '2025-03-09',\n", |
| 382 | + " 'table_date': '2025-03-12',\n", |
381 | 383 | " 'table_id': 'atmos2d',\n",
|
382 | 384 | " 'realm': 'atmos',\n",
|
383 | 385 | " 'type': 'real',\n",
|
|
484 | 486 | "data": {
|
485 | 487 | "text/plain": [
|
486 | 488 | "{'Header': {'Conventions': 'CF-1.11 CMIP-7.0.0.0',\n",
|
487 |
| - " 'checksum': '8f0a03d98a85aed3624887353b5af6c5',\n", |
| 489 | + " 'checksum': '0d05fb60cb5645eb4b581f5c77508f7c',\n", |
488 | 490 | " 'cmor_version': '3.10',\n",
|
489 | 491 | " 'generic_levels': '',\n",
|
490 | 492 | " 'int_missing_value': '-999',\n",
|
491 | 493 | " 'missing_value': '1e20',\n",
|
492 | 494 | " 'product': 'model-output',\n",
|
493 |
| - " 'table_date': '2025-03-09',\n", |
| 495 | + " 'table_date': '2025-03-12',\n", |
494 | 496 | " 'table_id': 'ocean2d',\n",
|
495 | 497 | " 'realm': 'ocean',\n",
|
496 | 498 | " 'type': 'real',\n",
|
|
564 | 566 | "data": {
|
565 | 567 | "text/plain": [
|
566 | 568 | "{'Header': {'Conventions': 'CF-1.11 CMIP-7.0.0.0',\n",
|
567 |
| - " 'checksum': '773fc4e03a0ea47bdc0119167be9d89e',\n", |
| 569 | + " 'checksum': '651bbe7b494203f2383f6feee44ad299',\n", |
568 | 570 | " 'cmor_version': '3.10',\n",
|
569 | 571 | " 'generic_levels': 'olevel olevhalf',\n",
|
570 | 572 | " 'int_missing_value': '-999',\n",
|
571 | 573 | " 'missing_value': '1e20',\n",
|
572 | 574 | " 'product': 'model-output',\n",
|
573 |
| - " 'table_date': '2025-03-09',\n", |
| 575 | + " 'table_date': '2025-03-12',\n", |
574 | 576 | " 'table_id': 'oceanLev',\n",
|
575 | 577 | " 'realm': 'ocean',\n",
|
576 | 578 | " 'type': 'real',\n",
|
|
654 | 656 | "output_type": "stream",
|
655 | 657 | "text": [
|
656 | 658 | "CV\n",
|
657 |
| - "CPU times: user 4.48 ms, sys: 1.63 ms, total: 6.12 ms\n", |
658 |
| - "Wall time: 18.6 ms\n" |
| 659 | + "CPU times: user 16.5 ms, sys: 6.39 ms, total: 22.9 ms\n", |
| 660 | + "Wall time: 5.26 s\n" |
659 | 661 | ]
|
660 | 662 | }
|
661 | 663 | ],
|
|
687 | 689 | "source": [
|
688 | 690 | "keyList = list(CV[\"CV\"].keys())\n",
|
689 | 691 | "keepKeys = [\n",
|
| 692 | + " \"DRS\",\n", |
690 | 693 | " \"frequency\",\n",
|
691 | 694 | " \"grid_label\",\n",
|
692 | 695 | " \"license\",\n",
|
|
716 | 719 | "metadata": {},
|
717 | 720 | "outputs": [],
|
718 | 721 | "source": [
|
| 722 | + "# DRS\n", |
| 723 | + "CV[\"CV\"][\"DRS\"].pop(\"directory_path_sub_experiment_example\")\n", |
| 724 | + "CV[\"CV\"][\"DRS\"].pop(\"filename_sub_experiment_example\")\n", |
| 725 | + "CV[\"CV\"][\"DRS\"][\n", |
| 726 | + " \"directory_path_example\"\n", |
| 727 | + "] = \"CMIP7/CMIP/PCMDI-test-1-0/glb/mon/historical/r1i1p1f3/tas/tavg-h2m-hxy-u/gn/v20191207/\"\n", |
| 728 | + "CV[\"CV\"][\"DRS\"][\n", |
| 729 | + " \"directory_path_template\"\n", |
| 730 | + "] = \"<mip_era>/<activity_id>/<source_id>/<region>/<frequency>/<experiment_id>/<variant_id>/<variable_id>/<branding_suffix>/<grid_label>/<version>\"\n", |
| 731 | + "CV[\"CV\"][\"DRS\"][\n", |
| 732 | + " \"filename_example\"\n", |
| 733 | + "] = \"tas_tavg-h2m-hxy-u_mon_glb_gn_PCMDI-test-1-0 _historical_r1i1p1f3_185001-186912.nc\"\n", |
| 734 | + "CV[\"CV\"][\"DRS\"][\n", |
| 735 | + " \"filename_template\"\n", |
| 736 | + "] = \"<variable_id>_<branding_suffix>_<frequency>_<region>_<grid_label>_<source_id>_<experiment_id>_<variant_id>[_<time_range>].nc\"\n", |
719 | 737 | "# frequency\n",
|
720 | 738 | "keepKeys = [\"1hr\", \"1hrCM\", \"3hr\", \"6hr\", \"day\", \"dec\", \"fx\", \"mon\", \"monC\", \"yr\"]\n",
|
721 | 739 | "keyList = list(CV[\"CV\"][\"frequency\"].keys())\n",
|
|
812 | 830 | " '100 km',\n",
|
813 | 831 | " '1000 km',\n",
|
814 | 832 | " '10000 km',\n",
|
815 |
| - " '1x1 degree',\n", |
816 | 833 | " '2.5 km',\n",
|
817 | 834 | " '25 km',\n",
|
818 | 835 | " '250 km',\n",
|
|
831 | 848 | "source": [
|
832 | 849 | "# add 0.25 km\n",
|
833 | 850 | "CV[\"CV\"][\"nominal_resolution\"].insert(0, \"0.25 km\")\n",
|
| 851 | + "CV[\"CV\"][\"nominal_resolution\"].remove(\"1x1 degree\")\n", |
834 | 852 | "CV[\"CV\"][\"nominal_resolution\"]"
|
835 | 853 | ]
|
836 | 854 | },
|
|
851 | 869 | "source": [
|
852 | 870 | "# other CVs\n",
|
853 | 871 | "# new data_archive_id to capture WCRP-affiliated entries\n",
|
| 872 | + "CV[\"CV\"][\n", |
| 873 | + " \"branding_suffix\"\n", |
| 874 | + "] = \"<temporal_label>-<vertical_label>-<horizontal_label>-<area_label>\"\n", |
854 | 875 | "CV[\"CV\"][\"data_archive_id\"] = {}\n",
|
855 | 876 | "CV[\"CV\"][\"data_archive_id\"][\"WCRP\"] = \" \".join(\n",
|
856 | 877 | " [\n",
|
|
1063 | 1084 | "temporal_label = dict(sorted(temporal_label.items()))\n",
|
1064 | 1085 | "vertical_label = dict(sorted(vertical_label.items()))\n",
|
1065 | 1086 | "# add to CV master dict\n",
|
1066 |
| - "CV[\"CV\"][\"branding_labels\"] = {}\n", |
1067 |
| - "CV[\"CV\"][\"branding_labels\"][\"area_label\"] = area_label\n", |
1068 |
| - "CV[\"CV\"][\"branding_labels\"][\"horizontal_label\"] = horizontal_label\n", |
1069 |
| - "CV[\"CV\"][\"branding_labels\"][\"temporal_label\"] = temporal_label\n", |
1070 |
| - "CV[\"CV\"][\"branding_labels\"][\"vertical_label\"] = vertical_label" |
| 1087 | + "CV[\"CV\"][\"area_label\"] = area_label\n", |
| 1088 | + "CV[\"CV\"][\"horizontal_label\"] = horizontal_label\n", |
| 1089 | + "CV[\"CV\"][\"temporal_label\"] = temporal_label\n", |
| 1090 | + "CV[\"CV\"][\"vertical_label\"] = vertical_label" |
1071 | 1091 | ]
|
1072 | 1092 | },
|
1073 | 1093 | {
|
|
0 commit comments