Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Nemo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Hatfield
Nemo
Commits
1983e47a
Commit
1983e47a
authored
3 years ago
by
Guillaume Samson
Browse files
Options
Downloads
Patches
Plain Diff
Sette custom dir
parent
66e1c230
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
sette/all_functions.sh
+3
-3
3 additions, 3 deletions
sette/all_functions.sh
sette/param.cfg
+2
-0
2 additions, 0 deletions
sette/param.cfg
sette/prepare_exe_dir.sh
+7
-4
7 additions, 4 deletions
sette/prepare_exe_dir.sh
sette/sette.sh
+3
-3
3 additions, 3 deletions
sette/sette.sh
with
15 additions
and
10 deletions
sette/all_functions.sh
+
3
−
3
View file @
1983e47a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
sette/param.cfg
+
2
−
0
View file @
1983e47a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
sette/prepare_exe_dir.sh
+
7
−
4
View file @
1983e47a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
sette/sette.sh
+
3
−
3
View file @
1983e47a
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment