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

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