<commit_before>#!/bin/bash
# <NAME>
#
# This script adds / inserts some non-cmor variables and /or non (yet) approved CMIP endorsed experiments (which thus
# do not exit in the CMIP6 data request) to the end of the cmor table in question.
#
# This scripts requires no arguments.
#
# Run example:
#  ./add-covidMIP-experiments.sh
#

if [ "$#" -eq 0 ]; then

 add_the_covidMIP_experiments=True             # See #847 & #895


 if [ add_the_covidMIP_experiments ]; then
  # See #847 & #895, the addition of five Covid experiments:
  #  CovidMIP ssp245-covid
  #  CovidMIP ssp245-cov-strgreen
  #  CovidMIP ssp245-cov-modgreen
  #  CovidMIP ssp245-cov-fossil
  #  CovidMIP ssp245-cov-aer

  cd ../resources/cmip6-cmor-tables
  git checkout Tables/CMIP6_CV.json
  cd -

  sed -i  '/"ssp370":{/i \
            "ssp245-covid":{                                                                                                                          \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip based upon ssp245",                                                                      \
                "experiment_id":"ssp245-covid",                                                                                                       \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-strgreen":{                                                                                                                   \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip followed by strong-green stimulus recovery, based upon ssp245",                          \
                "experiment_id":"ssp245-cov-strgreen",                                                                                                \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-modgreen":{                                                                                                                   \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip followed by moderate-green stimulus recovery, based upon ssp245",                        \
                "experiment_id":"ssp245-cov-modgreen",                                                                                                \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-fossil":{                                                                                                                     \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip followed by increased emissions due to a fossil-fuel based recovery, based upon ssp245", \
                "experiment_id":"ssp245-cov-fossil",                                                                                                  \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-aer":{                                                                                                                        \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip including anthropogenic aerosols only, based upon ssp245",                               \
                "experiment_id":"ssp245-cov-aer",                                                                                                     \<commit_msg>Correct the additional_allowed_model_components attribute in the CovidMIP CMOR table insertions #663.<commit_after>#!/bin/bash
# <NAME>
#
# This script adds / inserts some non-cmor variables and /or non (yet) approved CMIP endorsed experiments (which thus
# do not exit in the CMIP6 data request) to the end of the cmor table in question.
#
# This scripts requires no arguments.
#
# Run example:
#  ./add-covidMIP-experiments.sh
#

if [ "$#" -eq 0 ]; then

 add_the_covidMIP_experiments=True             # See #847 & #895


 if [ add_the_covidMIP_experiments ]; then
  # See #847 & #895, the addition of five Covid experiments:
  #  CovidMIP ssp245-covid
  #  CovidMIP ssp245-cov-strgreen
  #  CovidMIP ssp245-cov-modgreen
  #  CovidMIP ssp245-cov-fossil
  #  CovidMIP ssp245-cov-aer

  cd ../resources/cmip6-cmor-tables
  git checkout Tables/CMIP6_CV.json
  cd -

  sed -i  '/"ssp370":{/i \
            "ssp245-covid":{                                                                                                                          \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER",                                                                                                                            \
                    "CHEM",                                                                                                                           \
                    "BGC"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip based upon ssp245",                                                                      \
                "experiment_id":"ssp245-covid",                                                                                                       \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-strgreen":{                                                                                                                   \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER",                                                                                                                            \
                    "CHEM",                                                                                                                           \
                    "BGC"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip followed by strong-green stimulus recovery, based upon ssp245",                          \
                "experiment_id":"ssp245-cov-strgreen",                                                                                                \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-modgreen":{                                                                                                                   \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER",                                                                                                                            \
                    "CHEM",                                                                                                                           \
                    "BGC"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip followed by moderate-green stimulus recovery, based upon ssp245",                        \
                "experiment_id":"ssp245-cov-modgreen",                                                                                                \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-fossil":{                                                                                                                     \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER",                                                                                                                            \
                    "CHEM",                                                                                                                           \
                    "BGC"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip followed by increased emissions due to a fossil-fuel based recovery, based upon ssp245", \
                "experiment_id":"ssp245-cov-fossil",                                                                                                  \
                "parent_activity_id":[                                                                                                                \
                    "ScenarioMIP"                                                                                                                     \
                ],                                                                                                                                    \
                "parent_experiment_id":[                                                                                                              \
                    "ssp245"                                                                                                                          \
                ],                                                                                                                                    \
                "required_model_components":[                                                                                                         \
                    "AOGCM"                                                                                                                           \
                ],                                                                                                                                    \
                "sub_experiment_id":[                                                                                                                 \
                    "none"                                                                                                                            \
                ]                                                                                                                                     \
            },                                                                                                                                        \
            "ssp245-cov-aer":{                                                                                                                        \
                "activity_id":[                                                                                                                       \
                    "DAMIP"                                                                                                                           \
                ],                                                                                                                                    \
                "additional_allowed_model_components":[                                                                                               \
                    "AER",                                                                                                                            \
                    "CHEM",                                                                                                                           \
                    "BGC"                                                                                                                             \
                ],                                                                                                                                    \
                "experiment":"2-year Covid-19 emissions blip including anthropogenic aerosols only, based upon ssp245",                               \
                "experiment_id":"ssp245-cov-aer",                                                                                                     \
{'fraction_non_alphanumeric': 0.03259739465476118, 'fraction_numerical': 0.0065745214359977985, 'mean_word_length': 0.16360078277886497, 'pattern_counts': {'":': 84, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1066, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '361269', 'n_tokens_mistral': 2908, 'n_tokens_neox': 2494, 'n_words': 428}