Skip to content
Snippets Groups Projects
Commit d30e6353 authored by Dethinne Thomas's avatar Dethinne Thomas
Browse files

Upload New File

parent a0cfe139
No related branches found
No related tags found
No related merge requests found
#!/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
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