1 | #!/bin/bash |
---|
2 | |
---|
3 | #On decide d'archiver via tar une simulation entiere : |
---|
4 | # - si elle est trop petite |
---|
5 | # - si elle ne contient aucun fichier d'output correspondant a la norme etablie JobName_date |
---|
6 | |
---|
7 | |
---|
8 | config_card=${1} |
---|
9 | |
---|
10 | # Declaration des variables |
---|
11 | |
---|
12 | # ---- |
---|
13 | export JOB_DIR=${JOB_DIR:-${PWD}} |
---|
14 | export IGCM_DEM=${IGCM_DEM:-${SCRATCHDIR}/IGCM_DEM} |
---|
15 | export IGCM_TMP=${IGCM_TMP:-${IGCM_DEM}/tmp} |
---|
16 | mkdir -p ${IGCM_DEM} |
---|
17 | mkdir -p ${IGCM_TMP} |
---|
18 | clean_tmp=${clean_tmp:-yes} |
---|
19 | EXE_DIR=$(dirname ${0} ) |
---|
20 | SCRIPT_NAME=$(basename ${0} ) |
---|
21 | source ${EXE_DIR}/DEM_utilities.sh |
---|
22 | DEM_log -0 "Demmarrage de ${SCRIPT_NAME}" |
---|
23 | cd ${JOB_DIR} |
---|
24 | # ---- |
---|
25 | DEM_log -0 "Debut de ${SCRIPT_NAME}" |
---|
26 | DEM_log -0 "On va archiver via tar la simulation " ${PATH_SIMUL_FULL} |
---|
27 | DEM_log -0 "config_card : ${config_card}" |
---|
28 | |
---|
29 | eval $(grep JobName ${config_card}) |
---|
30 | eval $(grep PATH_SIMUL_FULL ${config_card}) |
---|
31 | eval $(grep DateBegin ${config_card}) |
---|
32 | eval $(grep DateEnd ${config_card}) |
---|
33 | eval $(grep IGCM_DEM_SIMU ${config_card}) |
---|
34 | |
---|
35 | |
---|
36 | echo ${PATH_SIMUL_FULL} > ${IGCM_DEM_SIMU}/tar_full_simul.txt |
---|
37 | |
---|
38 | # Dans ce cas la on efface les eventuelles listes deja creees |
---|
39 | rm -f ${IGCM_DEM_SIMU}/tar_no_output_files.txt |
---|
40 | rm -f ${IGCM_DEM_SIMU}/tar_no_restart_files.txt |
---|
41 | |
---|
42 | DEM_write_state ${IGCM_DEM}/config_card.liste ${config_card} WriteListTarDone |
---|
43 | |
---|
44 | DEM_log -0 "Fin de ${SCRIPT_NAME}" |
---|