source: tags/libIGCM_v1_5/libIGCM_sys/libIGCM_sys_mercureTX.ksh @ 293

Last change on this file since 293 was 228, checked in by mmaipsl, 14 years ago

Supress buggy space after HOST and LOGIN variables.
Add an optionnal argument to all IGCM_sys_Put_Out functions :
if any 3thrd argument is there, file won't be protected. If
there is no argument (default in libIGCM), file will be set read-only.

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