Last change
on this file since 3595 was
3579,
checked in by jbclement, 8 days ago
|
PEM:
Improvement of the Bash script tools in the deftank with an automatic error detection which ends the script with a message.
JBC
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | ######################################################### |
---|
3 | ### Script to clean the folder after a PEM simulation ### |
---|
4 | ### and reset the initial starting files to prepare a ### |
---|
5 | ### new simulation ### |
---|
6 | ######################################################### |
---|
7 | # There is no argument, you can just execute it. |
---|
8 | ################################################ |
---|
9 | |
---|
10 | echo "Cleaning..." |
---|
11 | # Cleaning of files in the current folder |
---|
12 | rm -f Bands*.dat |
---|
13 | rm -f data2reshape* |
---|
14 | rm -f data_PCM_Y* |
---|
15 | rm -f info_PEM.txt |
---|
16 | find . -type f -name "PCMrun*.job" ! -name "PCMrun.job" -delete |
---|
17 | rm -f *.out |
---|
18 | rm -f kill_launchPEM.sh |
---|
19 | rm -f log_launchPEM.txt |
---|
20 | rm -f out_run* |
---|
21 | rm -f run.def |
---|
22 | rm -f start*.nc |
---|
23 | rm -f used_* |
---|
24 | rm -f Xdiurnalave.nc |
---|
25 | rm -f xios_client_* |
---|
26 | rm -f diag*.nc |
---|
27 | rm -f restart*.nc |
---|
28 | rm -f restart1D*.txt |
---|
29 | rm -f start1D*.txt |
---|
30 | # Reset the initial starting files to prepare a new simulation |
---|
31 | if [ -f "starts/startfi.nc" ]; then |
---|
32 | cp starts/startfi.nc . |
---|
33 | fi |
---|
34 | if [ -f "starts/start.nc" ]; then |
---|
35 | cp starts/start.nc . |
---|
36 | elif [ -f "starts/start1D.txt" ]; then |
---|
37 | cp starts/start1D.txt . |
---|
38 | fi |
---|
39 | if [ -f "starts/startpem.nc" ]; then |
---|
40 | cp starts/startpem.nc . |
---|
41 | fi |
---|
42 | # Cleaning of files in the sub-folders |
---|
43 | rm -f diags/* |
---|
44 | rm -f starts/* |
---|
45 | rm -f out_PCM/* |
---|
46 | rm -f out_PEM/* |
---|
47 | echo "Done!" |
---|
Note: See
TracBrowser
for help on using the repository browser.