source: trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh @ 3595

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
10echo "Cleaning..."
11# Cleaning of files in the current folder
12rm -f Bands*.dat
13rm -f data2reshape*
14rm -f data_PCM_Y*
15rm -f info_PEM.txt
16find . -type f -name "PCMrun*.job" ! -name "PCMrun.job" -delete
17rm -f *.out
18rm -f kill_launchPEM.sh
19rm -f log_launchPEM.txt
20rm -f out_run*
21rm -f run.def
22rm -f start*.nc
23rm -f used_*
24rm -f Xdiurnalave.nc
25rm -f xios_client_*
26rm -f diag*.nc
27rm -f restart*.nc
28rm -f restart1D*.txt
29rm -f start1D*.txt
30# Reset the initial starting files to prepare a new simulation
31if [ -f "starts/startfi.nc" ]; then
32    cp starts/startfi.nc .
33fi
34if [ -f "starts/start.nc" ]; then
35    cp starts/start.nc .
36elif [ -f "starts/start1D.txt" ]; then
37    cp starts/start1D.txt .
38fi
39if [ -f "starts/startpem.nc" ]; then
40    cp starts/startpem.nc .
41fi
42# Cleaning of files in the sub-folders
43rm -f diags/*
44rm -f starts/*
45rm -f out_PCM/*
46rm -f out_PEM/*
47echo "Done!"
Note: See TracBrowser for help on using the repository browser.