Skip to content
Snippets Groups Projects
Commit 6f7fd304 authored by Guillaume Samson's avatar Guillaume Samson :snowman2:
Browse files

Merge branch 'sette_custom_dir' into 'main'

Sette custom dir

See merge request nemo/nemo!7
parents 66e1c230 1983e47a
No related branches found
No related tags found
No related merge requests found
......@@ -171,8 +171,8 @@ clean_config() {
# define validation dir
set_valid_dir () {
REVISION_NB=`git rev-list --abbrev-commit origin | head -1l`
REV_DATE0="`git log -1 | grep Date | sed -e 's/.*Date: *//' -e's/ +.*$//'`"
REVISION_NB=`git -C ${MAIN_DIR} rev-list --abbrev-commit origin | head -1l`
REV_DATE0="`git -C ${MAIN_DIR} log -1 | grep Date | sed -e 's/.*Date: *//' -e's/ +.*$//'`"
REV_DATE=`${DATE_CONV}"${REV_DATE0}" +"%y%j"`
REVISION_NB=${REV_DATE}_${REVISION_NB}
if [ ${#REVISION_NB} -eq 0 ]
......@@ -185,7 +185,7 @@ set_valid_dir () {
else
echo "value of revision number of NEMOGCM: ${REVISION_NB}"
fi
localchanges=`git status --short -uno | wc -l`
localchanges=`git -C ${MAIN_DIR} status --short -uno | wc -l`
if [[ $localchanges > 0 ]] ; then
REVISION_NB=${REVISION_NB}+
fi
......
......@@ -37,6 +37,8 @@ FORCING_DIR=${SETTE_FORCING_DIR:-$WORKDIR/FORCING}
NEMO_VALIDATION_DIR=${SETTE_NEMO_VALIDATION_DIR:-$MAIN_DIR}/NEMO_VALIDATION
# input files storing (namelist, iodef ...) (DO NOT CHANGE)
INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
# optional custom SETTE tests directory
#export CUSTOM_DIR=/path/to/custom/sette/tests
# ------------------------------------------------------------------------------------------
#
# RUN setup
......
......@@ -64,12 +64,15 @@ set -o posix
#-
cd ${CONFIG_DIR}
mkdir -p ${NEW_CONF}/${TEST_NAME}
# PREPARE EXEC_DIR
#==================
export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}
if [ -z "${CUSTOM_DIR}" ]; then
export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}
else
NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null )
export EXE_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}/${NEW_CONF}/${TEST_NAME}
fi
mkdir -p ${EXE_DIR}
cp -RL ${CONFIG_DIR}/${NEW_CONF}/EXP00/* ${EXE_DIR}/.
#cat ${SETTE_DIR}/iodef_sette.xml | sed -e"s;DEF_SHARED;${CONFIG_DIR0}/SHARED;" > ${EXE_DIR}/iodef.xml
......
......@@ -36,11 +36,11 @@ export USER_INPUT='yes' # Default: yes => request user input on decisions
# 3. regarding creation of directories
#
# Check that git branch is usable
git branch --show-current >&/dev/null
git branch --show-current >& /dev/null
if [[ $? == 0 ]] ; then
# subdirectory below NEMO_VALIDATION_DIR defaults to branchname
export SETTE_SUB_VAL="$(git branch --show-current)"
export SETTE_THIS_BRANCH=$SETTE_SUB_VAL
export SETTE_SUB_VAL="$(git branch --show-current)"
export SETTE_THIS_BRANCH=${SETTE_SUB_VAL}
else
# subdirectory below NEMO_VALIDATION_DIR defaults to "MAIN"
export SETTE_SUB_VAL="MAIN"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment