CMIP7-data-request-api 1.3__tar.gz → 1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. cmip7_data_request_api-1.4/PKG-INFO +614 -0
  2. cmip7_data_request_api-1.4/README.md +573 -0
  3. cmip7_data_request_api-1.4/data_request_api/CMIP7_data_request_api.egg-info/PKG-INFO +614 -0
  4. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/CMIP7_data_request_api.egg-info/SOURCES.txt +7 -4
  5. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/command_line/compare_variables.py +43 -4
  6. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/command_line/export_dreq_lists_json.py +9 -1
  7. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/consolidate_export.py +18 -0
  8. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/dreq_content.py +1 -1
  9. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/dump_transformation.py +3 -3
  10. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/transform.json +32 -3
  11. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/query/data_request.py +6 -2
  12. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/query/dreq_classes.py +162 -39
  13. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/query/dreq_query.py +93 -3
  14. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_cli.py +130 -9
  15. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_data_request.py +155 -181
  16. cmip7_data_request_api-1.4/data_request_api/data_request_api/tests/test_datasets/DR_raw_not-consolidate_content.json +414 -0
  17. cmip7_data_request_api-1.4/data_request_api/data_request_api/tests/test_datasets/DR_release_not-consolidate_content.json +414 -0
  18. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/DR_release_not-consolidate_content_dump.txt +129 -129
  19. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/VS_raw_not-consolidate_content.json +485 -380
  20. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/VS_release_not-consolidate_content.json +448 -343
  21. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/raw_not-consolidate_output_transform.json +649 -545
  22. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/release_not-consolidate_output_transform.json +628 -524
  23. cmip7_data_request_api-1.4/data_request_api/data_request_api/tests/test_dreq_query.py +203 -0
  24. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_dump_transformation.py +1 -1
  25. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_vocabulary_server.py +4 -4
  26. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/version.py +2 -2
  27. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/command_line/compare_variables.html +53 -4
  28. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/command_line/export_dreq_lists_json.html +9 -1
  29. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/content/consolidate_export.html +1 -0
  30. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/content/dump_transformation.html +3 -3
  31. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/query/data_request.html +11 -3
  32. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/query/dreq_classes.html +273 -72
  33. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/query/dreq_query.html +137 -6
  34. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/index.html +5 -0
  35. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_cli.html +293 -18
  36. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_data_request.html +310 -362
  37. cmip7_data_request_api-1.4/docs/data_request_api/tests/test_dreq_query.html +313 -0
  38. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_vocabulary_server.html +8 -8
  39. cmip7_data_request_api-1.4/docs/static/3boxes_schema.png +0 -0
  40. cmip7_data_request_api-1.3/scripts/examples/requested_v1.2.2.2_cmip6names.json → cmip7_data_request_api-1.4/scripts/examples/requested_v1.2.2.3_cmip6names.json +28041 -19519
  41. cmip7_data_request_api-1.4/scripts/examples/requested_v1.2.2.3_cmip7names.json +97657 -0
  42. cmip7_data_request_api-1.3/scripts/examples/variables_v1.2.2.2_cmip6names.json → cmip7_data_request_api-1.4/scripts/examples/variables_v1.2.2.3_cmip6names.json +4266 -4264
  43. cmip7_data_request_api-1.3/scripts/examples/variables_v1.2.2.2_cmip7names.json → cmip7_data_request_api-1.4/scripts/examples/variables_v1.2.2.3_cmip7names.json +6542 -6540
  44. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/workflow_example_2.py +6 -0
  45. cmip7_data_request_api-1.3/PKG-INFO +0 -174
  46. cmip7_data_request_api-1.3/README.md +0 -133
  47. cmip7_data_request_api-1.3/data_request_api/CMIP7_data_request_api.egg-info/PKG-INFO +0 -174
  48. cmip7_data_request_api-1.3/data_request_api/data_request_api/tests/test_datasets/DR_raw_not-consolidate_content.json +0 -414
  49. cmip7_data_request_api-1.3/data_request_api/data_request_api/tests/test_datasets/DR_release_not-consolidate_content.json +0 -414
  50. cmip7_data_request_api-1.3/scripts/examples/requested_v1.2.2.2_cmip7names.json +0 -89135
  51. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/.DS_Store +0 -0
  52. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/.github/.DS_Store +0 -0
  53. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/.github/workflows/pip_install.yml +0 -0
  54. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/.github/workflows/publish2pypi.yml +0 -0
  55. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/.github/workflows/updates.yml +0 -0
  56. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/.gitignore +0 -0
  57. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/LICENSE +0 -0
  58. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/binder/environment.yml +0 -0
  59. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/binder/postBuild +0 -0
  60. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/.DS_Store +0 -0
  61. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/CMIP7_data_request_api.egg-info/dependency_links.txt +0 -0
  62. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/CMIP7_data_request_api.egg-info/entry_points.txt +0 -0
  63. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/CMIP7_data_request_api.egg-info/requires.txt +0 -0
  64. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/CMIP7_data_request_api.egg-info/top_level.txt +0 -0
  65. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/__init__.py +0 -0
  66. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/command_line/__init__.py +0 -0
  67. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/command_line/config.py +0 -0
  68. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/command_line/estimate_dreq_volume.py +0 -0
  69. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/command_line/get_variables_metadata.py +0 -0
  70. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/README.MD +0 -0
  71. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/__init__.py +0 -0
  72. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/mapping_table.py +0 -0
  73. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/content/utils.py +0 -0
  74. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/query/__init__.py +0 -0
  75. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/query/filtering.json +0 -0
  76. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/query/vocabulary_server.py +0 -0
  77. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/__init__.py +0 -0
  78. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_config.py +0 -0
  79. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_config_cli.py +0 -0
  80. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_consolidation.py +0 -0
  81. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/dreq_raw_export.json +0 -0
  82. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/dreq_release_export.json +0 -0
  83. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/raw_not-consolidate_output_format.json +0 -0
  84. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_datasets/release_not-consolidate_output_format.json +0 -0
  85. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_decorator.py +0 -0
  86. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_dreq_content.py +0 -0
  87. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/tests/test_optimize.py +0 -0
  88. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/utilities/__init__.py +0 -0
  89. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/utilities/config.py +0 -0
  90. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/utilities/decorators.py +0 -0
  91. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/utilities/logger.py +0 -0
  92. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/utilities/parser.py +0 -0
  93. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/data_request_api/data_request_api/utilities/tools.py +0 -0
  94. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/command_line/config.html +0 -0
  95. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/command_line/estimate_dreq_volume.html +0 -0
  96. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/command_line/get_variables_metadata.html +0 -0
  97. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/command_line/index.html +0 -0
  98. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/content/dreq_content.html +0 -0
  99. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/content/index.html +0 -0
  100. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/content/mapping_table.html +0 -0
  101. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/content/utils.html +0 -0
  102. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/index.html +0 -0
  103. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/query/index.html +0 -0
  104. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/query/vocabulary_server.html +0 -0
  105. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/content/consolidate_export.html +0 -0
  106. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/content/dreq_content.html +0 -0
  107. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/content/dump_transformation.html +0 -0
  108. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/content/index.html +0 -0
  109. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/content/mapping_table.html +0 -0
  110. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/index.html +0 -0
  111. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/query/data_request.html +0 -0
  112. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/query/dreq_classes.html +0 -0
  113. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/query/dreq_query.html +0 -0
  114. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/query/index.html +0 -0
  115. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/query/vocabulary_server.html +0 -0
  116. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/utilities/config.html +0 -0
  117. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/utilities/decorators.html +0 -0
  118. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/utilities/index.html +0 -0
  119. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/utilities/logger.html +0 -0
  120. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/utilities/parser.html +0 -0
  121. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/stable/utilities/tools.html +0 -0
  122. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_config.html +0 -0
  123. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_config_cli.html +0 -0
  124. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_consolidation.html +0 -0
  125. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_decorator.html +0 -0
  126. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_dreq_content.html +0 -0
  127. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_dump_transformation.html +0 -0
  128. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/tests/test_optimize.html +0 -0
  129. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/utilities/config.html +0 -0
  130. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/utilities/decorators.html +0 -0
  131. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/utilities/index.html +0 -0
  132. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/utilities/logger.html +0 -0
  133. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/utilities/parser.html +0 -0
  134. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/utilities/tools.html +0 -0
  135. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/docs/data_request_api/version.html +0 -0
  136. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/env.yml +0 -0
  137. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/launch_test_with_coverage.sh +0 -0
  138. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-00_Install_the_DR_Software.ipynb +0 -0
  139. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-01_Import_and_Load_the_DR.ipynb +0 -0
  140. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-02_Discover_What_is_in_DR.ipynb +0 -0
  141. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-03a_Find_Experiments_and_Variables_for_given_Opportunities.ipynb +0 -0
  142. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-03b_Find_Experiments_and_Variables_for_given_Opportunities.ipynb +0 -0
  143. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-04a_View_Attributes_of_Experiments_and_Variables.ipynb +0 -0
  144. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-04b_View_Attributes_of_Variables.ipynb +0 -0
  145. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/HowTo-05_Apply_Various_Search_Critria.ipynb +0 -0
  146. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/README.md +0 -0
  147. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/notebooks/outdir/.gitkeep +0 -0
  148. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/pyproject.toml +0 -0
  149. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/requirements.txt +0 -0
  150. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/branding/README.md +0 -0
  151. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/branding/branded_variable_attributes.yaml +0 -0
  152. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/branding/compare_branded_variables.py +0 -0
  153. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/branding/generate_branded_names.py +0 -0
  154. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/check_consolidation.py +0 -0
  155. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/check_consolidation2.py +0 -0
  156. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/check_consolidation2_list-all-diffs.py +0 -0
  157. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/check_consolidation_and_transformation.py +0 -0
  158. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/check_variables_attributes.py +0 -0
  159. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/database_transformation.py +0 -0
  160. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/sandbox/create_brand_name.py +0 -0
  161. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/scripts/workflow_example.py +0 -0
  162. {cmip7_data_request_api-1.3 → cmip7_data_request_api-1.4}/setup.cfg +0 -0
