Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MAR - CARAIB
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dethinne Thomas
MAR - CARAIB
Commits
d30e6353
Commit
d30e6353
authored
5 months ago
by
Dethinne Thomas
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
a0cfe139
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
couplage/set_repository.sh
+77
-0
77 additions, 0 deletions
couplage/set_repository.sh
with
77 additions
and
0 deletions
couplage/set_repository.sh
0 → 100644
+
77
−
0
View file @
d30e6353
#!/bin/bash
#Define your region
reg
=
"EU"
#Define your domain
cod
=
"x"
#Define your country
count
=
"Belgium"
#Define the path to your copy of NESTOR domain
nest
=
"/climato_tmp1/tdethinne/domains/NST.2018.08.01.00.EUa.nc"
#Define the path to your file necessary as Caraib Starting point
str
=
"/climato_tmp1/tdethinne/srv9/init_data"
#+++++++++++++++++++++++++++++++++#
# do not edit after here #
#+++++++++++++++++++++++++++++++++#
# Check if an argument is provided
if
[
-z
"
$1
"
]
;
then
echo
"Usage:
$0
<0 or 1>"
exit
1
fi
dom
=
$reg$cod
directory
=
/climato_tmp1/
$USER
/MAR/out/
$dom
/
# Perform actions based on the argument
if
[
"
$1
"
-eq
0
]
;
then
echo
"The script will set your MAR/out/
$dom
/so it match the required shape and move the files"
fi
if
[
"
$1
"
-eq
1
]
;
then
echo
" The script will set your MAR/out/
$dom
/so it match the required shape and move the files and compile the model"
fi
# Copy the code of the coupling
echo
"Copy of the code"
mkdir
-p
$directory
/
${
cod
}
99/code
scp
-r
/climato_tmp1/tdethinne/MAR/src/MARCAR/
*
$directory
/
${
cod
}
99/code
ln
-s
MAR_c01.exe MAR_
${
cod
}
99.exe
if
[
"
$1
"
-eq
1
]
;
then
echo
"Compile the code"
$directory
/
${
cod
}
99/code/COMPILE
fi
#Recreate the CARAIB directories
mkdir
-p
$directory
/CARAIB_couplage/
mkdir
-p
$directory
/CARAIB_couplage/clim/
$count
/
mkdir
-p
$directory
/CARAIB_couplage/ctrl/
mkdir
-p
$directory
/CARAIB_couplage/data/
mkdir
-p
$directory
/CARAIB_couplage/results/
$count
/
#Move the MAR results to a new place
echo
"move the MAR results to another place"
mkdir
-p
$directory
/
${
cod
}
99/mar/
mkdir
-p
$directory
/
${
cod
}
99/caraib/
mv
19
*
$directory
/
${
cod
}
99/mar/
mv
20
*
$directory
/
${
cod
}
99/mar/
mv
21
*
$directory
/
${
cod
}
99/mar/
echo
"Copy the necessary files"
cp
$nest
$directory
/CARAIB_couplage/clim/
$count
/
cp
/srv9_tmp1/tdethinne/data_to_coupled/
*
.dat
$directory
/CARAIB_couplage/ctrl/
cp
/srv9_tmp1/tdethinne/data_to_coupled/ecotx.1x1
$directory
/CARAIB_couplage/data/
cp
-r
/srv9_tmp1/tdethinne/data_to_coupled/plantparams
$directory
/CARAIB_couplage/
mv
$str
/
*
.dat
$directory
/CARAIB_couplage/clim/
$count
/
mv
$str
/
*
.res
$directory
/CARAIB_couplage/reslts/
$count
/
mv
$str
/plantparams
$directory
/CARAIB_couplage/
mv
$str
/man
$directory
/CARAIB_couplage/clim/
$count
/man
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