source: TOOLS/SURPACK_IPSL/write_liste_tar.sh @ 3624

Last change on this file since 3624 was 2136, checked in by acosce, 11 years ago

add new tools allows packing simulation alreaddy pack (so pack with a bigger frequency)

File size: 1.8 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:-${TMP_MIGR_DATA}}
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.list
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
42
43# gpdebug : traitement des simu < 1 Go ou de type create_etat0 : il faut virer ces rep
44#           (et pas slt leur contenu) pour pouvoir integrer le traitement specifique
45#           de ces simu dans "enlarge_my_files.sh" (sequentiel) et  "process_list.sh" (parallele)
46# rm -f ${IGCM_DEM_SIMU}/work_cp/*
47# rm -f ${IGCM_DEM_SIMU}/store_cp/*
48# rm -f ${IGCM_DEM_SIMU}/other_tar/*
49
50rm -rf ${IGCM_DEM_SIMU}/work_cp
51rm -rf ${IGCM_DEM_SIMU}/store_cp
52rm -rf ${IGCM_DEM_SIMU}/other_tar
53
54DEM_write_state ${IGCM_DEM}/config_card.liste ${config_card} WriteListTarDone
55
56DEM_log -0 "Fin de ${SCRIPT_NAME}"
Note: See TracBrowser for help on using the repository browser.