Changeset 42 for trunk


Ignore:
Timestamp:
03/25/10 16:46:26 (14 years ago)
Author:
pinsard
Message:

improvements of headers and unset in shell scripts

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/detectbarotropicmode.sh

    r40 r42  
    33#+ 
    44# 
    5 # NAME 
    6 # ==== 
    7 # 
    8 # detectbarotropicmode.sh - build file for detection of barotropic mode 
     5# ======================= 
     6# detectbarotropicmode.sh  
     7# ======================= 
     8# 
     9# ------------------------------------------- 
     10# build file for detection of barotropic mode 
     11# ------------------------------------------- 
    912# 
    1013# SYNOPSIS 
     
    9295 ;; 
    9396 *) # other choice 
     97    echo "eee : unknown option ${1}" 
    9498    echo "${usage}" 
    9599 ;; 
  • trunk/geomag_profile.sh

    r40 r42  
    22# 
    33#+ 
    4 # 
    5 # NAME 
    6 # ==== 
    7 # 
    8 # geomag_profile.sh - define GEOMAG environment 
     4# ================= 
     5# geomag_profile.sh 
     6# ================= 
     7# 
     8# ------------------------- 
     9# define GEOMAG environment 
     10# ------------------------- 
    911# 
    1012# SYNOPSIS 
    1113# ======== 
    1214# 
    13 # Online usage 
    14 # 
    15 # :: 
    16 # 
    17 # $ . geomag_profile.sh -d directory -i indir -o outdir -t tempdir 
    18 # 
    19 # In ${HOME}/.profile, add the following line 
    20 # 
    21 # :: 
    22 # 
    23 # . geomag_profile.sh -d directory  -i indir -o outdir -t tempdir 
     15# Online usage:: 
     16# 
     17#  $ . geomag_profile.sh -d directory -i indir -o outdir -t tempdir 
     18# 
     19# In ${HOME}/.profile, add the following line:: 
     20# 
     21#  . geomag_profile.sh -d directory  -i indir -o outdir -t tempdir 
    2422# 
    2523# DESCRIPTION 
     
    4139# ======== 
    4240# 
    43 # For fplod, on aedon.locean-ipsl.upmc.fr: 
    44 # :: 
     41# For fplod, on aedon.locean-ipsl.upmc.fr:: 
    4542# 
    4643#  $ cd /usr/home/fplod/incas/geomag/geomag_ws 
    4744#  $ . geomag_profile.sh -d /usr/home/fplod/incas/geomag/geomag_ws/ -i ${HOME}/geomag_d/ -o ${HOME}/geomag_d/ -t /usr/temp/${LOGNAME}/log/ 
    4845# 
    49 # For reee522 on rhodes.idris.fr: 
    50 # :: 
     46# For reee522 on rhodes.idris.fr:: 
    5147# 
    5248#  $ cd ${HOME}/incas/geomag/geomag_ws/ 
    5349#  $ . geomag_profile.sh -d ${HOME}/incas/geomag/geomag_ws/ -i ${HOMEGAYA}/geomag_d/ -o ${HOMEGAYA}/geomag_d/ -t /tmp/${LOGNAME}/log/ 
    5450# 
    55 # 
    56 # FILES 
    57 # ===== 
    58 # 
    59 # original location 
    60 # ~~~~~~~~~~~~~~~~~ 
    61 # 
    62 # /usr/home/fplod/incas/geomag/geomag_ws/geomag_profile.sh sur aedon.locean-ipsl.upmc.fr 
     51# TODO 
     52# ==== 
     53# 
     54# ++ option bavarde 
     55# 
     56# ++ machine dependant 
     57# 
     58# ++ besoin de posix 
     59# 
     60# ++ pas de MANPATH defini par défaut sur zeus 
    6361# 
    6462# EVOLUTIONS 
    6563# ========== 
    6664# 
    67 # ++ option bavarde 
    68 # 
    69 # ++ machine dependant 
    70 # 
    71 # ++ besoin de posix 
    72 # 
    73 # ++ pas de MANPATH defini par déubt sur zeus 
    74 # 
    7565# $Id$ 
     66# 
     67# - fplod 20100318T073619Z aedon.locean-ipsl.upmc.fr (Darwin) 
     68# 
     69#   * unset 
    7670# 
    7771# - reee522 2007-06-14T14:25:00Z rhodes (IRIX64) 
     
    9993usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir" 
    10094# 
     95set +u 
    10196while [ ! -z "${1}" ] # ++ pb bash 
    10297do 
     
    120115 
    121116 *) # other choice 
     117  echo "eee : unknown option ${1}" 
    122118  echo "${usage}" 
    123119  # nb : no exit because this file should be launched by login process 
     
    126122 shift # next flag 
    127123done 
    128  
     124unset usage 
     125# 
     126set -u 
     127# 
    129128# check for ${directory} 
    130129if [ ! -d ${directory} ] 
     
    151150;; 
    152151esac 
     152unset system 
    153153# 
    154154GEOMAG=${directory} 
    155155export GEOMAG 
     156unset directory 
    156157# 
    157158# add GEOMAG tools to PATH 
     
    167168   echo "${command} : iii : ${GEOMAG}/ already in \${PATH}" 
    168169fi 
     170unset test_path 
    169171# 
    170172# add GEOMAG manuals to MANPATH 
     
    174176if [ ${test_manpath} -ne 0 ] 
    175177then 
    176    MANPATH=${GEOMAG}/man/:${MANPATH} 
     178   MANPATH=${GEOMAG}/doc/manuals/man/:${MANPATH} 
    177179   export MANPATH 
    178180else 
    179181   # option bavarde oui/non pas encore implantée ++ 
    180    echo "${command} : iii : ${GEOMAG}/man/ already in \${MANPATH}" 
    181 fi 
     182   echo "${command} : iii : ${GEOMAG}/doc/manuals/man/ already in \${MANPATH}" 
     183fi 
     184unset test_manpath 
    182185# 
    183186GEOMAG_LOG=${tempdir} 
    184187export GEOMAG_LOG 
     188unset tempdir 
    185189if [ ! -d ${GEOMAG_LOG} ] 
    186190then 
     
    208212GEOMAG_ID=${indir} 
    209213export GEOMAG_ID 
     214unset indir 
    210215if [ ! -d ${GEOMAG_ID} ] 
    211216then 
     
    222227GEOMAG_OD=${outdir} 
    223228export GEOMAG_OD 
     229unset outdir 
    224230if [ ! -d ${GEOMAG_OD} ] 
    225231then 
     
    240246# 
    241247# end 
     248unset command 
    242249# nb : no exit because this file should be launched by login process 
  • trunk/getmodelout.sh

    r40 r42  
    22# 
    33#+ 
     4# ============== 
     5# getmodelout.sh 
     6# ============== 
    47# 
    5 # NAME 
    6 # ==== 
    7 # 
    8 # getmodelout.sh - get model data output file in ${GEOMAG_ID} 
    9 # 
     8# ------------------------------------------ 
     9# get model data output file in ${GEOMAG_ID} 
     10# ------------------------------------------ 
    1011# 
    1112# SYNOPSIS 
     
    2425# ======== 
    2526# 
    26 # 
    27 # To get DRAKKAR G42 experiment output on grid T points beteween year 9 and 10: 
    28 # :: 
     27# To get DRAKKAR G42 experiment output on grid T points beteween year 9 and 10:: 
    2928# 
    3029#  $ getmodelout.sh -r ORCA025 -exp G42 -g gridT -yearmin 9 -yearmax 10 -o ${GEOMAG_OD}/list_G42 
     
    3433# 
    3534# $Id$ 
     35# 
     36# - fplod 20100318T073947Z aedon.locean-ipsl.upmc.fr (Darwin) 
     37# 
     38#   * unset 
     39# 
    3640# - reee522 2007-11-26T11:21:37Z rhodes (IRIX64) 
    3741# 
     
    7175 ;; 
    7276 *) # other choice 
     77   echo "eee : unknown option ${1}" 
    7378   echo "${usage}" 
    7479 ;; 
     
    7681 shift # next flag 
    7782done 
     83unset usage 
    7884# 
    7985set -u 
     
    109115  cyear=`printf "%4.4d" ${iyear}` 
    110116  ls ${dirref}/${orcares}/${orcares}-${drakkar_exp}-S/${cyear}/${orcares}-${drakkar_exp}_y${cyear}m??d??_${grid}.nc >> ${listfull} 
     117  unset cyear 
    111118  # ++ calcul taille cf myls dans faq es dods 
    112119  # iyear=$(( ${iyear} + 1 )) ++ pas ok sur rhodes 
     
    114121  iyear=`expr  ${iyear} + 1 ` 
    115122done 
     123unset iyear 
     124unset dirref 
     125unset orcares 
     126unset drakkar_exp 
     127unset grid 
    116128# 
    117129# print total size of model files 
     
    129141  echo ${GEOMAG_ID}/`basename ${file}` >> ${list} 
    130142done 
     143unset listfull 
    131144# 
    132145# end 
  • trunk/step2_diff.sh

    r39 r42  
    33#+ 
    44# 
    5 # NAME 
    6 # ==== 
     5# ============= 
     6# step2_diff.sh 
     7# ============= 
    78# 
    8 # step2_diff.sh - launch step2_diff.pro with year argument 
    9 # 
     9# ------------------------------------------ 
     10# launch step2_diff.pro with year argument 
     11# ------------------------------------------ 
    1012# 
    1113# SYNOPSYS 
     
    1921# ======== 
    2022# 
    21 # For test on year 1994: 
    22 # :: 
     23# For test on year 1994:: 
    2324# 
    2425#  $ ./step2_diff.sh -y 1994 
    25 # 
    26 # FILES 
    27 # ===== 
    28 # 
    29 # original location 
    30 # ~~~~~~~~~~~~~~~~~ 
    31 # 
    32 # /usr/home/fplod/incas/geomag/geomag_ws/step2_diff.sh sur aedon.locean-ipsl.upmc.fr 
    3326# 
    3427# EVOLUTIONS 
     
    3629# 
    3730# $Id$ 
     31# 
     32# - fplod 20100318T074009Z aedon.locean-ipsl.upmc.fr (Darwin) 
     33# 
     34#   * unset 
    3835# 
    3936# - fplod 2007-08-22T08:50:02Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    5249;; 
    5350esac 
     51unset system 
    5452# 
    5553command=$(basename ${0}) 
     
    6563 ;; 
    6664 *) # other choice 
     65  echo "eee : unknown option ${1}" 
    6766  echo "${usage}" 
    6867  exit 1 
     
    7170 shift # next flag 
    7271done 
     72unset usage 
    7373# 
    7474# ++ check year validity 
     
    8585EOF 
    8686# 
     87unset year 
     88# 
    8789# launch IDL with the sequence 
    8890${IDL_DIR}/bin/idl < /tmp/${command}${$}.pro 
Note: See TracChangeset for help on using the changeset viewer.