source: trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh @ 80

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