Last change
on this file since 3595 was
3579,
checked in by jbclement, 9 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
|
Rev | Line | |
---|
[3351] | 1 | #!/bin/bash |
---|
| 2 | ######################################################### |
---|
| 3 | ### Script to clean the folder after a PEM simulation ### |
---|
[3579] | 4 | ### and reset the initial starting files to prepare a ### |
---|
| 5 | ### new simulation ### |
---|
[3351] | 6 | ######################################################### |
---|
[3579] | 7 | # There is no argument, you can just execute it. |
---|
| 8 | ################################################ |
---|
[3351] | 9 | |
---|
| 10 | echo "Cleaning..." |
---|
[3354] | 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 |
---|
[3394] | 16 | find . -type f -name "PCMrun*.job" ! -name "PCMrun.job" -delete |
---|
[3354] | 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 |
---|
[3351] | 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 |
---|
[3428] | 39 | if [ -f "starts/startpem.nc" ]; then |
---|
| 40 | cp starts/startpem.nc . |
---|
| 41 | fi |
---|
[3354] | 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/* |
---|
[3351] | 47 | echo "Done!" |
---|
Note: See
TracBrowser
for help on using the repository browser.