Skip to content

Commit

Permalink
Solve last small issue with clean conflict #802.
Browse files Browse the repository at this point in the history
  • Loading branch information
treerink committed Feb 16, 2024
1 parent 3ec83d4 commit a8488f8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
36 changes: 20 additions & 16 deletions ece2cmor3/scripts/add-htessel-vegetation-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
# Thomas Reerink
#
# This script adds some non-cmor variables (which thus do not exit in
# the CMIP6 data request) to the Eyr & Emon CMOR tables.
# the CMIP6 data request) to a new HTESEELmon CMOR table.
#
# This script requires no arguments.
# This script requires one argument.
#
# Run example:
# ./add-htessel-vegetation-variables.sh
# For examples how to call this script, run it without arguments.
#

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

add_the_htessel_vegetation_variables=True
do_clean=$1

if [ add_the_htessel_vegetation_variables ]; then
if [ ${do_clean} == 'clean-before' ] || [ ${do_clean} == 'no-clean-before' ]; then
# See #802 https://github.com/EC-Earth/ece2cmor3/issues/#802
# See #1312-106 https://dev.ec-earth.org/issues/1312#note-106

Expand All @@ -31,8 +30,10 @@ if [ "$#" -eq 0 ]; then
table_file_HTESSELmon=CMIP6_HTESSELmon.json

cd ${table_path}
rm -f ${table_file_HTESSELmon}
git checkout ${table_file_cv}
if [ ${do_clean} == 'clean-before' ]; then
rm -f ${table_file_HTESSELmon}
git checkout ${table_file_cv}
fi

sed -i '/"IfxAnt"/i \
"HTESSELmon",
Expand Down Expand Up @@ -88,14 +89,17 @@ if [ "$#" -eq 0 ]; then
echo

else
echo
echo " Nothing done, no set of variables and / or experiments has been selected to add to the tables."
echo
echo
echo " This scripts requires one argument: There are only two options:"
echo " $0 clean-before"
echo " $0 no-clean-before"
echo
fi

else
echo
echo " This scripts requires no argument:"
echo " $0"
echo
echo
echo " This scripts requires one argument: There are only two options:"
echo " $0 clean-before"
echo " $0 no-clean-before"
echo
fi
2 changes: 1 addition & 1 deletion ece2cmor3/scripts/genecec-for-individual-experiments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if [ "$#" -eq 5 ]; then
if [ ${data_request_file##*/} = 'optimesm-request-EC-EARTH-CC-varlist.json' ]; then
./add-lpjg-cc-diagnostics.sh
./add-variables-for-co2box.sh
./add-htessel-vegetation-variables.sh
./add-htessel-vegetation-variables.sh no-clean-before
fi

rm -rf ${output_dir}
Expand Down

0 comments on commit a8488f8

Please sign in to comment.