Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GOSI9esm
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
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
Consortium Members
UKMO
GOSI
GOSI9esm
Commits
6b99f691
Commit
6b99f691
authored
2 years ago
by
Sebastien Masson
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "makenemo does not create EXP00 for existing configs"
parent
6ce630d4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
makenemo
+1
-1
1 addition, 1 deletion
makenemo
mk/Fmake_config.sh
+34
-15
34 additions, 15 deletions
mk/Fmake_config.sh
with
35 additions
and
16 deletions
makenemo
+
1
−
1
View file @
6b99f691
...
...
@@ -349,8 +349,8 @@ if [ ${TML_CONF} != ${NEW_CONF} ]; then
printf
"
\n
You are installing a new configuration %s from %s "
${
NEW_CONF
}
${
TML_CONF
}
if
[
-n
"
${
NEM_SUBDIR
}
"
]
;
then
printf
"with sub-components: %s
\n
"
"
${
NEM_SUBDIR
}
"
;
fi
echo
${
COMPIL_DIR
}
/Fmake_config.sh
${
NEMO_TDIR
}
/
${
NEW_CONF
}
${
CONFIG_DIR
}
/
${
TML_CONF
}
fi
${
COMPIL_DIR
}
/Fmake_config.sh
${
NEMO_TDIR
}
/
${
NEW_CONF
}
${
CONFIG_DIR
}
/
${
TML_CONF
}
# must be called for existing config to create EXP00 if not existing
## Save new configuration with sub-components set in work_cfgs.txt
[
-f
${
CONFIG_DIR
}
/work_cfgs.txt
]
&&
sed
-i
"/^
${
NEW_CONF
}
/d"
${
CONFIG_DIR
}
/work_cfgs.txt
...
...
This diff is collapsed.
Click to expand it.
mk/Fmake_config.sh
+
34
−
15
View file @
6b99f691
...
...
@@ -25,12 +25,10 @@ set -o posix
# ===========
#
#
# - Make the config directory
# - Create repositories needed :
#
# - EXP00 for namelist
# - MY_SRC for user sources
# - BLD for compilation
# - Make the config directory if needed
# - Create repositories if needed :
# - EXP00 for namelist, xml and AGRIF_FixedGrids.in
# - MY_SRC for user sources
#
# EXAMPLES
# ========
...
...
@@ -56,12 +54,33 @@ set -o posix
# * creation
#
#-
\m
kdir
-p
${
1
}
\m
kdir
-p
${
1
}
/EXP00
\m
kdir
-p
${
1
}
/MY_SRC
[
"
${
2
}
/cpp_
${
2
##*/
}
.fcm"
!=
"
${
1
}
/cpp_
${
1
##*/
}
.fcm"
]
&&
\c
p
-R
-n
${
2
}
/cpp_
${
2
##*/
}
.fcm
${
1
}
/cpp_
${
1
##*/
}
.fcm
for
f
in
${
2
}
/EXPREF/
*
.xml
${
2
}
/EXPREF/
*
namelist
*
;
do
if
[[
-L
${
f
}
&&
$(
readlink
-f
${
f
}
)
=
~
"SHARED"
]]
;
then
ln
-sf
$(
readlink
-f
${
f
}
)
${
1
}
/EXP00/
$(
basename
${
f
}
)
;
else
cp
-R
-n
${
f
}
${
1
}
/EXP00/.
;
fi
done
[
-f
${
2
}
/EXPREF/AGRIF_FixedGrids.in
]
&&
\c
p
-a
-n
${
2
}
/EXPREF/AGRIF_FixedGrids.in
${
1
}
/EXP00/.
[
-d
${
2
}
/MY_SRC
]
&&
\c
p
-an
${
2
}
/MY_SRC/
*
${
1
}
/MY_SRC/. 2> /dev/null
[
!
-d
${
1
}
]
&&
\m
kdir
-p
${
1
}
[
"
${
2
}
"
!=
"
${
1
}
"
]
&&
\c
p
-n
${
2
}
/cpp_
${
2
##*/
}
.fcm
${
1
}
/cpp_
${
1
##*/
}
.fcm
#
if
[
!
-d
${
1
}
/EXP00
]
then
echo
" Creating
${
1
}
/EXP00"
\m
kdir
-p
${
1
}
/EXP00
echo
" -> Copying existing xml, namelist and AGRIF_FixedGrids.in files from
${
2
}
/EXPREF to
${
1
}
/EXP00"
for
f
in
$(
ls
-1
${
2
}
/EXPREF/
*
.xml
${
2
}
/EXPREF/
*
namelist
*
${
2
}
/EXPREF/AGRIF_FixedGrids.in 2>/dev/null
)
do
if
[[
-L
${
f
}
&&
$(
readlink
-f
${
f
}
)
=
~
"SHARED"
]]
then
\l
n
-sf
$(
readlink
-f
${
f
}
)
${
1
}
/EXP00/
$(
basename
${
f
}
)
# keep link from SHARED
else
\c
p
${
f
}
${
1
}
/EXP00/.
fi
done
fi
#
if
[
!
-d
${
1
}
/MY_SRC
]
then
if
[
-d
${
2
}
/MY_SRC
]
then
echo
" Copying
${
2
}
/MY_SRC to
${
1
}
/MY_SRC"
\c
p
-a
${
2
}
/MY_SRC
${
1
}
/MY_SRC 2> /dev/null
else
echo
" Creating
${
1
}
/MY_SRC"
\m
kdir
-p
${
1
}
/MY_SRC
# create an empty directory
fi
fi
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