@@ -0,0 +1,614 @@
1
+ Metadata-Version: 2.4
2
+ Name: CMIP7_data_request_api
3
+ Version: 1.4
4
+ Summary: A programmatic interface to the CMIP7 Data Request
5
+ Author: James Anstey, Gaëlle Rigoudy, Martin Schupfner, Matthew Mizielinski, Daniel Ellis, Elisabeth Dingley, Marie-Pierre Moine
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024-2025 CMIP IPO
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/CMIP-Data-Request/CMIP7_DReq_Software
29
+ Project-URL: Issues, https://github.com/CMIP-Data-Request/CMIP7_DReq_Software/issues
30
+ Classifier: Programming Language :: Python :: 3
31
+ Classifier: Operating System :: OS Independent
32
+ Requires-Python: >=3.8
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: pooch
36
+ Requires-Dist: openpyxl
37
+ Requires-Dist: requests
38
+ Requires-Dist: beautifulsoup4
39
+ Requires-Dist: pyyaml
40
+ Dynamic: license-file
41
+
42
+ [![pypi](https://img.shields.io/pypi/v/CMIP7-data-request-api.svg)](https://pypi.python.org/pypi/CMIP7-data-request-api)
43
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/CMIP-Data-Request/CMIP7_DReq_Software/main?filepath=notebooks)
44
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/CMIP-Data-Request/CMIP7_DReq_Software/)
45
+ [![NBviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.jupyter.org/github/CMIP-Data-Request/CMIP7_DReq_Software/tree/main/notebooks/)
46
+ [![license](https://img.shields.io/github/license/CMIP-Data-Request/CMIP7_DReq_Software.svg)](https://github.com/CMIP-Data-Request/CMIP7_DReq_Software/blob/main/LICENSE)
47
+ [![status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
48
+
49
+ # CMIP7 Data Request Software
50
+
51
+ Quick user guide for python software to interact with the [CMIP7 data request](https://wcrp-cmip.org/cmip7/cmip7-data-request/).
52
+
53
+ ## Table of Contents
54
+ 1. [Purpose](#purpose)
55
+ 2. [Release Versions](#release-versions)
56
+ 3. [Try It Without Installation](#try-it-without-installation)
57
+ 4. [Installation](#installation)
58
+ 5. [Configuration](#configuration)
59
+ 6. [Quick Start](#quick-start)
60
+ 7. [Documentation](#documentation)
61
+ 8. [Contributors](#contributors)
62
+ 9. [Contact](#contact)
63
+
64
+ ## Purpose
65
+
66
+ **The CMIP7 DReq Software** is Python software designed to interact with the [CMIP7 Data Request](https://wcrp-cmip.org/cmip7/cmip7-data-request/), which is referred to herein as the **Data Request Content** in order to distinguish from the **Software**; the schematic below shows the relationship between the two. It provides an API to *query* and *utilize* the information in the Data Request, including [command-line (CLI) utilities](#command-line-utilities), [example scripts](#python-scripts) and [notebooks](#notebooks) showing how to use the API.
67
+ The main purpose of the CMIP7 DReq API is to extract the requested variables (along with their attributes) according to filters the user activates (a set of CMIP7 Experiments, and/or Opportunities, and/or Frequencies, etc.). It can generate the resulting lists in different formats (csv, json) or return them as python objects that make the API *plugable* in Modelling Centres' data production workflows.
68
+
69
+ <img width=750px src=./docs/static/3boxes_schema.png>
70
+
71
+ **Target audience:**
72
+ - *Modellers* configuring the output variables for climate models running CMIP7 simulations
73
+ - *Software engineers* preparing CMIP7 modelling workflows
74
+ - *Data providers* preparing CMIP7 netCDF output files for publication on [ESGF](https://esgf.github.io/)
75
+
76
+ **General features:** exploring the CMIP7 DR content - apply various filters - get the results in different formats.
77
+
78
+ ## Release Versions
79
+
80
+ The latest **official release** of the CMIP7 Data Request Content is described on the
81
+ [CMIP7 Data Request website](https://wcrp-cmip.org/cmip7-data-request-latest).
82
+
83
+ ### Ways to browse the Data Request Content
84
+
85
+ You can view the Data Request content in multiple ways:
86
+
87
+ #### **1. Airtable View**
88
+ Online spreadsheet-style view of the Data Request Content:
89
+ https://bit.ly/CMIP7-DReq-latest
90
+
91
+ #### **2. CMIP7 Data Request Webview**
92
+ A static, interactive HTML interface for browsing and searching CMIP7 Data Request records, including changes introduced in new releases, hosted via GitHub Pages.
93
+
94
+ - **Main entry point (access to all Data Request content versions and Webview tools):**
95
+ https://CMIP-Data-Request.github.io/cmip7-dreq-webview/index.html
96
+
97
+ - **Permanent link to latest Data Request content:**
98
+ https://CMIP-Data-Request.github.io/cmip7-dreq-webview/latest/index.html
99
+
100
+ The Webview provides:
101
+ - variable search across multiple attributes
102
+ - browsing of data request changes between releases
103
+ - browsing of variable definition changes between releases
104
+ - browsing Data Request content across different releases, with all records cross-linked
105
+
106
+ These are the easiest ways to *inspect* the Data Request without installing or using the software.
107
+
108
+ #### **3. Programmatic Access (this repository)**
109
+ Using the CMIP7 Data Request API you can load, filter, query, and export the Data Request programmatically in Python.
110
+ This is also possible without installing the software on your local machine, see [Try It Without Installation](#try-it-without-installation).
111
+
112
+ :warning: **Note:** *The CMIP7 DReq Software versions are not aligned with the CMIP7 Data Request ones. So please, do not infer that e.g. v1.2.2 of the CMIP7 DReq Software "works with" or "reflects" v1.2.2 of the CMIP7 Data Request, it is not the case!*
113
+
114
+ ## Try It Without Installation
115
+
116
+ You can launch and interact with this repository via [Binder](https://mybinder.org/) or [Google Colab](https://colab.research.google.com/). To do so, just click on one of the badges to run it in your browser:
117
+
118
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/CMIP-Data-Request/CMIP7_DReq_Software/main?filepath=notebooks)
119
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/CMIP-Data-Request/CMIP7_DReq_Software/)
120
+ <br>
121
+ :bulb: This enables you, *without installing anything on your local system*, to play with the [notebooks](#notebooks), in a live environment that is your own playground.
122
+ (Note, in Google Colab it may be necessary to add `! pip install CMIP7-data-request-api` to the beginning of the notebooks, while Binder should take care of that for you.)
123
+
124
+ ## Installation
125
+
126
+ ### Install in User mode
127
+
128
+ Here is described how to install the *CMIP7 DReq Software* python package via `pip` for use as a python module in scripts/software or to use the command-line utilities. (To modify/develop the software, see below for [developer installation instructions](#install-in-developer-mode).)
129
+
130
+ In a python *venv* or *conda env* in which you want to install the package, do:
131
+ ```bash
132
+ pip install CMIP7-data-request-api
133
+ ```
134
+ If you choose the <u>**venv**</u> solution:
135
+ ```bash
136
+ python -m venv my_dreq_env
137
+ source my_dreq_env/bin/activate
138
+ python -m pip install --upgrade pip
139
+ python -m pip install CMIP7-data-request-api
140
+ ```
141
+ with `my_dreq_env` being the environment name that can be changed to whatever preferred name.
142
+
143
+ This will automatically install the dependencies, but if necessary they can be manually installed by doing:
144
+ ```bash
145
+ wget https://raw.githubusercontent.com/CMIP-Data-Request/CMIP7_DReq_Software/refs/heads/main/requirements.txt
146
+ python -m pip install -r requirements.txt
147
+ ```
148
+ where the [`requirements.txt`](requirements.txt) file is the one present at the root-level of this repository, which lists the package dependencies.
149
+
150
+ If a <u>**conda env**</u> is preferred instead of `venv`, an [`env.yml`](env.yml) file with the dependencies is also provided at root-level and a conda environment can be created by doing:
151
+ ```bash
152
+ wget https://raw.githubusercontent.com/CMIP-Data-Request/CMIP7_DReq_Software/refs/heads/main/env.yml
153
+ conda env create -n my_dreq_env --file env.yml
154
+ ```
155
+ At this stage, `my_dreq_env` conda environment contains all expected dependencies and to install the *"CMIP7 DReq Software"* package simply do:
156
+ ```bash
157
+ conda activate my_dreq_env
158
+ python -m pip install --upgrade pip
159
+ python -m pip install CMIP7-data-request-api
160
+ ```
161
+ :white_check_mark: If installation is ***successful*** you should be able to run the command:
162
+ ```bash
163
+ export_dreq_lists_json --all_opportunities v1.2.2.3 amip.json --experiments amip
164
+ ```
165
+ :x: If something went wrong, the package can be ***uninstalled*** using:
166
+ ```bash
167
+ python -m pip uninstall CMIP7_data_request_api
168
+ ```
169
+ :bell:To ***update*** a previousely installed version of the package:
170
+ ```bash
171
+ python -m pip install --upgrade CMIP7_data_request_api
172
+ ```
173
+ :bulb: And finally, if you want to run the [notebooks](#notebooks) in your enviromement (venv or conda), do not forget to install an ipykernel:
174
+ ```bash
175
+ pip install jupyter
176
+ pip install ipykernel
177
+ python -m ipykernel install --user --name my_dreq_kernel
178
+ ```
179
+ where `my_dreq_kernel` is the name of the kernel you want to appear in your `jupyter-notebook` interface.
180
+
181
+ ### Install in Developer mode
182
+
183
+ To install the *CMIP7 DReq Software* for development purposes, first clone the source repository:
184
+ ```bash
185
+ git clone git@github.com:CMIP-Data-Request/CMIP7_DReq_Software.git
186
+ cd CMIP7_DReq_Software
187
+ ```
188
+ Once an environment is created with the required dependencies (as in [user-mode install](#install-in-user-mode) above), this environement activated, go at the root-level directory of the repository and run:
189
+ ```bash
190
+ python -m pip install -e .
191
+ ```
192
+
193
+ ## Configuration
194
+
195
+ The package comes with a *default configuration*. After installation, you can ***initialize the configuration*** file with the default settings by running:
196
+ ```bash
197
+ CMIP7_data_request_api_config init
198
+ ```
199
+ This will create the `.CMIP7_data_request_api_config` file in your home directory.
200
+ Optionally, the default location of this file can be changed by setting the `CMIP7_DR_API_CONFIGFILE` environment variable.
201
+
202
+ :bulb:**Note:** *Initializing the configuration file is optional, because the file will be automatically created the first time you use the software.*
203
+
204
+ The ***configuration file*** is a YAML file containing `key: value` pairs that
205
+ control the behavior of the software.
206
+ You can modify the values by either editing the file directly or using the following command:
207
+ ```bash
208
+ CMIP7_data_request_api_config <key> <value>
209
+ ```
210
+ To reset the configuration to its default values, run:
211
+ ```bash
212
+ CMIP7_data_request_api_config reset
213
+ ```
214
+ For example, to set the software to run ***offline*** (i.e. without internet connection):
215
+ ```bash
216
+ CMIP7_data_request_api_config offline true
217
+ ```
218
+ This will prevent checks for updates and retrievals of new versions of the data request content.
219
+
220
+ ## Quick Start
221
+
222
+ ### Command-Line Utilities
223
+
224
+ A set of CLI utilities are available on pip install:
225
+ 1. [`CMIP7_data_request_api_config`](data_request_api/data_request_api/command_line/config.py) to interact with config file, as [described above](#configuration)
226
+ 2. [`export_dreq_lists_json.py`](data_request_api/data_request_api/command_line/export_dreq_lists_json.py) to get lists of requested variables
227
+ 3. [`get_variables_metadata.py`](data_request_api/data_request_api/command_line/get_variables_metadata.py) to access variable names & definitions
228
+ 4. [`compare_variables.py`](data_request_api/data_request_api/command_line/compare_variables.py) to track changes in variable definitions and attributes
229
+ 5. [`estimate_dreq_volume.py`](data_request_api/data_request_api/command_line/estimate_dreq_volume.py) which is a configurable data volume estimator
230
+
231
+
232
+ **1. CMIP7_data_request_api_config**
233
+
234
+ This is for configuring of the CLI, which has already been presented in the [configuration section](#configuration). Here we provide some additional details like the complete list of config parameters.
235
+
236
+ First time it is called, it generates a default configuration file in your HOME directory.
237
+
238
+ `CMIP7_data_request_api_config`
239
+
240
+ <details>
241
+ <summary>Click here to see the content of the default configuration file generated.</summary>
242
+
243
+ ```
244
+ cache_dir: <YOUR-HOME-DIR>/.CMIP7_data_request_api_cache
245
+ check_api_version: true
246
+ consolidate: false
247
+ export: release
248
+ log_file: default
249
+ log_level: info
250
+ offline: false
251
+ variable_name: CMIP7 Compound Name
252
+ ```
253
+ </details>
254
+ <br>
255
+
256
+ The configuration file can be edited manually or via the config utility, passing a (key, value) pair for each config parameter, for example:
257
+
258
+ `CMIP7_data_request_api_config offline true`
259
+
260
+ <details>
261
+ <summary>Click here to show all the available options.</summary>
262
+
263
+ ```
264
+ $ --> CMIP7_data_request_api_config -h
265
+
266
+ usage: CMIP7_data_request_api_config <arguments>
267
+
268
+ Config CLI
269
+
270
+ positional arguments:
271
+ command
272
+
273
+ options:
274
+ -h, --help show this help message and exit
275
+
276
+ Arguments:
277
+ init (or no arguments): Initialize the config file,
278
+ i.e. create a config file with default values if it does not exist.
279
+ list: List all keys in the config file.
280
+ reset: Reset the config file to default values.
281
+ <key> <value>: Update a specific key in the config file.
282
+ help: print this help message.
283
+ ```
284
+ </details>
285
+ <br>
286
+
287
+ <details>
288
+ <summary>Click here to show all the configuration parameters.</summary>
289
+
290
+ * `cache_dir` is the repository where the config file is stored
291
+ * `check_api_version` ('true' or 'false') checks if a newer version is available with pypi and raises a warning in case the installed version is not the latest one
292
+ * `consolidate` ('true' or 'false') to apply the consolidation on the _raw json-export_ of the DR * content (air tables)
293
+ * `export` ('raw' or 'release') to use the _raw_ or _release json-export_ of the DR content (air tables)
294
+ * `log_file` ('default' or prefered file path) to customize (or not) the log file
295
+ * `log_level` ('debug' or 'info') to set the verbosity level in CLI log files
296
+ * `offline` ('true' or 'false') set to 'true' to prevent checks for updates and retrievals of new versions of the data request content
297
+ * `variable_name` ('CMIP7 Compound Name' or 'CMIP6 Compound Name'), the label used to uniquely identify the variables
298
+
299
+ </details>
300
+ <br>
301
+
302
+ **2. export_dreq_lists_json**
303
+
304
+ A json file is generated, listing the variables requested by the CMIP7 DR for the selected criteria. The list of variables is sorted per experiment (if several requested) and per priority (Core, High, Medium and Low). Variables are identified by default with their _CMIP7 compound names_.
305
+
306
+ :bulb: By changing the configuration parameter `variable_name`, variables in the output file can instead be identified by their _CMIP6 compound names_, or any other unique identifier present in the variables' metadata (e.g., `uid`).
307
+
308
+ Call example:
309
+ <br>
310
+ `export_dreq_lists_json --all_opportunities v1.2.2.3 amip_all_Opps_v1.2.2.3.json --experiments amip`
311
+ <details>
312
+ <summary>Click here for a snapview of the output json file.</summary>
313
+
314
+ ```
315
+ "experiment": {
316
+ "amip": {
317
+ "Core": [
318
+ "atmos.areacella.ti-u-hxy-u.fx.glb",
319
+ "atmos.cl.tavg-al-hxy-u.mon.glb",
320
+ "atmos.cli.tavg-al-hxy-u.mon.glb",
321
+ "atmos.clivi.tavg-u-hxy-u.mon.glb",
322
+ "atmos.clt.tavg-u-hxy-u.day.glb",
323
+ "atmos.clt.tavg-u-hxy-u.mon.glb",
324
+ "atmos.clw.tavg-al-hxy-u.mon.glb",
325
+ "atmos.clwvi.tavg-u-hxy-u.mon.glb",
326
+ "atmos.evspsbl.tavg-u-hxy-u.mon.glb",
327
+ "atmos.hfls.tavg-u-hxy-u.mon.glb",
328
+ "atmos.hfss.tavg-u-hxy-u.mon.glb",
329
+ "atmos.hur.tavg-p19-hxy-air.mon.glb",
330
+ ```
331
+ </details>
332
+ <br>
333
+
334
+ <details>
335
+ <summary>Click here to show all the available options.</summary>
336
+
337
+ ```
338
+ $--> export_dreq_lists_json -h
339
+
340
+ usage: export_dreq_lists_json [-h] [-a] [-f OPPORTUNITIES_FILE] [-i OPPORTUNITY_IDS] [-e EXPERIMENTS] [-p {core,high,medium,low}] [-m VARIABLES_METADATA]
341
+ {v1.2.2.3,v1.2.2.2,v1.2.2.1,v1.2.2,v1.2.1,v1.2,v1.1,v1.0,v1.0beta,v1.0alpha,dev} output_file
342
+
343
+ Get lists of requested variables by experiment, and write them to a json file.
344
+
345
+ positional arguments:
346
+ {v1.2.2.3,v1.2.2.2,v1.2.2.1,v1.2.2,v1.2.1,v1.2,v1.1,v1.0,v1.0beta,v1.0alpha,dev}
347
+ data request version
348
+ output_file file to write JSON output to
349
+
350
+ options:
351
+ -h, --help show this help message and exit
352
+ -a, --all_opportunities
353
+ respond to all opportunities
354
+ -f, --opportunities_file OPPORTUNITIES_FILE
355
+ path to JSON file listing opportunities to respond to. If it doesn't exist, a template will be created
356
+ -i, --opportunity_ids OPPORTUNITY_IDS
357
+ opportunity ids (integers) of opportunities to respond to, example: -i 69,22,37
358
+ -e, --experiments EXPERIMENTS
359
+ limit output to the specified experiments (case sensitive), example: -e historical,piControl
360
+ -p, --priority_cutoff {core,high,medium,low}
361
+ discard variables that are requested at lower priority than this cutoff priority
362
+ -m, --variables_metadata VARIABLES_METADATA
363
+ output file containing metadata of requested variables, can be ".json" or ".csv" file
364
+ (cmip7_dreq_venv-user) (base)
365
+ ```
366
+ </details>
367
+ <br>
368
+
369
+ **3. get_variables_metadata**
370
+
371
+ A json file is generated, containing the metadata of variables present in the CMIP7 DR (by default all of them, or alternately only the ones matching optional filter arguments). Each single entry of the json file is the _CMIP7 compound name_ of the variable and all of the attributes associated with this varaible are given as (key,value) pairs.
372
+
373
+ :bulb: By changing the configuration parameter `variable_name`, variables in the output file can instead be identified by their _CMIP6 compound names_.
374
+
375
+ Call example:
376
+ <br>
377
+ `get_variables_metadata v1.2.2.3 all_variables_metadata_v1.2.2.3.json`
378
+ <details>
379
+ <summary>Click here for a snapview of the output json file.</summary>
380
+
381
+ ```json
382
+ {
383
+ "Header": {
384
+ "Description": "Metadata attributes that characterize CMOR variables. Each variable is uniquely idenfied by a compound name comprised of a CMIP6-era table name and a short variable name.",
385
+ "no. of variables": 1974,
386
+ "dreq content version": "v1.2.2.3",
387
+ "dreq content file": "dreq_release_export.json",
388
+ "dreq content sha256 hash": "61741fa99e2f8ca1744688e9d84f2adafd2e5204a80f92c0a5b903778fdcb732",
389
+ "dreq api version": "1.4"
390
+ },
391
+ "Compound Name": {
392
+ "aerosol.abs550aer.tavg-u-hxy-u.mon.glb": {
393
+ "frequency": "mon",
394
+ "modeling_realm": "aerosol",
395
+ "standard_name": "atmosphere_absorption_optical_thickness_due_to_ambient_aerosol_particles",
396
+ "units": "1",
397
+ "cell_methods": "area: time: mean",
398
+ "cell_measures": "area: areacella",
399
+ "long_name": "Ambient Aerosol Absorption Optical Thickness at 550nm",
400
+ "comment": "Optical thickness of atmospheric aerosols at wavelength 550 nanometers.",
401
+ "processing_note": "",
402
+ "dimensions": "longitude latitude time lambda550nm",
403
+ "out_name": "abs550aer",
404
+ "type": "real",
405
+ "positive": "",
406
+ "spatial_shape": "XY-na",
407
+ "temporal_shape": "time-intv",
408
+ "cmip6_table": "AERmon",
409
+ "physical_parameter_name": "abs550aer",
410
+ "variableRootDD": "abs550aer",
411
+ "branding_label": "tavg-u-hxy-u",
412
+ "branded_variable_name": "abs550aer_tavg-u-hxy-u",
413
+ "region": "glb",
414
+ "cmip6_compound_name": "AERmon.abs550aer",
415
+ "cmip7_compound_name": "aerosol.abs550aer.tavg-u-hxy-u.mon.glb",
416
+ "uid": "19bebf2a-81b1-11e6-92de-ac72891c3257"
417
+ },
418
+ ```
419
+ </details>
420
+ <br>
421
+
422
+ <details>
423
+ <summary>Click here to show all the available options.</summary>
424
+
425
+ ```
426
+ $--> get_variables_metadata -h
427
+
428
+ usage: get_variables_metadata [-h] [-cn COMPOUND_NAMES] [-t CMOR_TABLES] [-v CMOR_VARIABLES]
429
+ {v1.2.2.3,v1.2.2.2,v1.2.2.1,v1.2.2,v1.2.1,v1.2,v1.1,v1.0,v1.0beta,v1.0alpha,dev} outfile
430
+
431
+ Get metadata of CMOR variables (e.g., cell_methods, dimensions, ...) and write it to a json file.
432
+
433
+ positional arguments:
434
+ {v1.2.2.3,v1.2.2.2,v1.2.2.1,v1.2.2,v1.2.1,v1.2,v1.1,v1.0,v1.0beta,v1.0alpha,dev}
435
+ data request version
436
+ outfile output file containing metadata of requested variables, can be ".json" or ".csv" file
437
+
438
+ options:
439
+ -h, --help show this help message and exit
440
+ -cn, --compound_names COMPOUND_NAMES
441
+ include only variables with the specified compound names, example: -cn Amon.tas,Omon.sos
442
+ -t, --cmor_tables CMOR_TABLES
443
+ include only the specified CMOR tables, example: -t Amon,Omon
444
+ -v, --cmor_variables CMOR_VARIABLES
445
+ include only the specified CMOR variable short names, example: -v tas,siconc
446
+ ```
447
+ </details>
448
+ <br>
449
+
450
+ :bulb: The [CMIP7 CMOR tables](https://github.com/WCRP-CMIP/cmip7-cmor-tables) have been generated from the variables metadata in the DR. `get_variables_metadata` provides another way to view the variables metadata in the DR.
451
+
452
+ **4. compare_variables**
453
+
454
+ Useful for viewing the changes in variable metadata between two CMIP7 DR versions or between CMIP7 and CMIP6. If comparing to CMIP6, the CMIP6 CMOR tables will be loaded and a `cmip6.json` file created with the expected format to enable the comparison. There are 3 output files: one listing the missing variables and two files listing the differences (one sorted per variable, the other sorted per attribute). As above, variables are identified with their _CMIP7 compound names_.
455
+ <br>
456
+
457
+ Call example:
458
+ <br>
459
+ `compare_variables all_variables_metadata_v1.2.2.3.json cmip6`
460
+ <details>
461
+ <summary>Click here to see the CLI log.</summary>
462
+
463
+ ```
464
+ Wrote cmip6.json
465
+ Loaded all_variables_metadata_v1.2.2.3.json
466
+ Loaded cmip6.json
467
+ Total number of variables with differences: 0
468
+ Wrote missing_variables.json
469
+ Wrote diffs_by_variable.json
470
+ Wrote diffs_by_attribute.json
471
+ ```
472
+ </details>
473
+ <br>
474
+
475
+ <details>
476
+ <summary>Click here to see all the available options.</summary>
477
+
478
+ ```
479
+ $--> compare_variables -h
480
+
481
+ usage: compare_variables [-h] [-c CONFIG_ATTRIBUTES] compare compare
482
+
483
+ Compare variables metadata between data request versions
484
+
485
+ positional arguments:
486
+ compare versions of variables to compare: json file or cmor tables
487
+
488
+ options:
489
+ -h, --help show this help message and exit
490
+ -c, --config_attributes CONFIG_ATTRIBUTES
491
+ yaml file specifying metadata attributes to compare (will be created if it doesn't exist)
492
+ ```
493
+ </details>
494
+ <br>
495
+
496
+ **5. estimate_dreq_volume**
497
+
498
+ Provides an estimate of the data volumes. It takes as input a yaml file where the model-grid size parameters are to be set. Please note that theses these estimates are provisional and must be used with caution. The output file is a json file where data volumes are given per experiment and grouped by variable priority (Core, High, Medium, Low).
499
+ <br>
500
+
501
+ To first create the yaml file, just call the utility with a DR version specified:
502
+ `estimate_dreq_volume v1.2.2.3`
503
+
504
+ A default config file `size.yaml`is created.
505
+ <details>
506
+ <summary>Click here to see the content of the default config file.</summary>
507
+
508
+ ```
509
+ # Data sizes config file for estimate_volume.py
510
+
511
+ # Model-specific dimension sizes (edit as needed)
512
+ dimensions:
513
+ alevel: 80
514
+ alevhalf: 80
515
+ gridlatitude: 100
516
+ latitude: 180
517
+ longitude: 360
518
+ olevel: 80
519
+ olevhalf: 80
520
+ rho: 80
521
+ sdepth: 20
522
+ soilpools: 5
523
+ spectband: 10
524
+
525
+ # Number of bytes per floating point number
526
+ bytes_per_float: 4
527
+
528
+ # Scaling factor (e.g., adjust to account for netcdf compression)
529
+ scale_file_size: 1
530
+
531
+ # No. of years to use if showing size of single variables (-vso option)
532
+ years: 1
533
+ ```
534
+ </details>
535
+ <br>
536
+
537
+ After editing `size.yaml` with your model-specific settings, rerun the command.
538
+ <br>
539
+
540
+ <details>
541
+ <summary>Click here for a snapview of the outut json file.</summary>
542
+
543
+ ```
544
+ ```
545
+ </details>
546
+ <br>
547
+
548
+ <details>
549
+ <summary>Click here to see all the available options.</summary>
550
+
551
+ ```
552
+ $ --> estimate_dreq_volume -h
553
+
554
+ usage: estimate_dreq_volume [-h] [-o OUTFILE] [-c CONFIG_SIZE] [-v VARIABLES] [-e EXPERIMENTS] [-vso] request
555
+
556
+ Estimate volume of requested model output
557
+
558
+ positional arguments:
559
+ request json file specifying variables requested by experiment (output from export_dreq_lists_json, which specifies the data request version) OR
560
+ can be a data request version (e.g. "v1.2")
561
+
562
+ options:
563
+ -h, --help show this help message and exit
564
+ -o, --outfile OUTFILE
565
+ name of output file, default: volume_estimate_{data request version}.json
566
+ -c, --config-size CONFIG_SIZE
567
+ config file (yaml) giving size parameters to use in the volume estimate
568
+ -v, --variables VARIABLES
569
+ include only the specified variables in the estimate, example: -v Amon.tas,Omon.tos
570
+ -e, --experiments EXPERIMENTS
571
+ include only the specified experiments in the estimate, example: -e historical,piControl
572
+ -vso, --variable-size-only
573
+ show ONLY the sizes of individual variables (ignores experiments)
574
+ ```
575
+ </details>
576
+ <br>
577
+
578
+ ### Notebooks
579
+
580
+ Notebooks are intended as a how-to guidelines for:
581
+ * loading the data request: ["HowTo-01"](notebooks/HowTo-01_Import_and_Load_the_DR.ipynb)
582
+ * discovering the data request: ["HowTo-02"](notebooks/HowTo-02_Discover_What_is_in_DR.ipynb)
583
+ * searching for experiments or variables: ["HowTo-03a"](notebooks/HowTo-03a_Find_Experiments_and_Variables_for_given_Opportunities.ipynb), ["HowTo-03b"](notebooks/HowTo-03b_Find_Experiments_and_Variables_for_given_Opportunities.ipynb)
584
+ * viewing attributes of experiments and variables: ["HowTo-04a"](notebooks/HowTo-04a_View_Attributes_of_Experiments_and_Variables.ipynb), ["HowTo-04b"](notebooks/HowTo-04a_View_Attributes_of_Experiments_and_Variables.ipynb)
585
+ * applying various search filters: ["HowTo-05"](notebooks/HowTo-05_Apply_Various_Search_Critria.ipynb)
586
+
587
+ ### Python Scripts
588
+
589
+ Python scripts objective is to illustrate some use-case workflows.
590
+
591
+ :construction: *This section is under construction.*
592
+
593
+ ## Documentation
594
+
595
+ ### General Documentation
596
+
597
+ :construction: *This section is under construction.*
598
+
599
+
600
+ ### Technical Documentation
601
+
602
+ Auto-generated code documentation can be [found here](https://cmip-data-request.github.io/CMIP7_DReq_Software/data_request_api/).
603
+
604
+ ## Contact
605
+
606
+ The CMIP7 Data Request Task Team encourages user feedback to help us improve the software.
607
+ Here are some ways to provide feedback:
608
+ - For *specific questions or issues* (such as bugs) please [open a github issue](https://github.com/CMIP-Data-Request/CMIP7_DReq_Software/issues).
609
+ - For *more general questions or concerns*, such as suggestions for new features, contribute to the Software's [github discussion forum](https://github.com/CMIP-Data-Request/CMIP7_DReq_Software/discussions).
610
+
611
+ ## Contributors
612
+
613
+ [![Contributors](https://contrib.rocks/image?repo=CMIP-Data-Request/CMIP7_DReq_Software)](https://github.com/CMIP-Data-Request/CMIP7_DReq_Software/graphs/contributors/)
614
+ *Thanks to our contributors!*