<commit_before>#!/bin/bash
# <NAME>
#
# This scripts needs one argument:
#
# ${1} the first   argument is the name of the control-output-files directory.
#
#
# Run example:
#  ./apply-the-s126-s585-request-for-s245-370.sh control-output-files
#
# With this script the ScenarioMIP requests for ScenarioMIP-ssp245 & ScenarioMIP-ssp370 are taken equal to the ones of ScenarioMIP-ssp585 & ScenarioMIP-ssp126.
# We consider it as a flaw in the data request that they differ, see also issue 517: https://github.com/EC-Earth/ece2cmor3/issues/517
#
# This script is part of the subpackage genecec (GENerate EC-Eearth Control output files)
# which is part of ece2cmor3.
#
# Note that this script is called at the end of the script:
#  genecec.py


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

 # The name of the control output files directory:
 cofdir=$1

# Generating the lists has been done with help of:
#  ls ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[5]*/ppt0000000000 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[5]*/pptdddddd0600 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[5]*/cmip6-data-request-varlist-ScenarioMIP-ssp*-EC-EARTH-*.json
#  ls ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[2-3]*/ppt0000000000 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[2-3]*/pptdddddd0600 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[2-3]*/cmip6-data-request-varlist-ScenarioMIP-ssp*-EC-EARTH-*.json

# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AerChem.json   ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-AerChem.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AerChem.json   ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-AerChem.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AOGCM.json       ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-AOGCM.json
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AOGCM.json       ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-AOGCM.json
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg.json           ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-Veg.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg.json           ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-Veg.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg-LR.json     ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-Veg-LR.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg-LR.json     ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-Veg-LR.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600

else
    echo '  '
    echo '  This scripts requires one argument, the control output directory:'
    echo '  ' $0 control-output-files
    echo '  '
fi<commit_msg>Reorganize the commented lines for fixing the scenario requests for other configurations, the bottom part does not need any adjustment #517.<commit_after>#!/bin/bash
# <NAME>
#
# This scripts needs one argument:
#
# ${1} the first   argument is the name of the control-output-files directory.
#
#
# Run example:
#  ./apply-the-s126-s585-request-for-s245-370.sh control-output-files
#
# With this script the ScenarioMIP requests for ScenarioMIP-ssp245 & ScenarioMIP-ssp370 are taken equal to the ones of ScenarioMIP-ssp585 & ScenarioMIP-ssp126.
# We consider it as a flaw in the data request that they differ, see also issue 517: https://github.com/EC-Earth/ece2cmor3/issues/517
#
# This script is part of the subpackage genecec (GENerate EC-Eearth Control output files)
# which is part of ece2cmor3.
#
# Note that this script is called at the end of the script:
#  genecec.py


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

 # The name of the control output files directory:
 cofdir=$1

# Generating the lists has been done with help of:
#  ls ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[5]*/ppt0000000000 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[5]*/pptdddddd0600 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[5]*/cmip6-data-request-varlist-ScenarioMIP-ssp*-EC-EARTH-*.json
#  ls ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[2-3]*/ppt0000000000 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[2-3]*/pptdddddd0600 ScenarioMIP/*/cmip6-experiment-ScenarioMIP-ssp[2-3]*/cmip6-data-request-varlist-ScenarioMIP-ssp*-EC-EARTH-*.json

  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AOGCM.json       ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-AOGCM.json
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AOGCM.json       ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-AOGCM.json
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
  cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                           ${cofdir}/ScenarioMIP/EC-EARTH-AOGCM/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg-LR.json     ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-Veg-LR.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg-LR.json     ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-Veg-LR.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                          ${cofdir}/ScenarioMIP/EC-EARTH-Veg-LR/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AerChem.json   ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-AerChem.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600

# All lines below seem to be not relevant, as thise are identical already (see: https://github.com/EC-Earth/ece2cmor3/issues/517#issuecomment-535495023):
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-AerChem.json   ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-AerChem.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                         ${cofdir}/ScenarioMIP/EC-EARTH-AerChem/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg.json           ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp245/cmip6-data-request-varlist-ScenarioMIP-ssp245-EC-EARTH-Veg.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp245/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp245/pptdddddd0600
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/cmip6-data-request-varlist-ScenarioMIP-ssp585-EC-EARTH-Veg.json           ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp370/cmip6-data-request-varlist-ScenarioMIP-ssp370-EC-EARTH-Veg.json
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/ppt0000000000                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp370/ppt0000000000
# cp -f ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp585/pptdddddd0600                                                             ${cofdir}/ScenarioMIP/EC-EARTH-Veg/cmip6-experiment-ScenarioMIP-ssp370/pptdddddd0600

else
    echo '  '
    echo '  This scripts requires one argument, the control output directory:'
    echo '  ' $0 control-output-files
    echo '  '
fi
{'fraction_non_alphanumeric': 0.12364976490024146, 'fraction_numerical': 0.07262676324818909, 'mean_word_length': 2.8766009852216747, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 36, 'word_list_counts': {'cursed_substrings.json': 64, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '979605', 'n_tokens_mistral': 6932, 'n_tokens_neox': 6272, 'n_words': 498}