source: TOOLS/PACK_IPSL/write_liste_tar.sh @ 1714

Last change on this file since 1714 was 1714, checked in by acosce, 12 years ago

If a simulation has a size less than 1Go we tar it

  • Property svn:executable set to *
File size: 1.3 KB
Line 
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
8config_card=${1}
9
10# Declaration des variables
11
12# ----
13export JOB_DIR=${JOB_DIR:-${PWD}}
14export IGCM_DEM=${IGCM_DEM:-${SCRATCHDIR}/IGCM_DEM}
15export IGCM_TMP=${IGCM_TMP:-${IGCM_DEM}/tmp}
16mkdir -p ${IGCM_DEM}
17mkdir -p ${IGCM_TMP}
18clean_tmp=${clean_tmp:-yes}
19EXE_DIR=$(dirname ${0} )
20SCRIPT_NAME=$(basename ${0} )
21source ${EXE_DIR}/DEM_utilities.sh
22DEM_log -0 "Demmarrage de ${SCRIPT_NAME}"
23cd ${JOB_DIR}
24# ----
25DEM_log -0 "Debut de ${SCRIPT_NAME}"
26DEM_log -0 "On va archiver via tar la simulation " ${PATH_SIMUL_FULL}
27DEM_log -0 "config_card : ${config_card}"
28
29eval $(grep JobName         ${config_card}) 
30eval $(grep PATH_SIMUL_FULL ${config_card}) 
31eval $(grep DateBegin       ${config_card}) 
32eval $(grep DateEnd         ${config_card}) 
33eval $(grep IGCM_DEM_SIMU   ${config_card})
34
35
36echo  ${PATH_SIMUL_FULL} > ${IGCM_DEM_SIMU}/tar_full_simul.txt
37
38# Dans ce cas la on efface les eventuelles listes deja creees
39rm -f ${IGCM_DEM_SIMU}/tar_no_output_files.txt
40rm -f ${IGCM_DEM_SIMU}/tar_no_restart_files.txt
41
42DEM_write_state ${IGCM_DEM}/config_card.liste ${config_card} WriteListTarDone
43
44DEM_log -0 "Fin de ${SCRIPT_NAME}"
Note: See TracBrowser for help on using the repository browser.