source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_calculo.ksh @ 61

Last change on this file since 61 was 61, checked in by sdipsl, 15 years ago
  • Add UnixMaxLimit? variables inside libIGCM_sys
  • Don't use module with ulam for the moment
  • Adapt llsubmit procedure to have post-process job output when we want to
  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL license and that you accept its terms.
  • Property svn:keywords set to Date Author Revision
File size: 33.2 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Sebastien Denvil, Martial Mancip
5# Contact: Martial.Mancip_ipsl.jussieu.fr
6# $Date$
7# $Author$
8# $Revision$
9# IPSL (2006)
10#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
11# History:
12# Modification:
13#
14#**************************************************************
15
16#=========================================================
17# The documentation of this file can be automatically generated
18# if you use the prefix #D- for comments to be extracted.
19# Extract with command: cat lib* | grep "^#D-" | cut -c "4-"
20#=========================================================
21 
22#D-#==================================================
23#D-LibIGCM_sys for IPSL calculo
24#D-#==================================================
25#D-
26#D- This ksh library if a layer under some usefull
27#D- environment variables and shell commands.
28#D- All those definitions depend on host particularities.
29#D- It manages a stack mechanism and test validity of operations.
30#D- All function described bellow must be prefixed by IGCM_sys.
31
32#====================================================
33# libIGCM_sys PARAMETERS
34#====================================================
35
36#====================================================
37#set DEBUG_sys to true to output calls of function
38typeset -r DEBUG_sys=${DEBUG_sys:=true}
39
40#====================================================
41# Turn in dry run mode ? (sys_Put_Rest, sys_Put_Out, sys_Get)
42typeset -r DRYRUN=${DRYRUN:=0}
43
44# YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE !
45# -------------------------------------------------------------------------------------
46# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
47# |          |  Cp/Exe param files |            |  Chmod  |                           |
48# |          |      Qsub           |            |         |                           |
49# -------------------------------------------------------------------------------------
50# |    0     |       yes           |    yes     |  yes    |      yes                  |
51# -------------------------------------------------------------------------------------
52# |    1     |       yes           |    yes     |  yes    |      no                   |
53# -------------------------------------------------------------------------------------
54# |    2     |       yes           |    yes     |  no     |      no                   |
55# -------------------------------------------------------------------------------------
56# |    3     |       yes           |    no      |  no     |      no                   |
57# -------------------------------------------------------------------------------------
58
59#=====================================================
60#Global Variables :
61#=====================================================
62# Language : "fr" or "en"
63typeset -r MYLANG="fr"
64
65#=====================================================
66# Host and user names
67# $hostname ou hostname
68typeset -r HOST=$( hostname )
69# $username ou whoami
70typeset -r LOGIN=$( whoami )
71
72#D-
73#D-#==================================================
74#D-Program used in libIGCM
75#D-#==================================================
76
77# rsync with path
78typeset -r RSYNC=/usr/bin/rsync 
79#RSYNC_opt args to rsync
80typeset -r RSYNC_opt="-Lt -v"
81
82#====================================================
83# Source Ferret
84. /usr/local/ferret/ferret_paths_ksh
85. /home/brocksce/.atlas_env_calcul_ksh
86
87export FER_DATA="$FER_DATA /home/mc2ipsl/temp_local/grids"
88
89#=========================================================
90# Host specific DIRECTORIES
91#====================================================
92
93#====================================================
94#- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin )
95typeset -r R_EXE="${MODIPSL}/bin"
96
97#====================================================
98#- libIGCM_POST
99typeset -r libIGCM_POST=${libIGCM}
100
101#====================================================
102#- SCRATCHDIR (=> ${R_DONNEES})
103typeset -r SCRATCHDIR=/home/${LOGIN}/TEMP_LOCAL
104
105#====================================================
106#- SUBMIT_DIR : submission dir
107typeset SUBMIT_DIR=${SUBMIT_DIR:=${PWD}}
108
109#====================================================
110#- ARCHIVE
111typeset -r ARCHIVE=/home
112
113#====================================================
114#- IN
115typeset -r R_IN=${R_IN:=${ARCHIVE}/${LOGIN}/TEMP_LOCAL/SCRIPTS}
116
117#====================================================
118#- OUT
119typeset -r R_OUT=${ARCHIVE}/${LOGIN}/TEMP_LOCAL/SCRIPTS/IGCM_OUT
120
121#====================================================
122#- OUT_POST
123typeset -r R_OUT_POST=${SCRATCHDIR}
124
125#====================================================
126#- RUN_DIR_PATH : Temporary working directory (=> TMP)
127typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/tmp$$}
128
129#=========================================================
130#- Add "time" before mpirun command
131MPIRUN_COMMAND="time "${MPIRUN_COMMAND}
132echo ${MPIRUN_COMMAND}
133
134#====================================================
135#- Max number of arguments passed to nco operator or demigration command
136UNIX_MAX_LIMIT=360
137
138#D-#==================================================
139#D-function IGCM_sys_RshMaster
140#D-* Purpose: Master rsh command
141#D-* Examples:
142#D-
143function IGCM_sys_RshMaster {
144    IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
145    ssh ${HOST} /bin/ksh  <<-EOF
146    export libIGCM=${libIGCM}
147    . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
148    . ${libIGCM}/libIGCM_card/libIGCM_card.ksh
149    ${@}
150EOF
151    if [ $? -gt 0 ] ; then
152        echo "IGCM_sys_RshMaster : erreur."
153        IGCM_debug_Exit "IGCM_sys_RshMaster"
154    fi
155    IGCM_debug_PopStack "IGCM_sys_RshMaster"
156}
157
158#D-#==================================================
159#D-function IGCM_sys_RshArchive
160#D-* Purpose: Archive rsh command
161#D-* Examples:
162#D-
163function IGCM_sys_RshArchive {
164    IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
165    /bin/ksh  <<-EOF
166    ${@}
167EOF
168    if [ $? -gt 0 ] ; then
169        echo "IGCM_sys_RshArchive : erreur."
170        IGCM_debug_Exit "IGCM_sys_RshArchive"
171    fi
172    IGCM_debug_PopStack "IGCM_sys_RshArchive"
173}
174
175#D-#==================================================
176#D-function IGCM_sys_Nb_files_archive
177#D-* Purpose: Count files on Archive filesystem
178#D-* Examples:
179#D-
180function IGCM_sys_Nb_files_archive {
181   ls ${@} 2>/dev/null | wc -l
182   if [ $? -gt 0 ] ; then
183       echo "IGCM_sys_RshArchive : erreur."
184   fi
185}
186
187#D-#==================================================
188#D-function IGCM_sys_RshPost
189#D-* Purpose: Master rsh command
190#D-* Examples:
191#D-
192(( RshPNum = 0 ))
193function IGCM_sys_RshPost {
194    IGCM_debug_PushStack "IGCM_sys_RshPost" $@
195    if ( $DEBUG_sys ) ; then
196        echo "IGCM_sys_RshPost :" $@
197    fi
198    #ssh ${HOST} exec /bin/ksh -vx $@ > out_RshPost.${RshPNum}
199    ssh ${HOST} exec /bin/ksh $@ > out_RshPost.${RshPNum}
200    if [ $? -gt 0 ] ; then
201        echo "IGCM_sys_RshPost : erreur."
202        IGCM_debug_Exit "IGCM_sys_RshPost"
203    fi
204    (( RshPNum = RshPNum + 1 ))
205    IGCM_debug_PopStack "IGCM_sys_RshPost"
206}
207
208#D-#==================================================
209#D-function IGCM_sys_Mkdir
210#D-* Purpose: Master locale mkdir command
211#D-* Examples:
212#D-
213function IGCM_sys_Mkdir {
214    IGCM_debug_PushStack "IGCM_sys_Mkdir" $@
215    if ( $DEBUG_sys ) ; then
216        echo "IGCM_sys_Mkdir :" $@
217    fi
218    if [ ! -d ${1} ]; then
219        \mkdir -p $1
220        if [ $? -gt 0 ] ; then
221            echo "IGCM_sys_Mkdir : erreur."
222            IGCM_debug_Exit "IGCM_sys_Mkdir"
223        fi
224    fi
225    # vérification :
226    if [ ! -d ${1} ] ; then
227        echo "IGCM_sys_Mkdir : erreur."
228        IGCM_debug_Exit "IGCM_sys_Mkdir"
229    fi
230    IGCM_debug_PopStack "IGCM_sys_Mkdir"
231}
232
233#D-#==================================================
234#D-function IGCM_sys_MkdirArchive
235#D-* Purpose: Mkdir on Archive
236#D-* Examples:
237#D-
238function IGCM_sys_MkdirArchive {
239    IGCM_debug_PushStack "IGCM_sys_MkdirArchive" $@
240    if ( $DEBUG_sys ) ; then
241        echo "IGCM_sys_MkdirArchive :" $@
242    fi
243    #- creation de repertoire sur le serveur fichier
244    if [ ! -d ${1} ]; then 
245        \mkdir -p $1
246        if [ $? -gt 0 ] ; then
247            echo "IGCM_sys_MkdirArchive : erreur."
248            IGCM_debug_Exit "IGCM_sys_MkdirArchive"
249        fi
250    fi
251    # vérification ?? :
252    if [ ! -d ${1} ] ; then
253        echo "IGCM_sys_MkdirArchive : erreur."
254        IGCM_debug_Exit "IGCM_sys_MkdirArchive"
255    fi
256    IGCM_debug_PopStack "IGCM_sys_MkdirArchive"
257}
258
259#D-#==================================================
260#D-function IGCM_sys_MkdirWork
261#D-* Purpose: Mkdir on Work
262#D-* Examples:
263#D-
264function IGCM_sys_MkdirWork {
265    IGCM_debug_PushStack "IGCM_sys_MkdirWork" $@
266    if ( $DEBUG_sys ) ; then
267        echo "IGCM_sys_MkdirWork :" $@
268    fi
269    #- creation de repertoire sur le serveur fichier
270    if [ ! -d ${1} ]; then 
271        \mkdir -p $1
272        if [ $? -gt 0 ] ; then
273            echo "IGCM_sys_MkdirWork : erreur."
274            IGCM_debug_Exit "IGCM_sys_MkdirWork"
275        fi
276    fi
277    # vérification ?? :
278    if [ ! -d ${1} ] ; then
279        echo "IGCM_sys_MkdirWork : erreur."
280        IGCM_debug_Exit "IGCM_sys_MkdirWork"
281    fi
282    IGCM_debug_PopStack "IGCM_sys_MkdirWork"
283}
284IGCM_sys_MkdirWork ${RUN_DIR_PATH}
285echo "RUN_DIR_PATH ${RUN_DIR_PATH} ok."
286
287#D-#==================================================
288#D-function IGCM_sys_Cd
289#D-* Purpose: master cd command
290#D-* Examples:
291#D-
292function IGCM_sys_Cd {
293    IGCM_debug_PushStack "IGCM_sys_Cd" $@
294    if ( $DEBUG_sys ) ; then
295        echo "IGCM_sys_Cd :" $@
296    fi
297    \cd $1
298    if [ $? -gt 0 ] ; then
299        echo "IGCM_sys_Cd : erreur."
300        IGCM_debug_Exit "IGCM_sys_Cd"
301    fi
302    IGCM_debug_PopStack "IGCM_sys_Cd"
303}
304
305#D-#==================================================
306#D-function IGCM_sys_Chmod
307#D-* Purpose: Chmod
308#D-* Examples:
309#D-
310function IGCM_sys_Chmod {
311    IGCM_debug_PushStack "IGCM_sys_Chmod" $@
312    if ( $DEBUG_sys ) ; then
313        echo "IGCM_sys_Chmod :" $@
314    fi
315    if [ $DRYRUN -le 1 ]; then
316        \chmod $@
317        if [ $? -gt 0 ] ; then
318            echo "IGCM_sys_Chmod : erreur."
319            IGCM_debug_Exit "IGCM_sys_Chmod"
320        fi
321    else
322        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
323    fi
324    IGCM_debug_PopStack "IGCM_sys_Chmod"
325}
326
327#D-#==================================================
328#D-function IGCM_sys_FileSize
329#D-* Purpose: Filesize
330#D-* Examples:
331#D-
332function IGCM_sys_FileSize {
333    IGCM_debug_PushStack "IGCM_sys_FileSize" $@
334
335    typeset sizeF
336    set +A sizeF -- $( ls -la ${1} )
337    if [ $? -gt 0 ] ; then
338        IGCM_debug_Exit "IGCM_sys_FileSize"
339    fi
340    eval ${2}=${sizeF[4]}
341
342    IGCM_debug_PopStack "IGCM_sys_FileSize"
343}
344
345#D-#==================================================
346#D-function IGCM_sys_TestDir
347#D-* Purpose: Test Directory that must exists
348#D-* Examples:
349#D-
350function IGCM_sys_TestDir {
351    IGCM_debug_PushStack "IGCM_sys_TestDir" $@
352    if ( $DEBUG_sys ) ; then
353        echo "IGCM_sys_TestDir :" $@
354    fi
355    if [ ! -d ${1} ]; then
356        echo "IGCM_sys_TestDir : Directory $1 does not exist."
357        IGCM_debug_Exit "IGCM_sys_TestDir"
358    fi
359    IGCM_debug_PopStack "IGCM_sys_TestDir"
360}
361
362#D-#==================================================
363#D-function IGCM_sys_TestDirArchive
364#D-* Purpose: Test Directory that must exists on Archive
365#D-* Examples:
366#D-
367function IGCM_sys_TestDirArchive {
368    IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
369    if ( $DEBUG_sys ) ; then
370        echo "IGCM_sys_TestDirArchive :" $@
371    fi
372    if [ ! -d ${1} ]; then
373        echo "IGCM_sys_TestDirArchive : Directory $1 does not exist on ${ARCHIVE}."
374        IGCM_debug_Exit "IGCM_sys_TestDirArchive"
375    fi
376    IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
377}
378
379#D-#==================================================
380#D-function IGCM_sys_TestFileArchive
381#D-* Purpose: Test file that must NOT EXISTS on Archive
382#D-* Examples:
383#D-
384function IGCM_sys_TestFileArchive {
385    IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
386    if ( $DEBUG_sys ) ; then
387        echo "IGCM_sys_TestFileArchive :" $@
388    fi
389    if [ ! -f ${1} ]; then
390        IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
391        return 1
392    else
393        IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
394        return 0
395    fi
396}
397
398#D-#==================================================
399#D-function IGCM_sys_Tree
400#D-* Purpose: Tree directories with files on ${ARCHIVE}
401#D-* Examples: IGCM_sys_Tree ${R_IN} ${R_OUT}
402#D-
403function IGCM_sys_Tree {
404    IGCM_debug_PushStack "IGCM_sys_Tree" $@
405    if ( $DEBUG_sys ) ; then
406        echo "IGCM_sys_Tree :" $@
407    fi
408
409    /home/mmaipsl/BIN/tree -f $@
410
411    IGCM_debug_PopStack "IGCM_sys_Tree"
412}
413
414#D-#==================================================
415#D-function IGCM_sys_Tar
416#D-* Purpose: master un-tar command
417#D-* Examples:
418#D-
419function IGCM_sys_Tar {
420    IGCM_debug_PushStack "IGCM_sys_Tar" $@
421    if ( $DEBUG_sys ) ; then
422        echo "IGCM_sys_Tar :" $@
423    fi
424    \tar cvf $@
425    if [ $? -gt 0 ] ; then
426        echo "IGCM_sys_Tar : erreur."
427        IGCM_debug_Exit "IGCM_sys_Tar"
428    fi
429    \tar tvf $1
430
431    IGCM_debug_PopStack "IGCM_sys_Tar"
432}
433
434#D-#==================================================
435#D-function IGCM_sys_UnTar
436#D-* Purpose: master un-tar command
437#D-* Examples:
438#D-
439function IGCM_sys_UnTar {
440    IGCM_debug_PushStack "IGCM_sys_UnTar" $@
441    if ( $DEBUG_sys ) ; then
442        echo "IGCM_sys_UnTar :" $@
443    fi
444    \tar xvf $1
445    if [ $? -gt 0 ] ; then
446        echo "IGCM_sys_UnTar : erreur."
447        IGCM_debug_Exit "IGCM_sys_UnTar"
448    fi
449    IGCM_debug_PopStack "IGCM_sys_UnTar"
450}
451
452#D-#==================================================
453#D-function IGCM_sys_Qsub
454#D-* Purpose: Qsub new job
455#D-* Examples:
456#D-
457function IGCM_sys_Qsub {
458    IGCM_debug_PushStack "IGCM_sys_Qsub" $@
459    if ( $DEBUG_sys ) ; then
460        echo "IGCM_sys_Qsub :" $@
461    fi
462    echo "ssh -l ${LOGIN} ${HOST} ""cd ${SUBMIT_DIR} ; ${@}"" > ${Script_Output} 2>&1 &"
463    ssh -l ${LOGIN} ${HOST} "cd ${SUBMIT_DIR} ; ${@}" > ${Script_Output} 2>&1 &
464    if [ $? -gt 0 ] ; then
465        echo "IGCM_sys_Qsub : erreur."
466        IGCM_debug_Exit "IGCM_sys_Qsub"
467    fi
468    IGCM_debug_PopStack "IGCM_sys_Qsub"
469}
470
471#D-#==================================================
472#D-function IGCM_sys_QsubPost
473#D-* Purpose: Qsub new job on scalaire
474#D-* Examples:
475#D-
476function IGCM_sys_QsubPost {
477    IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
478    if ( $DEBUG_sys ) ; then
479        echo "IGCM_sys_QsubPost :" $@
480    fi
481    #echo "ssh -x -l ${LOGIN} ${HOST} ${3} > ${2} 2>&1 &"
482    #    ssh -x -l ${LOGIN} ${HOST}
483    echo "${3} > ${2} 2>&1 &"
484    ${3} > ${2} 2>&1 &
485    if [ $? -gt 0 ] ; then
486        echo "IGCM_sys_QsubPost : erreur."
487        IGCM_debug_Exit "IGCM_sys_QsubPost"
488    fi
489    IGCM_debug_PopStack "IGCM_sys_QsubPost"
490}
491
492#D-*************************
493#D- File transfer functions
494#D-*************************
495#D-
496
497#D-#==================================================
498#D-function IGCM_sys_Rsync_out
499#D-* Purpose: treat return val of rsync
500#D-* Examples:  IGCM_sys_Rsync_out out_RET_rsync
501#D-  Error values and explanations can depend on your system version.
502function IGCM_sys_Rsync_out {
503    RET=$1
504    if [ ! $RET ] ; then
505        echo "rsync error !"
506    fi
507
508    if [ $MYLANG = "fr" ]; then
509        case $RET in
510            0)  return ;;
511            1)  echo "Erreur de rsync ; RERR_SYNTAX : "
512                echo "Erreur de syntaxe ou d'utilisation."
513                return;;
514            2)  echo "Erreur de rsync ; RERR_PROTOCOL : "
515                echo "Incompatibilité de protocole."
516                return;;
517            3)  echo "Erreur de rsync ; RERR_FILESELECT 3"
518                echo "Erreurs  lors  de  la  sélection des fichiers d'entrée sortie et"
519                echo "répertoires"
520                return;;
521            4)  echo "Erreur de rsync ; RERR_UNSUPPORTED"
522                echo "Action demandée non supportée : une tentative de manipulation de"
523                echo "fichiers  64-bits  sur une plate-forme qui ne les supporte pas a"
524                echo "été faite ; ou une option qui est supportée par le  client  mais"
525                echo "pas par le serveur a été spécifiée."
526                return;;
527            10) echo "Erreur de rsync ; RERR_SOCKETIO"
528                echo "Erreur dans le socket d'entrée sortie"
529                return;;
530            11) echo "Erreur de rsync ; RERR_FILEIO"
531                echo "Erreur d'entrée sortie fichier"
532                return;;
533            12) echo "Erreur de rsync ; RERR_STREAMIO"
534                echo "Erreur dans flux de donnée du protocole rsync"
535                return;;
536            13) echo "Erreur de rsync ; RERR_MESSAGEIO"
537                echo "Erreur avec les diagnostics du programme"
538                return;;
539            14) echo "Erreur de rsync ; RERR_IPC"
540                echo "Erreur dans le code IPC"
541                return;;
542            20) echo "Erreur de rsync ; RERR_SIGNAL"
543                echo "SIGUSR1 ou SIGINT reçu"
544                return;;
545            21) echo "Erreur de rsync ; RERR_WAITCHILD"
546                echo "Une erreur retournée par waitpid()"
547                return;;
548            22) echo "Erreur de rsync ; RERR_MALLOC"
549                echo "Erreur lors de l'allocation des tampons de mémoire de coeur"
550                return;;
551            23) echo ""
552                echo "Erreur fichier inexistant"
553                return;;
554            30) echo "Erreur de rsync ; RERR_TIMEOUT"
555                echo "Temps d'attente écoulé dans l'envoi/réception de données"
556                return;;
557            *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
558                return;;
559        esac
560    elif [ $MYLANG = "en" ] ; then
561        case $RET in
562            0)  return;;               
563            1)  echo "rsync error : Syntax or usage error "
564                return;;
565            2)  echo "rsync error : Protocol incompatibility "
566                return;;
567            3)  echo "rsync error : Errors selecting input/output files, dirs"
568                return;;
569            4)  echo "rsync error : Requested action not supported: an attempt"
570                echo "was made to manipulate 64-bit files on a platform that cannot support"
571                echo "them; or an option was specified that is supported by the client and"
572                echo "not by the server."
573                return;;
574            5)  echo "rsync error : Error starting client-server protocol"
575                return;;
576            10) echo "rsync error : Error in socket I/O "
577                return;;
578            11) echo "rsync error : Error in file I/O "
579                return;;
580            12) echo "rsync error : Error in rsync protocol data stream "
581                return;;
582            13) echo "rsync error : Errors with program diagnostics "
583                return;;
584            14) echo "rsync error : Error in IPC code "
585                return;;
586            20) echo "rsync error : Received SIGUSR1 or SIGINT "
587                return;;
588            21) echo "rsync error : Some error returned by waitpid() "
589                return;;
590            22) echo "rsync error : Error allocating core memory buffers "
591                return;;
592            23) echo "rsync error : Partial transfer due to error"
593                return;;
594            24) echo "rsync error : Partial transfer due to vanished source files"
595                return;;
596            30) echo "rsync error : Timeout in data send/receive "
597                return;;
598            *)  echo "rsync error : return code of rsync unknown :" $RET
599                return;;
600        esac
601    else
602        echo "unknown language $MYLANG."
603        return
604    fi
605}
606   
607#D-#==================================================
608#D-function IGCM_sys_Cp
609#D-* Purpose: generic cp
610#D-* Examples:
611#D-
612function IGCM_sys_Cp {
613    IGCM_debug_PushStack "IGCM_sys_Cp" $@
614    if ( $DEBUG_sys ) ; then
615        echo "IGCM_sys_Cp :" $@
616    fi
617
618    typeset RET
619
620    echo cp --preserve=timestamps $@ > out_rsync 2>&1
621    \cp --preserve=timestamps $@ >> out_rsync 2>&1
622    RET=$?
623   
624    if [ ${RET} -gt 0 ] ; then
625        echo "IGCM_sys_Cp : error."
626        cat out_rsync
627        IGCM_debug_Exit "IGCM_sys_Cp"
628    fi
629    IGCM_debug_PopStack "IGCM_sys_Cp"
630}
631
632#D-#==================================================
633#D-function IGCM_sys_Rm
634#D-* Purpose: generic rm
635#D-* Examples:
636#D-
637function IGCM_sys_Rm {
638    IGCM_debug_PushStack "IGCM_sys_Rm" $@
639    if ( $DEBUG_sys ) ; then
640        echo "IGCM_sys_Rm :" $@
641    fi
642
643    typeset RET
644
645    echo rm $@ > out_rsync 2>&1
646    \rm $@ >> out_rsync 2>&1
647    RET=$?
648   
649    if [ ${RET} -gt 0 ] ; then
650        echo "IGCM_sys_Rm : error."
651        cat out_rsync
652        IGCM_debug_Exit "IGCM_sys_Rm"
653    fi
654    IGCM_debug_PopStack "IGCM_sys_Rm"
655}
656
657#D-#==================================================
658#D-function IGCM_sys_Mv
659#D-* Purpose: generic move
660#D-* Examples:
661#D-
662function IGCM_sys_Mv {
663    IGCM_debug_PushStack "IGCM_sys_Mv" $@
664    if ( $DEBUG_sys ) ; then
665        echo "IGCM_sys_Mv :" $@
666    fi
667
668    typeset RET
669
670    echo mv $@ > out_rsync 2>&1
671    \mv $@ >> out_rsync 2>&1
672    RET=$?
673   
674    if [ ${RET} -gt 0 ] ; then
675        echo "IGCM_sys_Mv : error in mv."
676        cat out_rsync
677        IGCM_debug_Exit "IGCM_sys_Mv"
678    fi
679
680    IGCM_debug_PopStack "IGCM_sys_Mv"
681}
682
683#D-#==================================================
684#D-function IGCM_sys_Put_Dir
685#D-* Purpose: Copy a complete directory on $(ARCHIVE)
686#D-* Examples:
687#D-
688function IGCM_sys_Put_Dir {
689    IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@
690    if ( $DEBUG_sys ) ; then
691        echo "IGCM_sys_Put_Dir :" $@
692    fi
693    if [ $DRYRUN = 0 ]; then
694        if [ ! -d ${1} ] ; then
695            echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ."
696            IGCM_debug_PopStack "IGCM_sys_Put_Dir"
697            return
698        fi
699
700        typeset RET
701
702        #
703        #USUAL WAY
704        \cp -R $1 $2 > out_rsync 2>&1
705        RET=$?
706
707        if [ ${RET} -gt 0 ] ; then
708            echo "IGCM_sys_Put_Dir : error."
709            cat out_rsync
710            IGCM_debug_Exit "IGCM_sys_Put_Dir"
711        fi
712    else
713        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
714    fi
715    IGCM_debug_PopStack "IGCM_sys_Put_Dir"
716}
717
718#D-#==================================================
719#D-function IGCM_sys_Get_Dir
720#D-* Purpose: Copy a complete directory from $(ARCHIVE)
721#D-* Examples:
722#D-
723function IGCM_sys_Get_Dir {
724    IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@
725    if ( $DEBUG_sys ) ; then
726        echo "IGCM_sys_Get_Dir :" $@
727    fi
728    if [ $DRYRUN = 0 ]; then
729        if [ ! -d ${1} ] ; then
730            echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ."
731            IGCM_debug_PopStack "IGCM_sys_Get_Dir"
732            return
733        fi
734
735        typeset RET
736
737        # Only if we use rsync
738        #IGCM_sys_TestDirArchive $( dirname $2 )
739        #
740        #USUAL WAY
741        \cp -R $1 $2 > out_rsync 2>&1
742        RET=$?
743
744        if [ ${RET} -gt 0 ] ; then
745            echo "IGCM_sys_Get_Dir : error."
746            cat out_rsync
747            IGCM_debug_Exit "IGCM_sys_Get_Dir"
748        fi
749    else
750        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
751    fi
752    IGCM_debug_PopStack "IGCM_sys_Get_Dir"
753}
754
755#D-#==================================================
756#D-function IGCM_sys_Get_Master
757#D-* Purpose: Copy a complete directory from MASTER filesystem
758#D-* Examples:
759#D-
760function IGCM_sys_Get_Master {
761    IGCM_debug_PushStack "IGCM_sys_Get_Master" $@
762    if ( $DEBUG_sys ) ; then
763        echo "IGCM_sys_Get_Master :" $@
764    fi
765    if [ $DRYRUN = 0 ]; then
766        if [ ! -d ${1} ] ; then
767            echo "WARNING : IGCM_sys_Get_Master ${1} DOES NOT EXIST ."
768            IGCM_debug_PopStack "IGCM_sys_Get_Master"
769            return
770        fi
771
772        typeset RET
773        sleep 60
774
775        #USUAL WAY
776        \cp -R $1 $2 > out_rsync 2>&1
777        RET=$?
778
779        if [ ${RET} -gt 0 ] ; then
780            echo "IGCM_sys_Get_Master : error."
781            cat out_rsync
782            IGCM_debug_Exit "IGCM_sys_Get_Master"
783        fi
784    else
785        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
786    fi
787    IGCM_debug_PopStack "IGCM_sys_Get_Master"
788}
789
790#D-#==================================================
791#D-function IGCM_sys_Put_Rest
792#D-* Purpose: commande de transfert des restarts $(ARCHIVE).
793#D-           Quitte si le fichier ou si le répertoire d'arriver n'existe pas.
794#D-* Examples:
795#D-
796function IGCM_sys_Put_Rest {
797    IGCM_debug_PushStack "IGCM_sys_Put_Rest" $@
798    if ( $DEBUG_sys ) ; then
799        echo "IGCM_sys_Put_Rest :" $@
800    fi
801    if [ $DRYRUN = 0 ]; then
802
803        IGCM_sys_TestDirArchive $( dirname $2 )
804
805        if [ ! -f ${1} ] ; then
806            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ."
807            IGCM_debug_Exit "IGCM_sys_Put_Rest"
808        fi
809        IGCM_sys_Chmod 444 ${1}
810
811        typeset RET
812
813        echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync 2>&1
814        ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync 2>&1
815        RET=$?
816        IGCM_sys_Rsync_out $RET
817
818        ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
819        (( RET=RET+$? ))
820
821        if [ ${RET} -gt 0 ] ; then
822            echo "IGCM_sys_Put_Rest : error."
823            cat out_rsync
824            IGCM_debug_Exit "IGCM_sys_Put_Rest"
825        fi
826    else
827        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
828    fi
829    IGCM_debug_PopStack "IGCM_sys_Put_Rest"
830}
831
832#D-#==================================================
833#D-function IGCM_sys_Put_Out
834#D-* Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly
835#D-* Examples:
836#D-
837function IGCM_sys_Put_Out {
838    IGCM_debug_PushStack "IGCM_sys_Put_Out" $@
839    if ( $DEBUG_sys ) ; then
840        echo "IGCM_sys_Put_Out :" $@
841    fi
842    if [ $DRYRUN = 0 ]; then
843        if [ -f ${1} ] ; then
844            if [ ! -d $( dirname $2 ) ] ; then
845                IGCM_sys_MkdirArchive $( dirname $2 )
846            fi
847        else
848            echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
849            IGCM_debug_PopStack "IGCM_sys_Put_Out"
850            return 1
851        fi
852
853        typeset RET
854        #
855        IGCM_sys_Chmod 444 ${1}
856        #
857
858        echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync 2>&1
859        ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync 2>&1
860        RET=$?
861        IGCM_sys_Rsync_out $RET
862
863        ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
864        (( RET=RET+$? ))
865
866        if [ ${RET} -gt 0 ] ; then
867            echo "IGCM_sys_Put_Out : error."
868            cat out_rsync
869            IGCM_debug_Exit "IGCM_sys_Put_Out"
870        fi
871    else
872        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
873    fi
874    IGCM_debug_PopStack "IGCM_sys_Put_Out"
875    return 0
876}
877
878#D-#==================================================
879#D-function IGCM_sys_Get
880#D-* Purpose: Get a file from ${ARCHIVE}
881#D-* Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX
882#D-            IGCM_sys_Get /l Array_contain_myfiles /destpath/
883function IGCM_sys_Get {
884    IGCM_debug_PushStack "IGCM_sys_Get" $@
885
886    typeset DEST RET dm_liste ifile target
887
888    if ( $DEBUG_sys ) ; then
889        echo "IGCM_sys_Get :" $@
890    fi
891    if [ $DRYRUN -le 2 ]; then
892        if [ X${1} = X'/l' ] ; then
893            # test if the first file is present in the old computation :
894            eval set +A dm_liste \${${2}}
895        else
896            dm_liste=${1}
897        fi
898        eval DEST=\${${#}}
899
900        # test if the (first) file is present in the old computation :
901        IGCM_sys_TestFileArchive ${dm_liste[0]}
902        RET=$?
903        if [ ${RET} -gt 0 ] ; then
904            echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
905            IGCM_debug_Exit "IGCM_sys_Get"
906            return
907        fi
908
909        (( RET=0 ))
910        for target in ${dm_liste[*]} ; do
911          ln -s ${target} ${DEST} >> out_rsync 2>&1
912          (( RET=RET+$? ))
913        done
914
915#       echo ${RSYNC} ${RSYNC_opt} $@ > out_rsync 2>&1
916#       ${RSYNC} ${RSYNC_opt} $@ >> out_rsync 2>&1
917#       RET=$?
918#       IGCM_sys_Rsync_out $RET
919
920#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
921#       (( RET=RET+$? ))
922
923        if [ ${RET} -gt 0 ] ; then
924            echo "IGCM_sys_Get : copy error."
925            cat out_rsync
926            IGCM_debug_Exit "IGCM_sys_Get"
927        fi
928    else
929        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
930    fi
931    IGCM_debug_PopStack "IGCM_sys_Get"
932}
933
934#D-#==================================================
935#D-function IGCM_sys_Put_Dods
936#D-* Purpose: DO NOTHING ! Put $(ARCHIVE) files on DODS internet protocole.
937#D-* Examples:
938#D-
939function IGCM_sys_Put_Dods {
940    IGCM_debug_PushStack "IGCM_sys_Put_Dods" $@
941    if ( $DEBUG_sys ) ; then
942        echo "IGCM_sys_Put_Dods :" $@
943    fi
944    if [ $DRYRUN = 0 ]; then
945        if [ ! -f ${1} ] ; then
946            echo "WARNING : IGCM_sys_Put_Dods ${1} DOES NOT EXIST ."
947            IGCM_debug_PopStack "IGCM_sys_Put_Dods"
948            return
949        fi
950        #DO NOTHING
951    else
952        IGCM_err "DRYRUN mode = " $DRYRUN
953    fi
954    IGCM_debug_PopStack "IGCM_sys_Put_Dods"
955}
956
957############################################################## A REVOIR !!
958
959#D-#==================================================
960#D-function IGCM_sys_Rapatrie
961#D-* Purpose: Rapatrie
962#D-* Examples:
963#D-
964function IGCM_sys_Rapatrie {
965    IGCM_debug_PushStack "IGCM_sys_Rapatrie" $@
966    if ( $DEBUG_sys ) ; then
967        echo "IGCM_sys_Rapatrie :" $@
968    fi
969
970    typeset RET=0
971
972    IGCM_sys_Get ${R_STOCKAGE}/$2 $1 ;
973    let $(( RET=RET+$? ))
974    IGCM_sys_Cd $1 ;
975    let $(( RET=RET+$? ))
976    IGCM_sys_UnTar $2 ;
977    let $(( RET=RET+$? ))
978
979    if [ ${RET} -gt 0 ] ; then
980        echo "IGCM_sys_Rapatrie : erreur."
981        IGCM_debug_Exit "IGCM_sys_Rapatrie"
982    fi
983    IGCM_debug_PopStack "IGCM_sys_Rapatrie"
984}
985
986############################################################## A FINIR !!
987
988#D-#==================================================
989#D-function IGCM_sys_GetDate_FichWork
990#D-* Purpose: donne la date filesys d'un fichier sur le filesystem WORK
991#D-* Examples:
992#D-
993function IGCM_sys_GetDate_FichWork {
994    IGCM_debug_PushStack "IGCM_sys_FichWork" $@
995    if ( $DEBUG_sys ) ; then
996        echo "IGCM_sys_GetDate_FichWork :" $@
997    fi
998    # donne la date filesys d'un fichier sur la machine work
999    IGCM_debug_PopStack "IGCM_sys_FichWork"
1000}
1001
1002#D-#==================================================
1003#D-function IGCM_sys_GetDate_FichArchive
1004#D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE
1005#D-* Examples:
1006#D-
1007function IGCM_sys_GetDate_FichArchive {
1008    IGCM_debug_PushStack "IGCM_sys_FichArchive" $@
1009    if ( $DEBUG_sys ) ; then
1010        echo "IGCM_sys_GetDate_FichArchive :" $@
1011    fi
1012    IGCM_debug_PopStack "IGCM_sys_FichArchive"
1013}
1014
1015
1016##############################################################
1017# REBUILD OPERATOR
1018
1019function IGCM_sys_rebuild {
1020    IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
1021    if ( $DEBUG_sys ) ; then
1022        echo "IGCM_sys_rebuild :" $@
1023    fi
1024    /home/mmaipsl/TEMP_LOCAL/PARALLEL/modipsl/bin/rebuild -f -o $@
1025    if [ $? -gt 0 ] ; then
1026       echo "IGCM_sys_rebuild : erreur ${@}."
1027       IGCM_debug_Exit "rebuild"
1028    fi
1029
1030    IGCM_debug_PopStack "IGCM_sys_rebuild"
1031}
1032
1033##############################################################
1034# NCO OPERATOR
1035
1036function IGCM_sys_ncap {
1037    IGCM_debug_PushStack "IGCM_sys_ncap" -- $@
1038    if ( $DEBUG_sys ) ; then
1039        echo "IGCM_sys_ncap :" $@
1040    fi
1041    /usr/local/bin/ncap $@
1042    if [ $? -gt 0 ] ; then
1043       echo "IGCM_sys_ncap : erreur ${@}."
1044#       IGCM_debug_Exit "ncap"
1045    fi
1046
1047    IGCM_debug_PopStack "IGCM_sys_ncap"
1048}
1049
1050ncatted=/usr/local/bin/ncatted
1051# Problem with ksh and string passed in this function to ncatted !
1052# function IGCM_sys_ncatted {
1053#     IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
1054#     if ( $DEBUG_sys ) ; then
1055#       echo "IGCM_sys_ncatted :" $@
1056#     fi
1057#     /usr/local/bin/ncatted $@
1058#     if [ $? -gt 0 ] ; then
1059#        echo "IGCM_sys_ncatted : erreur ${@}."
1060#        IGCM_debug_Exit "ncatted"
1061#     fi
1062
1063#     IGCM_debug_PopStack "IGCM_sys_ncatted"
1064# }
1065
1066function IGCM_sys_ncbo {
1067    IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
1068    if ( $DEBUG_sys ) ; then
1069        echo "IGCM_sys_ncbo :" $@
1070    fi
1071    /usr/local/bin/ncbo $@
1072    if [ $? -gt 0 ] ; then
1073       echo "IGCM_sys_ncbo : erreur ${@}."
1074#       IGCM_debug_Exit "ncbo"
1075    fi
1076
1077    IGCM_debug_PopStack "IGCM_sys_ncbo"
1078}
1079
1080function IGCM_sys_ncdiff {
1081    IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
1082    if ( $DEBUG_sys ) ; then
1083        echo "IGCM_sys_ncdiff :" $@
1084    fi
1085    /usr/local/bin/ncdiff $@
1086    if [ $? -gt 0 ] ; then
1087       echo "IGCM_sys_ncdiff : erreur ${@}."
1088#       IGCM_debug_Exit "ncdiff"
1089    fi
1090
1091    IGCM_debug_PopStack "IGCM_sys_ncdiff"
1092}
1093
1094function IGCM_sys_ncea {
1095    IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
1096    if ( $DEBUG_sys ) ; then
1097        echo "IGCM_sys_ncea :" $@
1098    fi
1099    /usr/local/bin/ncea $@
1100    if [ $? -gt 0 ] ; then
1101       echo "IGCM_sys_ncea : erreur ${@}."
1102#       IGCM_debug_Exit "ncea"
1103    fi
1104
1105    IGCM_debug_PopStack "IGCM_sys_ncea"
1106}
1107
1108function IGCM_sys_ncecat {
1109    IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
1110    if ( $DEBUG_sys ) ; then
1111        echo "IGCM_sys_ncecat :" $@
1112    fi
1113    /usr/local/bin/ncecat $@
1114    if [ $? -gt 0 ] ; then
1115       echo "IGCM_sys_ncecat : erreur ${@}."
1116#       IGCM_debug_Exit "ncecat"
1117    fi
1118
1119    IGCM_debug_PopStack "IGCM_sys_ncecat"
1120}
1121
1122function IGCM_sys_ncflint {
1123    IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
1124    if ( $DEBUG_sys ) ; then
1125        echo "IGCM_sys_ncflint :" $@
1126    fi
1127    /usr/local/bin/ncflint $@
1128    if [ $? -gt 0 ] ; then
1129       echo "IGCM_sys_ncflint : erreur ${@}."
1130#       IGCM_debug_Exit "ncflint"
1131    fi
1132
1133    IGCM_debug_PopStack "IGCM_sys_ncflint"
1134}
1135
1136function IGCM_sys_ncks {
1137    IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
1138    if ( $DEBUG_sys ) ; then
1139        echo "IGCM_sys_ncks :" $@
1140    fi
1141    /usr/local/bin/ncks $@
1142    if [ $? -gt 0 ] ; then
1143       echo "IGCM_sys_ncks : erreur ${@}."
1144#       IGCM_debug_Exit "ncks"
1145    fi
1146
1147    IGCM_debug_PopStack "IGCM_sys_ncks"
1148}
1149
1150function IGCM_sys_ncpdq {
1151    IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
1152    if ( $DEBUG_sys ) ; then
1153        echo "IGCM_sys_ncpdq :" $@
1154    fi
1155    /usr/local/bin/ncpdq $@
1156    if [ $? -gt 0 ] ; then
1157       echo "IGCM_sys_ncpdq : erreur ${@}."
1158#       IGCM_debug_Exit "ncpdq"
1159    fi
1160
1161    IGCM_debug_PopStack "IGCM_sys_ncpdq"
1162}
1163
1164function IGCM_sys_ncra {
1165    IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
1166    if ( $DEBUG_sys ) ; then
1167        echo "IGCM_sys_ncra :" $@
1168    fi
1169    /usr/local/bin/ncra $@
1170    if [ $? -gt 0 ] ; then
1171       echo "IGCM_sys_ncra : erreur ${@}."
1172#       IGCM_debug_Exit "ncra"
1173    fi
1174
1175    IGCM_debug_PopStack "IGCM_sys_ncra"
1176}
1177
1178function IGCM_sys_ncrcat {
1179    IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
1180    if ( $DEBUG_sys ) ; then
1181        echo "IGCM_sys_ncrcat :" $@
1182    fi
1183    /usr/local/bin/ncrcat $@
1184    if [ $? -gt 0 ] ; then
1185       echo "IGCM_sys_ncrcat : erreur ${@}."
1186#       IGCM_debug_Exit "ncrcat"
1187    fi
1188
1189    IGCM_debug_PopStack "IGCM_sys_ncrcat"
1190}
1191
1192function IGCM_sys_ncrename {
1193    IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
1194    if ( $DEBUG_sys ) ; then
1195        echo "IGCM_sys_ncrename :" $@
1196    fi
1197    /usr/local/bin/ncrename $@
1198    if [ $? -gt 0 ] ; then
1199       echo "IGCM_sys_ncrename : erreur ${@}."
1200#       IGCM_debug_Exit "ncrename"
1201    fi
1202
1203    IGCM_debug_PopStack "IGCM_sys_ncrename"
1204}
1205
1206function IGCM_sys_ncwa {
1207    IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
1208    if ( $DEBUG_sys ) ; then
1209        echo "IGCM_sys_ncwa :" $@
1210    fi
1211    /usr/local/bin/ncwa $@
1212    if [ $? -gt 0 ] ; then
1213       echo "IGCM_sys_ncwa : erreur ${@}."
1214#       IGCM_debug_Exit "ncwa"
1215    fi
1216
1217    IGCM_debug_PopStack "IGCM_sys_ncwa"
1218}
1219
1220############################################################
1221# Activate Running Environnment Variables
1222
1223function IGCM_sys_activ_variables {
1224    IGCM_debug_PushStack "IGCM_sys_activ_variables"
1225    if ( $DEBUG_sys ) ; then
1226        echo "IGCM_sys_activ_variables"
1227    fi
1228    IGCM_debug_PopStack "IGCM_sys_activ_variables"
1229}
1230
1231############################################################
1232# Desactivate Running Environnment Variables
1233
1234function IGCM_sys_desactiv_variables {
1235    IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
1236    if ( $DEBUG_sys ) ; then
1237        echo "IGCM_sys_desactiv_variables "
1238    fi
1239    IGCM_debug_PopStack "IGCM_sys_desactiv_variables "
1240}
1241
1242############################################################
1243# Build run file
1244
1245function IGCM_sys_build_run_file {
1246    IGCM_debug_PushStack "IGCM_sys_build_run_file"
1247    if ( $DEBUG_sys ) ; then
1248        echo "IGCM_sys_build_run_file "
1249    fi
1250    IGCM_debug_PopStack "IGCM_sys_build_run_file "
1251}
Note: See TracBrowser for help on using the repository browser.