Changeset 630


Ignore:
Timestamp:
01/29/14 17:53:06 (10 years ago)
Author:
pinsard
Message:

mainly indentation correction in shell scripts

Location:
trunk
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/adm/extract_demoandtest.sh

    r517 r630  
    7777system=$(uname) 
    7878case "${system}" in 
    79    AIX|IRIX64) 
    80       echo " www : no specific posix checking" 
    81    ;; 
    82    *) 
    83      set -o posix 
    84    ;; 
     79    AIX|IRIX64) 
     80        echo " www : no specific posix checking" 
     81    ;; 
     82    *) 
     83        set -o posix 
     84    ;; 
    8585esac 
    8686# 
     
    9595if [ ${#} -lt ${minargcount} ] 
    9696then 
    97    echo "eee : not enought arguments" 
    98    echo "${usage}" 
    99    exit 1 
     97    echo "eee : not enought arguments" 
     98    echo "${usage}" 
     99    exit 1 
    100100fi 
    101101# 
     
    106106while [ ! -z "${1}" ] 
    107107do 
    108    case ${1} in 
    109       -i) 
    110          filein=${2} 
    111          shift 
    112       ;; 
    113       -o) 
    114          fileout=${2} 
    115          shift 
    116       ;; 
    117       -m) 
    118          mode=${2} 
    119          shift 
    120       ;; 
    121       -h) 
    122          echo "${usage}" 
    123          exit 0 
    124       ;; 
    125       *) 
    126          echo "eee : unknown option ${1}" 
    127          echo "${usage}" 
    128          exit 1 
    129       ;; 
    130    esac 
    131    # next flag 
    132    shift 
     108    case ${1} in 
     109        -i) 
     110            filein=${2} 
     111            shift 
     112        ;; 
     113        -o) 
     114            fileout=${2} 
     115            shift 
     116        ;; 
     117        -m) 
     118            mode=${2} 
     119            shift 
     120        ;; 
     121        -h) 
     122            echo "${usage}" 
     123            exit 0 
     124        ;; 
     125        *) 
     126            echo "eee : unknown option ${1}" 
     127            echo "${usage}" 
     128            exit 1 
     129        ;; 
     130      esac 
     131      # next flag 
     132     shift 
    133133done 
    134134# 
     
    138138# 
    139139case "${mode}" in 
    140    demo) 
    141       awkblockstart="^%!demo$" 
    142       sedblockstart="^%!demo$" 
    143    ;; 
    144    test) 
    145       awkblockstart="^%!test$" 
    146       sedblockstart="^%!test$" 
    147    ;; 
    148    *) 
    149       echo "eee : ${mode} not implemented" 
    150       exit 1 
    151    ;; 
     140    demo) 
     141        awkblockstart="^%!demo$" 
     142        sedblockstart="^%!demo$" 
     143    ;; 
     144    test) 
     145        awkblockstart="^%!test$" 
     146        sedblockstart="^%!test$" 
     147    ;; 
     148    *) 
     149        echo "eee : ${mode} not implemented" 
     150        exit 1 
     151    ;; 
    152152esac 
    153153# 
     
    164164if [ ! -s /tmp/${$}_1 ] 
    165165then 
    166   rm /tmp/${$}_0 /tmp/${$}_1 
    167   echo "iii : no ${mode} block in ${filein}" 
    168   exit 1 
     166    rm /tmp/${$}_0 /tmp/${$}_1 
     167    echo "iii : no ${mode} block in ${filein}" 
     168    exit 1 
    169169fi 
    170170# 
  • trunk/adm/linkchecker.sh

    r532 r630  
    9292system=$(uname) 
    9393case "${system}" in 
    94    AIX|IRIX64) 
    95       echo " www : no specific posix checking" 
    96    ;; 
    97    *) 
    98       set -o posix 
    99    ;; 
     94    AIX|IRIX64) 
     95        echo " www : no specific posix checking" 
     96    ;; 
     97    *) 
     98        set -o posix 
     99    ;; 
    100100esac 
    101101command=$(basename ${0}) 
     
    109109if [ ${#} -lt ${minargcount} ] 
    110110then 
    111    echo "eee : not enought arguments" 
    112    echo "${usage}" 
    113    exit 1 
     111    echo "eee : not enought arguments" 
     112    echo "${usage}" 
     113    exit 1 
    114114fi 
    115115# 
     
    119119while [ ! -z "${1}" ] 
    120120do 
    121    case ${1} in 
    122       -d) 
    123          idircheck=$(( ${idircheck} + 1 )) 
    124          dircheck[${idircheck}]=$(cd ${2};pwd) 
    125          shift 
    126       ;; 
    127       -u) 
    128          iurlcheck=$(( ${iurlcheck} + 1 )) 
    129          urlcheck[${iurlcheck}]=${2} 
    130          shift 
    131       ;; 
    132    esac 
    133    # next flag 
    134    shift 
    135 done 
     121    case ${1} in 
     122        -d) 
     123            idircheck=$(( ${idircheck} + 1 )) 
     124            dircheck[${idircheck}]=$(cd ${2};pwd) 
     125            shift 
     126        ;; 
     127        -u) 
     128           iurlcheck=$(( ${iurlcheck} + 1 )) 
     129           urlcheck[${iurlcheck}]=${2} 
     130           shift 
     131        ;; 
     132     esac 
     133     # next flag 
     134     shift 
     135 done 
    136136# 
    137137# +++ remove temporarily 
     
    146146if [ ${commandcheck} = "linkchecker" ] 
    147147then 
    148    # test if linkchecker is available 
    149    type ${commandcheck} 1> /dev/null 2>&1 
    150    status=${?} 
    151    if [ ${status} -ne 0 ] 
    152    then 
    153       echo "${command} : eee : ${commandcheck} unavailable" 
    154       exit 1 
    155    fi 
    156    optcheck="--anchors --recursion-level=-1" 
     148    # test if linkchecker is available 
     149    type ${commandcheck} 1> /dev/null 2>&1 
     150    status=${?} 
     151    if [ ${status} -ne 0 ] 
     152    then 
     153        echo "${command} : eee : ${commandcheck} unavailable" 
     154        exit 1 
     155    fi 
     156    optcheck="--anchors --recursion-level=-1" 
    157157fi 
    158158# 
    159159if [ ${commandcheck} = "checklink" ] 
    160160then 
    161    # test if checklink is available 
    162    type ${commandcheck} 1> /dev/null 2>&1 
    163    status=${?} 
    164    if [ ${status} -ne 0 ] 
    165    then 
    166       echo "${command} : eee : ${commandcheck} unavailable" 
    167       exit 1 
    168    fi 
    169    # 
    170    optcheck="--summary --recursive" 
     161    # test if checklink is available 
     162    type ${commandcheck} 1> /dev/null 2>&1 
     163    status=${?} 
     164    if [ ${status} -ne 0 ] 
     165    then 
     166        echo "${command} : eee : ${commandcheck} unavailable" 
     167        exit 1 
     168    fi 
     169    # 
     170    optcheck="--summary --recursive" 
    171171fi 
    172172# 
     
    175175if [ ${dirchecksize} -gt 0 ] 
    176176then 
    177    idircheck=1 
    178    while [ ${idircheck} -le ${dirchecksize} ] 
    179    do 
    180       echo "iii : beginning of check of ${dircheck[${idircheck}]}" 1>>${log} 
    181       fverif="file://"${dircheck[${idircheck}]} 
    182       echo "iii : check of ${fverif}" 
    183       ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1 
    184       idircheck=$(( ${idircheck} + 1 )) 
    185    done 
     177    idircheck=1 
     178    while [ ${idircheck} -le ${dirchecksize} ] 
     179    do 
     180        echo "iii : beginning of check of ${dircheck[${idircheck}]}" 1>>${log} 
     181        fverif="file://"${dircheck[${idircheck}]} 
     182        echo "iii : check of ${fverif}" 
     183        ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1 
     184        idircheck=$(( ${idircheck} + 1 )) 
     185    done 
    186186fi 
    187187# 
     
    190190if [ ${urlchecksize} -gt 0 ] 
    191191then 
    192    iurlcheck=1 
    193    while [ ${iurlcheck} -le ${urlchecksize} ] 
    194    do 
    195       echo "iii : beginning of check of ${urlcheck[${iurlcheck}]}" 1>>${log} 
    196       # ++ test si urlcheck commence par http ou pas 
    197       fverif=${urlcheck[${iurlcheck}]} 
    198       echo "iii : check of ${fverif}" 
    199       ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1 
    200       iurlcheck=$(( ${iurlcheck} + 1 )) 
    201    done 
     192    iurlcheck=1 
     193    while [ ${iurlcheck} -le ${urlchecksize} ] 
     194    do 
     195        echo "iii : beginning of check of ${urlcheck[${iurlcheck}]}" 1>>${log} 
     196        # ++ test si urlcheck commence par http ou pas 
     197        fverif=${urlcheck[${iurlcheck}]} 
     198        echo "iii : check of ${fverif}" 
     199        ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1 
     200        iurlcheck=$(( ${iurlcheck} + 1 )) 
     201    done 
    202202fi 
    203203# 
  • trunk/adm/mlintall.sh

    r326 r630  
    104104system=$(uname) 
    105105case "${system}" in 
    106    AIX|IRIX64) 
    107       echo " www : no specific posix checking" 
    108    ;; 
    109    *) 
    110       set -o posix 
    111    ;; 
     106    AIX|IRIX64) 
     107        echo " www : no specific posix checking" 
     108    ;; 
     109    *) 
     110        set -o posix 
     111    ;; 
    112112esac 
    113113# 
     
    124124if [ ${#} -lt ${minargcount} ] 
    125125then 
    126    echo "eee : not enought arguments" 
    127    echo "${usage}" 
    128    exit 1 
     126    echo "eee : not enought arguments" 
     127    echo "${usage}" 
     128    exit 1 
    129129fi 
    130130unset minargcount 
     
    133133while [ ! -z "${1}" ] 
    134134do 
    135    case "${1}" in 
    136       -i) 
    137          # directory for inputs choosen by user 
    138          indir=${2} 
    139          # si l'opérateur a mis ., on force à $(pwd) pour être plus clair 
    140          # dans les sorties 
    141          if [ "${indir}" = "." ] 
    142          then 
    143             indir=$(pwd) 
    144          fi 
    145          shift 
    146       ;; 
    147       -o) 
    148          # directory for outputs choosen by user 
    149          outdir=${2} 
    150          # si l'opérateur a mis ., on force à $(pwd) pour être plus clair 
    151          # dans les sorties 
    152          if [ "${outdir}" = "." ] 
    153          then 
    154             outdir=$(pwd) 
    155          fi 
    156          shift 
    157       ;; 
    158       -a) 
    159          mlint_option=${2} 
    160          shift 
    161       ;; 
    162       *) 
    163          # other choice 
    164          echo "eee : unknown option ${1}" 
    165          echo "${usage}" 
    166          exit 1 
    167       ;; 
    168    esac 
    169    # next flag 
    170    shift 
     135    case "${1}" in 
     136        -i) 
     137            # directory for inputs choosen by user 
     138            indir=${2} 
     139            # si l'opérateur a mis ., on force à $(pwd) pour être plus clair 
     140            # dans les sorties 
     141            if [ "${indir}" = "." ] 
     142            then 
     143                indir=$(pwd) 
     144            fi 
     145            shift 
     146        ;; 
     147        -o) 
     148            # directory for outputs choosen by user 
     149            outdir=${2} 
     150            # si l'opérateur a mis ., on force à $(pwd) pour être plus clair 
     151            # dans les sorties 
     152            if [ "${outdir}" = "." ] 
     153            then 
     154                outdir=$(pwd) 
     155            fi 
     156            shift 
     157        ;; 
     158        -a) 
     159            mlint_option=${2} 
     160            shift 
     161        ;; 
     162        *) 
     163            # other choice 
     164            echo "eee : unknown option ${1}" 
     165            echo "${usage}" 
     166            exit 1 
     167        ;; 
     168     esac 
     169     # next flag 
     170     shift 
    171171done 
    172172# 
     
    176176if [ ! -d ${indir} ] 
    177177then 
    178    echo " eee : ${indir} not found" 
    179    exit 1 
     178    echo " eee : ${indir} not found" 
     179    exit 1 
    180180fi 
    181181# 
     
    183183if [ ! -x ${indir} ] 
    184184then 
    185    echo " eee : ${indir} not reachable" 
    186    exit 1 
     185    echo " eee : ${indir} not reachable" 
     186    exit 1 
    187187fi 
    188188# 
     
    191191if [ ! -d ${outdir} ] 
    192192then 
    193    mkdir -p ${outdir} 
    194    echo "${command} : iii : creation of \${outdir}" 
     193    mkdir -p ${outdir} 
     194    echo "${command} : iii : creation of \${outdir}" 
    195195fi 
    196196# check for permission on outdir 
    197197if [ ! -x ${outdir} ] 
    198198then 
    199    echo " eee : ${outdir} not reachable" 
    200    exit 1 
     199    echo " eee : ${outdir} not reachable" 
     200    exit 1 
    201201fi 
    202202if [ ! -w ${outdir} ] 
    203203then 
    204    echo " eee : ${outdir} not writable" 
    205    exit 1 
     204    echo " eee : ${outdir} not writable" 
     205    exit 1 
    206206fi 
    207207# 
     
    237237for m_file in ${list_m_files} 
    238238do 
    239    # build the command 
    240    arg_mlint=$(basename ${m_file} .m) 
    241    if [ "${mlint_option}" = "" ] 
    242    then 
    243       command_matlab="mlint('${arg_mlint}');" 
    244    else 
    245       command_matlab="mlint('${arg_mlint}','-${mlint_option}');" 
    246    fi 
    247    cat ${outdir}/command_add_path.m >  ${outdir}/mlintall.m 
    248    # write matlab command file 
    249    { 
    250       echo ${command_matlab} 
    251       echo "exit" 
    252    } >> ${outdir}/mlintall.m 
    253    # change directory before launching matlab 
    254    cd  ${outdir}/ 
    255    # launch matlab with this matlab command file (no extension) 
    256    echo "${command} : iii : mlint of ${m_file}" >> ${log} 
    257    echo "command : ${command_matlab}" >> ${log} 
    258    matlab -nojvm -nosplash -nodisplay -r mlintall >> ${log} 
    259    #++ debug echo "status fin matlab = $?" 
    260    unset command_matlab 
    261    unset arg_mlint 
    262    rm mlintall.m 
    263    cd ${memo_pwd} 
     239    # build the command 
     240    arg_mlint=$(basename ${m_file} .m) 
     241    if [ "${mlint_option}" = "" ] 
     242    then 
     243        command_matlab="mlint('${arg_mlint}');" 
     244    else 
     245        command_matlab="mlint('${arg_mlint}','-${mlint_option}');" 
     246    fi 
     247    cat ${outdir}/command_add_path.m >  ${outdir}/mlintall.m 
     248    # write matlab command file 
     249    { 
     250       echo ${command_matlab} 
     251       echo "exit" 
     252    } >> ${outdir}/mlintall.m 
     253    # change directory before launching matlab 
     254    cd  ${outdir}/ 
     255    # launch matlab with this matlab command file (no extension) 
     256    echo "${command} : iii : mlint of ${m_file}" >> ${log} 
     257    echo "command : ${command_matlab}" >> ${log} 
     258    matlab -nojvm -nosplash -nodisplay -r mlintall >> ${log} 
     259    #++ debug echo "status fin matlab = $?" 
     260    unset command_matlab 
     261    unset arg_mlint 
     262    rm mlintall.m 
     263    cd ${memo_pwd} 
    264264done 
    265265unset list_m_files 
  • trunk/docs/docs_dev/makefile_non_sphinx

    r532 r630  
    1010# 
    1111# génération des manuels à partir des fichiers non assimilables directement 
    12 # par sphinx  
     12# par sphinx 
    1313# 
    1414# SEE ALSO 
    1515# ======== 
    16 #  
     16# 
    1717# :ref:`builddoc` 
    1818# 
     
    2828# improve dependencies 
    2929# 
    30 # autodoc not ok may be see  autodoc-process-docstring  
     30# autodoc not ok may be see  autodoc-process-docstring 
    3131# 
    3232# sort pb within index_manuals for matlab scripts because severals 
     
    4444# 
    4545# - fplod 20120413T083156Z cratos (Linux) 
    46 #    
     46# 
    4747#   * creation from part of adm/makefile 
    4848# 
     
    364364        @extract_rst.sh -i $< -l IDL -o $@ 
    365365 
    366 source/manuals/%.m.rst : ../../src/%.m  
     366source/manuals/%.m.rst : ../../src/%.m 
    367367        @extract_rst.sh -i $< -l matlab -o $@ 
    368368 
     
    373373        @extract_rst.sh -i $< -l matlab -o $@ 
    374374 
    375 source/manuals/%.jnl.rst : ../../src/%.jnl   
     375source/manuals/%.jnl.rst : ../../src/%.jnl 
    376376        @extract_rst.sh -i $< -l ferret -o $@ 
  • trunk/docs/docs_dev/source/guides/rundemotest.rst

    r628 r630  
    5454 
    5555 $ cd ${PROJECT}/src 
    56  $ nosetests --with-doctest -v  
     56 $ nosetests --with-doctest -v *.py 
     57 
     58or:: 
     59 
     60 $ cd ${PROJECT}/src 
     61 $ coverage -rm -o  *.py 
    5762 
    5863octave 
  • trunk/src/cat_clim_ecmwf.sh

    r396 r630  
    127127system=$(uname) 
    128128case "${system}" in 
    129    AIX|IRIX64) 
    130       echo " www : no specific posix checking" 
    131    ;; 
    132    *) 
    133       set -o posix 
    134    ;; 
     129    AIX|IRIX64) 
     130        echo " www : no specific posix checking" 
     131    ;; 
     132    *) 
     133        set -o posix 
     134    ;; 
    135135esac 
    136136unset system 
     
    157157if [ ${#} -lt ${minargcount} ] 
    158158then 
    159    echo "eee : not enought arguments" 
    160    echo "${usage}" 
    161    exit 1 
     159    echo "eee : not enought arguments" 
     160    echo "${usage}" 
     161    exit 1 
    162162fi 
    163163unset minargcount 
     
    165165while [ ${#} -gt 0 ] 
    166166do 
    167    case ${1} in 
    168       -h) 
    169          echo "${usage}" 
    170          exit 0 
    171       ;; 
    172       *) 
    173          # other choice 
    174          echo "eee : unknown option ${1}" 
    175          echo "${usage}" 
    176          exit 1 
    177       ;; 
    178    esac 
    179    # next flag 
    180    shift 
     167    case ${1} in 
     168        -h) 
     169            echo "${usage}" 
     170            exit 0 
     171        ;; 
     172        *) 
     173            # other choice 
     174            echo "eee : unknown option ${1}" 
     175            echo "${usage}" 
     176            exit 1 
     177        ;; 
     178     esac 
     179    # next flag 
     180    shift 
    181181done 
    182182unset usage 
     
    185185if [ "${PROJECT_LOG}" = "" ] 
    186186then 
    187    echo " eee : \${PROJECT_LOG} not defined" 
    188    exit 1 
     187    echo " eee : \${PROJECT_LOG} not defined" 
     188    exit 1 
    189189fi 
    190190# 
     
    192192if [ ! -d ${PROJECT_LOG} ] 
    193193then 
    194    echo " eee : ${PROJECT_LOG} not found" 
    195    exit 1 
     194    echo " eee : ${PROJECT_LOG} not found" 
     195    exit 1 
    196196fi 
    197197# 
     
    199199if [ ! -x ${PROJECT_LOG} ] 
    200200then 
    201    echo " eee : ${PROJECT_LOG} not reachable" 
    202    exit 1 
     201    echo " eee : ${PROJECT_LOG} not reachable" 
     202    exit 1 
    203203fi 
    204204# 
     
    206206if [ ! -w ${PROJECT_LOG} ] 
    207207then 
    208    echo " eee : ${PROJECT_LOG} not writable" 
    209    exit 1 
     208    echo " eee : ${PROJECT_LOG} not writable" 
     209    exit 1 
    210210fi 
    211211# 
     
    223223while [ ${iyear} -le ${yearmax} ] 
    224224do 
    225    cyear=$(printf "%4.4d" ${iyear}) 
    226    imonth=${monthmin} 
    227    nmonth=0 
    228    listmonth=" " 
    229    while [ ${imonth} -le ${monthmax} ] 
    230    do 
     225    cyear=$(printf "%4.4d" ${iyear}) 
     226    imonth=${monthmin} 
     227    nmonth=0 
     228    listmonth=" " 
     229    while [ ${imonth} -le ${monthmax} ] 
     230    do 
    231231      cmonth=$(printf "%2.2d" ${imonth}) 
    232232      if [ ${iyear} -le 2001 ] 
     
    257257      fi 
    258258      imonth=$(( ${imonth} + 1 )) 
    259    done 
    260    # concatenation of monthly files 
    261    listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc" 
    262    # ++ si un aucun ++ si un seul cp au lieu de ncrcat 
    263    # test if more than one file within current year 
    264    case ${nmonth} in 
    265       0) 
    266          echo "eee : nothing to concatenate for year ${iyear}" 
    267          #++ exit 1 
    268       ;; 
    269       1) 
    270          cp ${listmonth} ${PROJECT_OD}/catr.${cyear}.6TU.nc 
    271          listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc" 
    272       ;; 
    273       *) 
    274          ncrcat ${listmonth} ${PROJECT_OD}/catr.${cyear}.6TU.nc 
    275          listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc" 
    276       ;; 
    277    esac 
    278    iyear=$(( ${iyear} + 1 )) 
     259    done 
     260    # concatenation of monthly files 
     261    listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc" 
     262    # ++ si un aucun ++ si un seul cp au lieu de ncrcat 
     263    # test if more than one file within current year 
     264    case ${nmonth} in 
     265        0) 
     266           echo "eee : nothing to concatenate for year ${iyear}" 
     267           #++ exit 1 
     268        ;; 
     269        1) 
     270           cp ${listmonth} ${PROJECT_OD}/catr.${cyear}.6TU.nc 
     271           listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc" 
     272        ;; 
     273        *) 
     274           ncrcat ${listmonth} ${PROJECT_OD}/catr.${cyear}.6TU.nc 
     275           listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc" 
     276        ;; 
     277    esac 
     278    iyear=$(( ${iyear} + 1 )) 
    279279done 
    280280unset iyear 
     
    286286if [ -f ${fileout} ] 
    287287then 
    288    echo "eee : ${fileout} already exists" 
    289    unset fileout 
    290    unset yearmin 
    291    unset yearmax 
    292    exit 1 
     288    echo "eee : ${fileout} already exists" 
     289    unset fileout 
     290    unset yearmin 
     291    unset yearmax 
     292    exit 1 
    293293fi 
    294294# 
     
    298298if [ ${status_ncrcat} -ne 0 ] 
    299299then 
    300    echo "eee : pb with ncrcat" 
    301    exit 1 
     300    echo "eee : pb with ncrcat" 
     301    exit 1 
    302302fi 
    303303unset status_ncrcat 
     
    309309if [ -f ${fileout} ] 
    310310then 
    311    echo "eee : ${fileout} already exists" 
    312    exit 1 
     311    echo "eee : ${fileout} already exists" 
     312    exit 1 
    313313fi 
    314314unset yearmin 
     
    320320if [ ${status_ncks} -ne 0 ] 
    321321then 
    322    echo "eee : pb with ncea" 
    323    exit 1 
     322    echo "eee : pb with ncea" 
     323    exit 1 
    324324fi 
    325325unset status_ncea 
  • trunk/src/cat_clim_olr.sh

    r526 r630  
    198198system=$(uname) 
    199199case "${system}" in 
    200    AIX|IRIX64) 
     200    AIX|IRIX64) 
    201201      echo " www : no specific posix checking" 
    202202   ;; 
     
    226226if [ ${#} -lt ${minargcount} ] 
    227227then 
    228    echo "eee : not enought arguments" 
    229    echo "${usage}" 
    230    exit 1 
     228    echo "eee : not enought arguments" 
     229    echo "${usage}" 
     230    exit 1 
    231231fi 
    232232unset minargcount 
     
    234234while [ ${#} -gt 0 ] 
    235235do 
    236    case ${1} in 
     236    case ${1} in 
    237237      -yearmin) 
    238238         yearmin=${2} 
     
    256256         exit 1 
    257257      ;; 
    258    esac 
     258    esac 
    259259   # next flag 
    260    shift 
     260    shift 
    261261done 
    262262unset usage 
     
    265265if [ "${PROJECT_LOG}" = "" ] 
    266266then 
    267    echo " eee : \${PROJECT_LOG} not defined" 
    268    exit 1 
     267    echo " eee : \${PROJECT_LOG} not defined" 
     268    exit 1 
    269269fi 
    270270# 
     
    272272if [ ! -d ${PROJECT_LOG} ] 
    273273then 
    274    echo " eee : ${PROJECT_LOG} not found" 
    275    exit 1 
     274    echo " eee : ${PROJECT_LOG} not found" 
     275    exit 1 
    276276fi 
    277277# 
     
    279279if [ ! -x ${PROJECT_LOG} ] 
    280280then 
    281    echo " eee : ${PROJECT_LOG} not reachable" 
    282    exit 1 
     281    echo " eee : ${PROJECT_LOG} not reachable" 
     282    exit 1 
    283283fi 
    284284# 
     
    286286if [ ! -w ${PROJECT_LOG} ] 
    287287then 
    288    echo " eee : ${PROJECT_LOG} not writable" 
    289    exit 1 
     288    echo " eee : ${PROJECT_LOG} not writable" 
     289    exit 1 
    290290fi 
    291291# 
     
    305305while [ ${iyear} -le ${yearmax} ] 
    306306do 
    307    cyear=$(printf "%4.4d" ${iyear}) 
    308    filein=${PROJECT_ID}/olr.day.mean_${cyear}_ng.nc 
    309    if [ ! -r ${PROJECT_ID}/olr.day.mean.nc ] 
    310    then 
     307    cyear=$(printf "%4.4d" ${iyear}) 
     308    filein=${PROJECT_ID}/olr.day.mean_${cyear}_ng.nc 
     309    if [ ! -r ${PROJECT_ID}/olr.day.mean.nc ] 
     310    then 
    311311      echo "eee : ${filein} not accessible" 1>>${log} 
    312312      exit 1 
    313    fi 
    314    file365[${iyear}]=${PROJECT_OD}/olr.day.mean_${cyear}_365d_ng.nc 
    315    file365_1=${PROJECT_OD}/olr.day.mean_${cyear}_365d1_ng.nc 
    316    file365_2=${PROJECT_OD}/olr.day.mean_${cyear}_365d2_ng.nc 
     313    fi 
     314    file365[${iyear}]=${PROJECT_OD}/olr.day.mean_${cyear}_365d_ng.nc 
     315    file365_1=${PROJECT_OD}/olr.day.mean_${cyear}_365d1_ng.nc 
     316    file365_2=${PROJECT_OD}/olr.day.mean_${cyear}_365d2_ng.nc 
    317317   # get rid of yyyy0229 
    318    is_leap_year.sh ${iyear} 
    319    ily_status=${?} 
    320    if [ ${ily_status} -eq 0 ] 
    321    then 
     318    is_leap_year.sh ${iyear} 
     319    ily_status=${?} 
     320    if [ ${ily_status} -eq 0 ] 
     321    then 
    322322      time1=$(echo ${iyear} | awk ' {printf "%4.4d-01-01 00:00:00.0",$1}') 
    323323      time2=$(echo ${iyear} | awk ' {printf "%4.4d-02-28 00:00:00.0",$1}') #++23:59 
     
    361361         rm ${file365_1} ${file365_2} 
    362362      fi 
    363    else 
     363    else 
    364364      cp ${filein} ${file365[${iyear}]} 
    365365      echo "iii : copy ${filein} ${file365[${iyear}]}" 1>>${log} 
    366    fi 
    367    listin="${listin} ${file365[${iyear}]}" 
    368    iyear=$(( ${iyear} + 1 )) 
     366    fi 
     367    listin="${listin} ${file365[${iyear}]}" 
     368    iyear=$(( ${iyear} + 1 )) 
    369369done 
    370370# 
     
    374374if [ -f ${fileout} ] 
    375375then 
    376    if [ ${force} -eq 0 ] 
    377    then 
     376    if [ ${force} -eq 0 ] 
     377    then 
    378378      echo "eee : ${fileout} already exists" 1>>${log} 
    379379      exit 1 
    380    fi 
     380    fi 
    381381fi 
    382382# 
     
    387387if [ ${status_ncea} -ne 0 ] 
    388388then 
    389    echo "eee : pb with ncea" 1>>${log} 
    390    exit 1 
     389    echo "eee : pb with ncea" 1>>${log} 
     390    exit 1 
    391391else 
    392    echo "iii : results in ${fileout}" 1>> ${log} 
    393    rm ${listin} 
     392    echo "iii : results in ${fileout}" 1>> ${log} 
     393    rm ${listin} 
    394394fi 
    395395unset status_ncea 
     
    403403if [ ${status_ncap} -ne 0 ] 
    404404then 
    405    echo "eee : pb with ncap" 1>>${log} 
    406    exit 1 
     405    echo "eee : pb with ncap" 1>>${log} 
     406    exit 1 
    407407else 
    408    echo "iii : results in ${fileout}_short" 1>> ${log} 
     408    echo "iii : results in ${fileout}_short" 1>> ${log} 
    409409fi 
    410410unset status_ncap 
  • trunk/src/classes_principales.sh

    r396 r630  
    100100system=$(uname) 
    101101case "${system}" in 
    102 AIX|IRIX64) 
    103   echo " www : no specific posix checking" 
    104 ;; 
    105 *) 
    106   set -o posix 
    107 ;; 
     102    AIX|IRIX64) 
     103        echo " www : no specific posix checking" 
     104    ;; 
     105    *) 
     106        set -o posix 
     107    ;; 
    108108esac 
    109109unset system 
     
    121121# 
    122122case "${system}" in 
    123 Darwin) 
    124  timecmd=/usr/bin/time 
    125 ;; 
    126 *) 
    127  timecmd=time 
    128 ;; 
     123    Darwin) 
     124        timecmd=/usr/bin/time 
     125    ;; 
     126    *) 
     127        timecmd=time 
     128    ;; 
    129129esac 
    130130# 
     
    135135if [ ${#} -lt ${minargcount} ] 
    136136then 
    137   echo "eee : not enought arguments" 
    138   echo "${usage}" 
    139   exit 1 
     137    echo "eee : not enought arguments" 
     138    echo "${usage}" 
     139    exit 1 
    140140fi 
    141141# 
    142142while [ ${#} -gt 0 ] 
    143143do 
    144  case ${1} in 
    145  -a) 
    146   application=${2} 
    147   shift 
    148  ;; 
    149  *) # anything else 
    150   echo "eee : ${usage}" 
    151   exit 1 
    152  ;; 
    153  esac 
    154  shift # next flag 
     144    case ${1} in 
     145        -a) 
     146            application=${2} 
     147            shift 
     148        ;; 
     149        *) 
     150            # anything else 
     151            echo "eee : ${usage}" 
     152            exit 1 
     153        ;; 
     154     esac 
     155     shift # next flag 
    155156done 
    156157# 
     
    171172if [ ${status} -ne 0 ] 
    172173then 
    173  echo " eee : ${tool} not found" 
    174  exit 1 
     174    echo " eee : ${tool} not found" 
     175    exit 1 
    175176fi 
    176177unset status 
     
    189190# 
    190191case ${application} in 
    191 matlab) 
    192  ${timecmd} matlab -nojvm -nosplash <  ${script} 1>> ${log} 2>&1 
    193  status=${?} 
    194 ;; 
    195 octave) 
    196  ${timecmd} octave --silent ${script} 1>> ${log} 2>&1 
    197  status=${?} 
    198 ;; 
     192    matlab) 
     193        ${timecmd} matlab -nojvm -nosplash <  ${script} 1>> ${log} 2>&1 
     194        status=${?} 
     195    ;; 
     196    octave) 
     197        ${timecmd} octave --silent ${script} 1>> ${log} 2>&1 
     198        status=${?} 
     199    ;; 
    199200esac 
    200201# 
    201202if [ ${status} -ne 0 ] 
    202203then 
    203    echo "eee : ${application} script failed" 1>> ${log} 2>&1 
    204    exit 1 
     204    echo "eee : ${application} script failed" 1>> ${log} 2>&1 
     205    exit 1 
    205206fi 
    206207# remove temporary latex files 
    207208rm ${PROJECT_OD}/classes_principales.bbl \ 
    208    ${PROJECT_OD}/classes_principales.blg \ 
    209    ${PROJECT_OD}/classes_principales.log \ 
    210    ${PROJECT_OD}/classes_principales.out \ 
    211    ${PROJECT_OD}/classes_principales.aux \ 
    212    2> /dev/null 
     209${PROJECT_OD}/classes_principales.blg \ 
     210${PROJECT_OD}/classes_principales.log \ 
     211${PROJECT_OD}/classes_principales.out \ 
     212${PROJECT_OD}/classes_principales.aux \ 
     2132> /dev/null 
    213214 
    214215pdflatex \ 
     
    225226# remove temporary latex files 
    226227rm ${PROJECT_OD}/classes_principales.bbl \ 
    227    ${PROJECT_OD}/classes_principales.blg \ 
    228    ${PROJECT_OD}/classes_principales.log \ 
    229    ${PROJECT_OD}/classes_principales.out \ 
    230    ${PROJECT_OD}/classes_principales.aux \ 
    231    2> /dev/null 
     228${PROJECT_OD}/classes_principales.blg \ 
     229${PROJECT_OD}/classes_principales.log \ 
     230${PROJECT_OD}/classes_principales.out \ 
     231${PROJECT_OD}/classes_principales.aux \ 
     2322> /dev/null 
    232233# 
    233234unset log_date 
  • trunk/src/concat-files.sh

    r565 r630  
    135135system=$(uname) 
    136136case "${system}" in 
    137    AIX|IRIX64) 
    138      echo "www : no specific posix checking" 
    139      date_cmd=date 
    140    ;; 
    141    Darwin) 
    142      set -o posix 
    143      date_cmd=gdate 
    144    ;; 
    145    Linux) 
    146      set -o posix 
    147      date_cmd=date 
     137    AIX|IRIX64) 
     138      echo "www : no specific posix checking" 
     139      date_cmd=date 
     140    ;; 
     141    Darwin) 
     142      set -o posix 
     143      date_cmd=gdate 
     144    ;; 
     145    Linux) 
     146      set -o posix 
     147      date_cmd=date 
    148148   ;; 
    149149   *) 
     
    177177if [ ${#} -lt ${minargcount} ] 
    178178then 
    179    echo "eee : not enought arguments" 
    180    echo "${usage}" 
    181    exit 1 
     179    echo "eee : not enought arguments" 
     180    echo "${usage}" 
     181    exit 1 
    182182fi 
    183183unset minargcount 
     
    185185while [ ${#} -gt 0 ] 
    186186do 
    187    case ${1} in 
     187    case ${1} in 
    188188     -p) 
    189189        product=${2} 
     
    213213        exit 1 
    214214     ;; 
    215    esac 
     215    esac 
    216216   # next flag 
    217    shift 
     217    shift 
    218218done 
    219219unset usage 
     
    294294if [ ${status} -ne 0 ] 
    295295then 
    296    echo "${command} : eee : tool ${tool} not found" 
    297    exit 1 
     296    echo "${command} : eee : tool ${tool} not found" 
     297    exit 1 
    298298fi 
    299299unset status 
     
    305305if [ ${status} -ne 0 ] 
    306306then 
    307    echo "${command} : eee : tool ${tool} not found" 
    308    exit 1 
     307    echo "${command} : eee : tool ${tool} not found" 
     308    exit 1 
    309309fi 
    310310unset status 
     
    312312if [ "${PROJECT_LOG}" = "" ] 
    313313then 
    314    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    315    exit 1 
     314    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     315    exit 1 
    316316fi 
    317317# 
     
    319319if [ ! -d ${PROJECT_LOG} ] 
    320320then 
    321    echo "${command} : eee : ${PROJECT_LOG} not found" 
    322    exit 1 
     321    echo "${command} : eee : ${PROJECT_LOG} not found" 
     322    exit 1 
    323323fi 
    324324# 
     
    326326if [ ! -x ${PROJECT_LOG} ] 
    327327then 
    328    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    329    exit 1 
     328    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     329    exit 1 
    330330fi 
    331331# 
     
    333333if [ ! -w ${PROJECT_LOG} ] 
    334334then 
    335    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    336    exit 1 
     335    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     336    exit 1 
    337337fi 
    338338# 
  • trunk/src/create_gif.sh

    r526 r630  
    131131system=$(uname) 
    132132case "${system}" in 
    133    AIX|IRIX64) 
    134      echo "www : no specific posix checking" 
    135      date_cmd=date 
    136    ;; 
    137    Darwin) 
    138      set -o posix 
    139      date_cmd=gdate 
    140    ;; 
    141    Linux) 
    142      set -o posix 
    143      date_cmd=date 
    144    ;; 
    145    *) 
    146     set -o posix 
    147    ;; 
     133    AIX|IRIX64) 
     134        echo "www : no specific posix checking" 
     135        date_cmd=date 
     136    ;; 
     137    Darwin) 
     138        set -o posix 
     139        date_cmd=gdate 
     140    ;; 
     141    Linux) 
     142        set -o posix 
     143        date_cmd=date 
     144    ;; 
     145    *) 
     146        set -o posix 
     147    ;; 
    148148esac 
    149149unset system 
     
    174174if [ ${status} -ne 0 ] 
    175175then 
    176    echo "${command} : eee : tool ${tool} not found" 
    177    exit 1 
     176    echo "${command} : eee : tool ${tool} not found" 
     177    exit 1 
    178178fi 
    179179unset status 
     
    183183if [ -f ${2} ] 
    184184then 
    185    echo "iii : ${2} already exist" >> ${log} 2>&1 
    186    exit 0 
     185    echo "iii : ${2} already exist" >> ${log} 2>&1 
     186    exit 0 
    187187fi 
    188188# 
    189189ferret -gif -nojnl -memsize 256 << EOF >> ${log} 2>&1 
    190   CANCEL MODE VERIFY 
    191   CANCEL DATA/ALL 
    192   CANCEL SYMBOL/ALL 
    193   GO create_gif_msg-${3}.jnl "${1}" "${2}"  
    194   quit 
     190    CANCEL MODE VERIFY 
     191    CANCEL DATA/ALL 
     192    CANCEL SYMBOL/ALL 
     193    GO create_gif_msg-${3}.jnl "${1}" "${2}"  
     194    quit 
    195195EOF 
    196196status=${?} 
    197197if [ ${status} -ne 0 ] 
    198198then 
    199    echo "eee : pb with create_gif_${3}.jnl : ${status}" >> ${log} 2>&1 
    200    exit 1  
     199    echo "eee : pb with create_gif_${3}.jnl : ${status}" >> ${log} 2>&1 
     200    exit 1  
    201201fi 
    202202unset status 
     
    204204if [ "${4}" != "" -a "${4}" != "0" ] 
    205205then 
    206   convert -draw "image Over ""${4}"" pal_msg-"${3}".gif" "${2}" "${2}" >> ${log} 2>&1 
     206    convert -draw "image Over ""${4}"" pal_msg-"${3}".gif" "${2}" "${2}" >> ${log} 2>&1 
    207207fi 
    208208# 
  • trunk/src/create_nc.sh

    r526 r630  
    144144system=$(uname) 
    145145case "${system}" in 
    146    AIX|IRIX64) 
    147      echo "www : no specific posix checking" 
    148      date_cmd=date 
    149    ;; 
    150    Darwin) 
    151      set -o posix 
    152      date_cmd=gdate 
    153    ;; 
    154    Linux) 
    155      set -o posix 
    156      date_cmd=date 
    157    ;; 
    158    *) 
    159     set -o posix 
    160    ;; 
     146    AIX|IRIX64) 
     147        echo "www : no specific posix checking" 
     148        date_cmd=date 
     149    ;; 
     150    Darwin) 
     151        set -o posix 
     152        date_cmd=gdate 
     153    ;; 
     154    Linux) 
     155        set -o posix 
     156        date_cmd=date 
     157    ;; 
     158    *) 
     159        set -o posix 
     160    ;; 
    161161esac 
    162162unset system 
     
    194194if [ ${status} -ne 0 ] 
    195195then 
    196    echo "${command} : eee : tool ${tool} not found" 
    197    exit 1 
     196    echo "${command} : eee : tool ${tool} not found" 
     197    exit 1 
    198198fi 
    199199unset status 
     
    205205if [ ${status} -ne 0 ] 
    206206then 
    207    echo "${command} : eee : tool ${tool} not found" 
    208    exit 1 
     207    echo "${command} : eee : tool ${tool} not found" 
     208    exit 1 
    209209fi 
    210210unset status 
     
    216216if [ ${status} -ne 0 ] 
    217217then 
    218    echo "${command} : eee : tool ${tool} not found" 
    219    exit 1 
     218    echo "${command} : eee : tool ${tool} not found" 
     219    exit 1 
    220220fi 
    221221unset status 
     
    237237if [ -f ${8} ] 
    238238then 
    239   if [ ${force} -eq 0 ] 
    240   then 
    241      echo "eee : ${8} already exists" 1>> ${log} 
    242      exit 1 
    243   else 
    244      rm -f ${8}  
    245   fi 
     239    if [ ${force} -eq 0 ] 
     240    then 
     241        echo "eee : ${8} already exists" 1>> ${log} 
     242        exit 1 
     243    else 
     244        rm -f ${8}  
     245    fi 
    246246fi 
    247247ferret -gif -nojnl -memsize 256 << EOF >> ${log} 2>&1 
    248   CANCEL MODE VERIFY 
    249   GO create_nc.jnl "${3}-${mois}-${1} ${4}:${5}:00" "${6}" "${7}" "${8}" "${9}" "${10}" "${13}" "${15}" "${16}" "${17}" "${18}" "${19}" 
    250   quit 
     248CANCEL MODE VERIFY 
     249GO create_nc.jnl "${3}-${mois}-${1} ${4}:${5}:00" "${6}" "${7}" "${8}" "${9}" "${10}" "${13}" "${15}" "${16}" "${17}" "${18}" "${19}" 
     250quit 
    251251EOF 
    252 if [ ! -f ${8} ]; then 
    253   echo "${8} non creation failed." >> ${log} 2>&1 
    254   exit 1 
     252if [ ! -f ${8} ] 
     253then 
     254    echo "${8} non creation failed." >> ${log} 2>&1 
     255    exit 1 
    255256fi 
    256257# 
     
    272273# 
    273274if [ "${9}" != 0 ]; then 
    274   ncatted -O -h -a long_name,DATA,o,c,"${9}" ${8}  >> ${log} 2>&1 
     275   ncatted -O -h -a long_name,DATA,o,c,"${9}" ${8}  >> ${log} 2>&1 
    275276fi 
    276277if [ "${10}" != 0 ]; then 
    277   ncatted -O -h -a units,DATA,o,c,"${10}" ${8}  >> ${log} 2>&1 
     278   ncatted -O -h -a units,DATA,o,c,"${10}" ${8}  >> ${log} 2>&1 
    278279fi 
    279280if [ "${11}" != 1 ]; then 
    280   ncatted -O -h -a scale_factor,DATA,o,f,"${11}" ${8}  >> ${log} 2>&1 
     281   ncatted -O -h -a scale_factor,DATA,o,f,"${11}" ${8}  >> ${log} 2>&1 
    281282fi 
    282283if [ "${12}" != 0 ]; then 
    283   ncatted -O -h -a add_offset,DATA,o,f,${12} ${8}  >> ${log} 2>&1 
     284   ncatted -O -h -a add_offset,DATA,o,f,${12} ${8}  >> ${log} 2>&1 
    284285fi 
    285286# 
  • trunk/src/cresamsu.sh

    r544 r630  
    137137system=$(uname) 
    138138case "${system}" in 
    139    AIX|IRIX64) 
    140      echo "${command} : www : no specific posix checking" 
    141      date_cmd=date 
    142    ;; 
    143    Darwin) 
    144      set -o posix 
    145      date_cmd=gdate 
    146    ;; 
    147    Linux) 
    148      set -o posix 
    149      date_cmd=date 
    150    ;; 
    151    *) 
    152     set -o posix 
    153    ;; 
     139    AIX|IRIX64) 
     140        echo "${command} : www : no specific posix checking" 
     141        date_cmd=date 
     142    ;; 
     143    Darwin) 
     144        set -o posix 
     145        date_cmd=gdate 
     146    ;; 
     147    Linux) 
     148        set -o posix 
     149        date_cmd=date 
     150    ;; 
     151    *) 
     152        set -o posix 
     153    ;; 
    154154esac 
    155155unset system 
     
    180180if [ ${#} -lt ${minargcount} ] 
    181181then 
    182    echo "${command} : eee : not enought arguments (${#} vs ${minargcount})" 
    183    echo "${usage}" 
    184    exit 1 
     182    echo "${command} : eee : not enought arguments (${#} vs ${minargcount})" 
     183    echo "${usage}" 
     184    exit 1 
    185185fi 
    186186unset minargcount 
     
    188188while [ ${#} -gt 0 ] 
    189189do 
    190    case ${1} in 
    191      -b) 
    192         # first date to get 
    193         yyyymmddb=${2} 
    194         shift 
    195      ;; 
    196      -e) 
    197         # last date to get 
    198         yyyymmdde=${2} 
    199         shift 
    200      ;; 
    201      -lonmin) 
    202         lonmin=${2} 
    203         shift 
    204      ;; 
    205      -lonmax) 
    206         lonmax=${2} 
    207         shift 
    208      ;; 
    209      -latmin) 
    210         latmin=${2} 
    211         shift 
    212      ;; 
    213      -latmax) 
    214         latmax=${2} 
    215         shift 
    216      ;; 
    217      -numch) 
    218         numch=${2} 
    219         shift 
    220      ;; 
    221      -temp) 
    222         temp=${2} 
    223         shift 
    224      ;; 
    225      -rtemp) 
    226         rtemp=${2} 
    227         shift 
    228      ;; 
    229      -rhdeg) 
    230         rhdeg=${2} 
    231         shift 
    232      ;; 
    233      -f) 
    234         force=1 
    235      ;; 
    236      -h) 
    237         echo "${usage}" 
    238         exit 0 
    239      ;; 
    240      *) 
    241         # other choice 
    242         echo "${command} : eee : unknown option ${1}" 
    243         echo "${usage}" 
    244         exit 1 
    245      ;; 
    246    esac 
    247    # next flag 
    248    shift 
     190    case ${1} in 
     191        -b) 
     192            # first date to get 
     193            yyyymmddb=${2} 
     194            shift 
     195        ;; 
     196        -e) 
     197            # last date to get 
     198            yyyymmdde=${2} 
     199            shift 
     200        ;; 
     201        -lonmin) 
     202            lonmin=${2} 
     203            shift 
     204        ;; 
     205            -lonmax) 
     206            lonmax=${2} 
     207            shift 
     208        ;; 
     209        -latmin) 
     210            latmin=${2} 
     211            shift 
     212        ;; 
     213        -latmax) 
     214            latmax=${2} 
     215            shift 
     216        ;; 
     217        -numch) 
     218            numch=${2} 
     219            shift 
     220        ;; 
     221        -temp) 
     222            temp=${2} 
     223            shift 
     224        ;; 
     225        -rtemp) 
     226            rtemp=${2} 
     227            shift 
     228        ;; 
     229        -rhdeg) 
     230            rhdeg=${2} 
     231            shift 
     232        ;; 
     233        -f) 
     234            force=1 
     235        ;; 
     236        -h) 
     237            echo "${usage}" 
     238            exit 0 
     239        ;; 
     240        *) 
     241           # other choice 
     242           echo "${command} : eee : unknown option ${1}" 
     243           echo "${usage}" 
     244           exit 1 
     245        ;; 
     246    esac 
     247    # next flag 
     248    shift 
    249249done 
    250250unset usage 
     
    311311if [ ${status} -ne 0 ] 
    312312then 
    313    echo "${command} : eee : tool ${IDL_CMD} not found" 
    314    echo "${command} : eee : check varamma_profile.sh sequence" 
    315    exit 1 
     313    echo "${command} : eee : tool ${IDL_CMD} not found" 
     314    echo "${command} : eee : check varamma_profile.sh sequence" 
     315    exit 1 
    316316fi 
    317317unset status 
     
    321321if [ ! -w ${PROJECT_LOG} ] 
    322322then 
    323    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    324    exit 1 
     323    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     324    exit 1 
    325325fi 
    326326# 
     
    378378result_type=size(result_cresamsu,/type) 
    379379IF (result_type EQ 3) THEN BEGIN 
    380    IF (result_cresamsu NE 0) THEN BEGIN 
    381        print, 'eee : pb cresamsu' 
    382        return, result_cresamsu 
    383    ENDIF 
     380    IF (result_cresamsu NE 0) THEN BEGIN 
     381        print, 'eee : pb cresamsu' 
     382        return, result_cresamsu 
     383    ENDIF 
    384384ENDIF 
    385385result = 0 
     
    425425if [ ${status} -ne 0 ] 
    426426then 
    427    echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1 
    428    cat ${PROJECT}/src/cresamsu_${$}.pro >> ${log} 2>&1 
    429    exit 1 
     427    echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1 
     428    cat ${PROJECT}/src/cresamsu_${$}.pro >> ${log} 2>&1 
     429    exit 1 
    430430fi 
    431431rm ${PROJECT}/src/cresamsu_${$}.pro 
  • trunk/src/dlogd.sh

    r215 r630  
    5656system=$(uname) 
    5757case "${system}" in 
    58    AIX|IRIX64) 
    59       echo " www : no specific posix checking" 
    60    ;; 
    61    *) 
    62       set -o posix 
    63    ;; 
     58    AIX|IRIX64) 
     59        echo " www : no specific posix checking" 
     60    ;; 
     61    *) 
     62        set -o posix 
     63    ;; 
    6464esac 
    6565unset system 
     
    7171if [ "${1}" = "" ] 
    7272then 
    73    echo "${command} : eee : 1st parameter missing" >&2 
    74    exit 1 
     73    echo "${command} : eee : 1st parameter missing" >&2 
     74    exit 1 
    7575fi 
    7676# 
     
    7878if [ "${PROJECT_LOG}" = "" ] 
    7979then 
    80    echo " eee : \${PROJECT_LOG} not defined" 
    81    exit 1 
     80    echo " eee : \${PROJECT_LOG} not defined" 
     81    exit 1 
    8282fi 
    8383# 
     
    8585if [ ! -d ${PROJECT_LOG} ] 
    8686then 
    87    echo " eee : ${PROJECT_LOG} not found" 
    88    exit 1 
     87    echo " eee : ${PROJECT_LOG} not found" 
     88    exit 1 
    8989fi 
    9090# 
     
    9292if [ ! -x ${PROJECT_LOG} ] 
    9393then 
    94    echo " eee : ${PROJECT_LOG} not reachable" 
    95    exit 1 
     94    echo " eee : ${PROJECT_LOG} not reachable" 
     95    exit 1 
    9696fi 
    9797# check for write permission on PROJECT_LOG 
    9898if [ ! -w ${PROJECT_LOG} ] 
    9999then 
    100    echo " eee : ${PROJECT_LOG} not writable" 
    101    exit 1 
     100    echo " eee : ${PROJECT_LOG} not writable" 
     101    exit 1 
    102102fi 
    103103# 
     
    107107if [ ${tmp} -eq 0 ] 
    108108then 
    109    if [ "${log}" = "" ] 
    110    then 
    111       echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 
    112       exit 1 
    113    else 
    114       # destruction du fichier ${log} 
    115       /bin/rm -i ${log} 
    116       unset log 
    117       exit 0 
    118    fi 
     109    if [ "${log}" = "" ] 
     110    then 
     111        echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 
     112        exit 1 
     113    else 
     114        # destruction du fichier ${log} 
     115        /bin/rm -i ${log} 
     116        unset log 
     117        exit 0 
     118    fi 
    119119else 
    120    exit 1 
     120    exit 1 
    121121fi 
  • trunk/src/elogd.sh

    r215 r630  
    6464system=$(uname) 
    6565case "${system}" in 
    66    AIX|IRIX64) 
    67       echo " www : no specific posix checking" 
    68    ;; 
    69    *) 
    70       set -o posix 
    71    ;; 
     66    AIX|IRIX64) 
     67        echo " www : no specific posix checking" 
     68    ;; 
     69    *) 
     70        set -o posix 
     71    ;; 
    7272esac 
    7373unset system 
     
    7979if [ ! "${EDITOR}" ] 
    8080then 
    81    echo " ${command} : eee : EDITOR undefined" >&2 
    82    exit 1 
     81    echo " ${command} : eee : EDITOR undefined" >&2 
     82    exit 1 
    8383fi 
    8484if [ "${1}" = "" ] 
    8585then 
    86    echo "${command} : eee : 1st parameter missing" >&2 
    87    exit 1 
     86    echo "${command} : eee : 1st parameter missing" >&2 
     87    exit 1 
    8888fi 
    8989# 
     
    9191if [ "${PROJECT_LOG}" = "" ] 
    9292then 
    93    echo " eee : \${PROJECT_LOG} not defined" 
    94    exit 1 
     93    echo " eee : \${PROJECT_LOG} not defined" 
     94    exit 1 
    9595fi 
    9696# 
     
    9898if [ ! -d ${PROJECT_LOG} ] 
    9999then 
    100    echo " eee : ${PROJECT_LOG} not found" 
    101    exit 1 
     100    echo " eee : ${PROJECT_LOG} not found" 
     101    exit 1 
    102102fi 
    103103# 
     
    105105if [ ! -x ${PROJECT_LOG} ] 
    106106then 
    107    echo " eee : ${PROJECT_LOG} not reachable" 
    108    exit 1 
     107    echo " eee : ${PROJECT_LOG} not reachable" 
     108    exit 1 
    109109fi 
    110110# 
     
    114114if [ ${tmp} -eq 0 ] 
    115115then 
    116    if [ "${log}" = "" ] 
    117    then 
    118       echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 
    119       exit 1 
    120    else 
    121       # edit 
    122       ${EDITOR} ${log} 
    123       unset log 
    124       exit 0 
    125    fi 
     116    if [ "${log}" = "" ] 
     117    then 
     118        echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 
     119        exit 1 
     120    else 
     121       # edit 
     122       ${EDITOR} ${log} 
     123       unset log 
     124       exit 0 
     125    fi 
    126126else 
    127    exit 1 
     127    exit 1 
    128128fi 
  • trunk/src/extract_netcdf_TRMM.sh

    r532 r630  
    8585if [ "${lesfiles}" = "" ] 
    8686then 
    87    echo "iii : no files ${find_name} found under ${find_dir}" 
    88    exit 0 
     87    echo "iii : no files ${find_name} found under ${find_dir}" 
     88    exit 0 
    8989fi 
    9090# 
     
    9494for ifile in ${lesfiles} 
    9595do 
    96   filename=$(basename ${ifile}) 
    97   newfile="extracted-${filename}" 
    98   newfile2="extracted2-${filename}" 
    99   echo "Extraction depuis ${filename}" 
    100   ncks -O -h -d latitude,${latmin},${latmax} -d longitude,${lonmin},${lonmax} ${ifile} ${outdir}/tmp/${newfile} 
    101   status=${?} 
    102   if [ ${status} -ne 0 ] 
    103   then 
    104       echo "eee : pb with ncks on ${ifile}" 
    105       ncdump -h ${ifile} 
    106       exit 1 
    107   else 
    108       echo "iii : adding ${outdir}/tmp/${newfile}" 
    109   fi 
    110   unset status 
    111   ncap2 -O -h -s '*nblon=$longitude.size;for (*idx=0;idx<nblon;idx++){if (longitude(idx) > 180) longitude(idx)=longitude(idx)-360.;}' ${outdir}/tmp/${newfile} ${outdir}/tmp/${newfile2} 
    112   status=${?} 
    113   if [ ${status} -ne 0 ] 
    114   then 
    115       echo "eee : pb with ncap2 on ${newfile}" 
    116       ncdump -h ${newfile} 
    117       exit 1 
    118   else 
     96    filename=$(basename ${ifile}) 
     97    newfile="extracted-${filename}" 
     98    newfile2="extracted2-${filename}" 
     99    echo "Extraction depuis ${filename}" 
     100    ncks -O -h -d latitude,${latmin},${latmax} -d longitude,${lonmin},${lonmax} ${ifile} ${outdir}/tmp/${newfile} 
     101    status=${?} 
     102    if [ ${status} -ne 0 ] 
     103    then 
     104        echo "eee : pb with ncks on ${ifile}" 
     105        ncdump -h ${ifile} 
     106        exit 1 
     107    else 
     108        echo "iii : adding ${outdir}/tmp/${newfile}" 
     109    fi 
     110    unset status 
     111    ncap2 -O -h -s '*nblon=$longitude.size;for (*idx=0;idx<nblon;idx++){if (longitude(idx) > 180) longitude(idx)=longitude(idx)-360.;}' ${outdir}/tmp/${newfile} ${outdir}/tmp/${newfile2} 
     112    status=${?} 
     113    if [ ${status} -ne 0 ] 
     114    then 
     115        echo "eee : pb with ncap2 on ${newfile}" 
     116        ncdump -h ${newfile} 
     117        exit 1 
     118    else 
    119119      echo "iii : adding ${outdir}/tmp/${newfile2}" 
    120   fi 
     120    fi 
    121121  #++rm -f ${outdir}/tmp/${newfile} 
    122122done 
  • trunk/src/extract_zone_nc.sh

    r350 r630  
    140140if [ "${lesfiles}" = "" ] 
    141141then  
    142    echo "iii : no files ${find_name} found under ${find_dir}" 
    143    exit 0 
     142    echo "iii : no files ${find_name} found under ${find_dir}" 
     143    exit 0 
    144144fi 
    145145 
     
    148148for ifile in ${lesfiles}  
    149149do 
    150   filename=$(basename $ifile) 
    151   newfile="extracted-${filename}" 
    152 #  newfile2="extracted2-${filename}" 
    153   echo "Extraction depuis ${ifile}" 
    154   ncks -O -h -d ${latvar},${latmin},${latmax} -d ${lonvar},${lonmin},${lonmax} ${ifile} ${outdir}/${newfile} 
    155   status=${?} 
    156   if [ ${status} -ne 0 ] 
    157   then 
    158       echo "eee : pb with ncks on ${ifile}" 
    159       ncdump -h ${ifile} 
    160       exit 1 
    161   else 
    162       echo "iii : adding ${outdir}/${newfile}" 
    163   fi 
    164 # ncap2 -O -h -s '*nblon=$longitude.size;for (*idx=0;idx<nblon;idx++){if (longitude(idx) > 180) longitude(idx)=longitude(idx)-360.;}' ${outdir}/tmp/${newfile} ${outdir}/tmp/${newfile2} 
    165 # rm -f ${outdir}/${newfile} 
    166 done 
     150    filename=$(basename $ifile) 
     151    newfile="extracted-${filename}" 
     152    #  newfile2="extracted2-${filename}" 
     153    echo "Extraction depuis ${ifile}" 
     154    ncks -O -h -d ${latvar},${latmin},${latmax} -d ${lonvar},${lonmin},${lonmax} ${ifile} ${outdir}/${newfile} 
     155    status=${?} 
     156    if [ ${status} -ne 0 ] 
     157    then 
     158         echo "eee : pb with ncks on ${ifile}" 
     159         ncdump -h ${ifile} 
     160         exit 1 
     161    else 
     162         echo "iii : adding ${outdir}/${newfile}" 
     163    fi 
     164    # ncap2 -O -h -s '*nblon=$longitude.size;for (*idx=0;idx<nblon;idx++){if (longitude(idx) > 180) longitude(idx)=longitude(idx)-360.;}' ${outdir}/tmp/${newfile} ${outdir}/tmp/${newfile2} 
     165    # rm -f ${outdir}/${newfile} 
     166 done 
  • trunk/src/geolocation_to_string_sh.sh

    r526 r630  
    9696system=$(uname) 
    9797case "${system}" in 
    98    AIX|IRIX64) 
    99      echo "www : no specific posix checking" 
    100      date_cmd=date 
     98    AIX|IRIX64) 
     99       echo "www : no specific posix checking" 
     100       date_cmd=date 
     101    ;; 
     102    Darwin) 
     103       set -o posix 
     104       date_cmd=gdate 
    101105   ;; 
    102    Darwin) 
    103      set -o posix 
    104      date_cmd=gdate 
    105    ;; 
    106    Linux) 
     106     Linux) 
    107107     set -o posix 
    108108     date_cmd=date 
     
    128128if [ ${#} -lt ${minargcount} ] 
    129129then 
    130    echo "eee : not enought arguments" 
    131    echo "${usage}" 
    132    exit 1 
     130    echo "eee : not enought arguments" 
     131    echo "${usage}" 
     132    exit 1 
    133133fi 
    134134unset minargcount 
     
    136136while [ ${#} -gt 0 ] 
    137137do 
    138    case ${1} in 
     138    case ${1} in 
    139139     -lon) 
    140140        lon=${2} 
     
    155155        exit 1 
    156156     ;; 
    157    esac 
    158    # next flag 
    159    shift 
     157    esac 
     158    # next flag 
     159    shift 
    160160done 
    161161unset usage 
     
    175175if [ ${lon} -ge 0 ] 
    176176then 
    177    lonletter='e' 
     177    lonletter='e' 
    178178else 
    179    lonletter='w' 
     179    lonletter='w' 
    180180fi 
    181181if [ ${lat} -ge 0 ] 
    182182then 
    183    latletter='n' 
     183    latletter='n' 
    184184else 
    185    latletter='s' 
     185    latletter='s' 
    186186fi 
    187187# 
  • trunk/src/get_amsu.sh

    r585 r630  
    134134system=$(uname) 
    135135case "${system}" in 
    136    AIX|IRIX64) 
    137       echo "www : no specific posix checking" 
     136    AIX|IRIX64) 
     137       echo "www : no specific posix checking" 
    138138      date_cmd=date 
    139139   ;; 
    140    Darwin) 
     140    Darwin) 
    141141      set -o posix 
    142142      date_cmd=gdate 
    143143   ;; 
    144    Linux) 
     144    Linux) 
    145145      set -o posix 
    146146      date_cmd=date 
     
    174174if [ ${#} -lt ${minargcount} ] 
    175175then 
    176    echo "eee : not enought arguments" 
    177    echo "${usage}" 
    178    exit 1 
     176    echo "eee : not enought arguments" 
     177    echo "${usage}" 
     178    exit 1 
    179179fi 
    180180unset minargcount 
     
    182182while [ ${#} -gt 0 ] 
    183183do 
    184    case ${1} in 
     184    case ${1} in 
    185185      -b) 
    186186         # first date to get 
     
    206206         exit 1 
    207207      ;; 
    208    esac 
     208    esac 
    209209   # next flag 
    210    shift 
     210    shift 
    211211done 
    212212unset usage 
     
    260260if [ "${PROJECT_LOG}" = "" ] 
    261261then 
    262    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    263    exit 1 
     262    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     263    exit 1 
    264264fi 
    265265# 
     
    267267if [ ! -d ${PROJECT_LOG} ] 
    268268then 
    269    echo "${command} : eee : ${PROJECT_LOG} not found" 
    270    exit 1 
     269    echo "${command} : eee : ${PROJECT_LOG} not found" 
     270    exit 1 
    271271fi 
    272272# 
     
    274274if [ ! -x ${PROJECT_LOG} ] 
    275275then 
    276    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    277    exit 1 
     276    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     277    exit 1 
    278278fi 
    279279# 
     
    281281if [ ! -w ${PROJECT_LOG} ] 
    282282then 
    283    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    284    exit 1 
     283    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     284    exit 1 
    285285fi 
    286286# 
     
    371371if [ "${list_url}" = "" ] 
    372372then 
    373    echo "iii : no files founds" >> ${log} 2>&1 
     373     echo "iii : no files founds" >> ${log} 2>&1 
    374374else 
    375375    # 
  • trunk/src/get_epsat.sh

    r565 r630  
    126126system=$(uname) 
    127127case "${system}" in 
    128    AIX|IRIX64) 
     128    AIX|IRIX64) 
    129129      echo "www : no specific posix checking" 
    130130      date_cmd=date 
    131131   ;; 
    132    Darwin) 
     132    Darwin) 
    133133      set -o posix 
    134134      date_cmd=gdate 
    135135   ;; 
    136    Linux) 
     136    Linux) 
    137137      set -o posix 
    138138      date_cmd=date 
     
    166166if [ ${#} -lt ${minargcount} ] 
    167167then 
    168    echo "eee : not enought arguments" 
    169    echo "${usage}" 
    170    exit 1 
     168    echo "eee : not enought arguments" 
     169    echo "${usage}" 
     170    exit 1 
    171171fi 
    172172unset minargcount 
     
    174174while [ ${#} -gt 0 ] 
    175175do 
    176    case ${1} in 
     176    case ${1} in 
    177177      -b) 
    178178         # first date to get 
     
    198198         exit 1 
    199199      ;; 
    200    esac 
     200    esac 
    201201   # next flag 
    202    shift 
     202    shift 
    203203done 
    204204unset usage 
     
    252252if [ "${PROJECT_LOG}" = "" ] 
    253253then 
    254    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    255    exit 1 
     254    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     255    exit 1 
    256256fi 
    257257# 
     
    259259if [ ! -d ${PROJECT_LOG} ] 
    260260then 
    261    echo "${command} : eee : ${PROJECT_LOG} not found" 
    262    exit 1 
     261    echo "${command} : eee : ${PROJECT_LOG} not found" 
     262    exit 1 
    263263fi 
    264264# 
     
    266266if [ ! -x ${PROJECT_LOG} ] 
    267267then 
    268    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    269    exit 1 
     268    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     269    exit 1 
    270270fi 
    271271# 
     
    273273if [ ! -w ${PROJECT_LOG} ] 
    274274then 
    275    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    276    exit 1 
     275    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     276    exit 1 
    277277fi 
    278278# 
     
    336336if [ "${list_url}" = "" ] 
    337337then 
    338    echo "iii : no files founds" >> ${log} 2>&1 
     338    echo "iii : no files founds" >> ${log} 2>&1 
    339339else 
    340340    # 
  • trunk/src/get_msg.sh

    r625 r630  
    151151system=$(uname) 
    152152case "${system}" in 
    153    AIX|IRIX64) 
    154       echo "www : no specific posix checking" 
    155       date_cmd=date 
    156    ;; 
    157    Darwin) 
    158       set -o posix 
    159       date_cmd=gdate 
    160    ;; 
    161    Linux) 
    162       set -o posix 
    163       date_cmd=date 
    164    ;; 
    165    *) 
    166      set -o posix 
     153    AIX|IRIX64) 
     154        echo "www : no specific posix checking" 
     155        date_cmd=date 
     156    ;; 
     157    Darwin) 
     158        set -o posix 
     159        date_cmd=gdate 
     160    ;; 
     161    Linux) 
     162        set -o posix 
     163        date_cmd=date 
     164    ;; 
     165    *) 
     166       set -o posix 
    167167   ;; 
    168168esac 
     
    192192if [ ${#} -lt ${minargcount} ] 
    193193then 
    194    echo "eee : not enought arguments" 
    195    echo "${usage}" 
    196    exit 1 
     194    echo "eee : not enought arguments" 
     195    echo "${usage}" 
     196    exit 1 
    197197fi 
    198198unset minargcount 
     
    200200while [ ${#} -gt 0 ] 
    201201do 
    202    case ${1} in 
    203       -p) 
    204          product=${2} 
    205          shift 
    206       ;; 
    207       -b) 
    208          # first date to get 
    209          yyyymmddb=${2} 
    210          shift 
    211       ;; 
    212       -e) 
    213          # last date to get 
    214          yyyymmdde=${2} 
    215          shift 
    216       ;; 
    217       -f) 
    218          force=1 
    219       ;; 
    220       -h) 
    221          echo "${usage}" 
    222          exit 0 
    223       ;; 
    224       *) 
    225          # other choice 
    226          echo "eee : unknown option ${1}" 
    227          echo "${usage}" 
    228          exit 1 
    229       ;; 
    230    esac 
    231    # next flag 
    232    shift 
     202    case ${1} in 
     203        -p) 
     204            product=${2} 
     205           shift 
     206        ;; 
     207        -b) 
     208            # first date to get 
     209            yyyymmddb=${2} 
     210            shift 
     211        ;; 
     212        -e) 
     213            # last date to get 
     214            yyyymmdde=${2} 
     215            shift 
     216        ;; 
     217        -f) 
     218            force=1 
     219        ;; 
     220        -h) 
     221            echo "${usage}" 
     222            exit 0 
     223        ;; 
     224        *) 
     225            # other choice 
     226            echo "eee : unknown option ${1}" 
     227            echo "${usage}" 
     228            exit 1 
     229        ;; 
     230    esac 
     231    # next flag 
     232    shift 
    233233done 
    234234unset usage 
     
    319319if [ "${PROJECT_LOG}" = "" ] 
    320320then 
    321    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    322    exit 1 
     321    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     322    exit 1 
    323323fi 
    324324# 
     
    326326if [ ! -d ${PROJECT_LOG} ] 
    327327then 
    328    echo "${command} : eee : ${PROJECT_LOG} not found" 
    329    exit 1 
     328    echo "${command} : eee : ${PROJECT_LOG} not found" 
     329    exit 1 
    330330fi 
    331331# 
     
    333333if [ ! -x ${PROJECT_LOG} ] 
    334334then 
    335    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    336    exit 1 
     335    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     336    exit 1 
    337337fi 
    338338# 
     
    340340if [ ! -w ${PROJECT_LOG} ] 
    341341then 
    342    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    343    exit 1 
     342    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     343    exit 1 
    344344fi 
    345345# 
     
    425425if [ "${list_url}" = "" ] 
    426426then 
    427    echo "iii : no files founds" >> ${log} 2>&1 
     427    echo "iii : no files founds" >> ${log} 2>&1 
    428428else 
    429429    # 
  • trunk/src/get_msg_xrit.sh

    r626 r630  
    305305system=$(uname) 
    306306case "${system}" in 
    307    AIX|IRIX64) 
    308       echo "www : no specific posix checking" 
    309       date_cmd=date 
    310    ;; 
    311    Darwin) 
    312       set -o posix 
    313       date_cmd=gdate 
    314    ;; 
    315    Linux) 
    316       set -o posix 
    317       date_cmd=date 
    318    ;; 
    319    *) 
    320      set -o posix 
    321    ;; 
     307    AIX|IRIX64) 
     308        echo "www : no specific posix checking" 
     309        date_cmd=date 
     310    ;; 
     311    Darwin) 
     312        set -o posix 
     313        date_cmd=gdate 
     314    ;; 
     315    Linux) 
     316        set -o posix 
     317        date_cmd=date 
     318    ;; 
     319    *) 
     320        set -o posix 
     321    ;; 
    322322esac 
    323323unset system 
     
    346346if [ ${#} -lt ${minargcount} ] 
    347347then 
    348    echo "eee : not enought arguments" 
    349    echo "${usage}" 
    350    exit 1 
     348    echo "eee : not enought arguments" 
     349    echo "${usage}" 
     350    exit 1 
    351351fi 
    352352unset minargcount 
     
    354354while [ ${#} -gt 0 ] 
    355355do 
    356    case ${1} in 
    357       -p) 
    358          product=${2} 
    359          shift 
    360       ;; 
    361       -b) 
    362          # first date to get 
    363          yyyymmddb=${2} 
    364          shift 
    365       ;; 
    366       -e) 
    367          # last date to get 
    368          yyyymmdde=${2} 
    369          shift 
    370       ;; 
    371       -f) 
    372          force=1 
    373       ;; 
    374       -h) 
    375          echo "${usage}" 
    376          exit 0 
    377       ;; 
    378       *) 
    379          # other choice 
    380          echo "eee : unknown option ${1}" 
    381          echo "${usage}" 
    382          exit 1 
    383       ;; 
    384    esac 
    385    # next flag 
    386    shift 
     356    case ${1} in 
     357        -p) 
     358            product=${2} 
     359            shift 
     360        ;; 
     361        -b) 
     362            # first date to get 
     363            yyyymmddb=${2} 
     364            shift 
     365        ;; 
     366        -e) 
     367            # last date to get 
     368            yyyymmdde=${2} 
     369            shift 
     370        ;; 
     371        -f) 
     372            force=1 
     373        ;; 
     374        -h) 
     375            echo "${usage}" 
     376            exit 0 
     377        ;; 
     378        *) 
     379            # other choice 
     380            echo "eee : unknown option ${1}" 
     381            echo "${usage}" 
     382            exit 1 
     383        ;; 
     384    esac 
     385    # next flag 
     386    shift 
    387387done 
    388388unset usage 
     
    446446if [ "${PROJECT_LOG}" = "" ] 
    447447then 
    448    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    449    exit 1 
     448    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     449    exit 1 
    450450fi 
    451451# 
     
    453453if [ ! -d ${PROJECT_LOG} ] 
    454454then 
    455    echo "${command} : eee : ${PROJECT_LOG} not found" 
    456    exit 1 
     455    echo "${command} : eee : ${PROJECT_LOG} not found" 
     456    exit 1 
    457457fi 
    458458# 
     
    460460if [ ! -x ${PROJECT_LOG} ] 
    461461then 
    462    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    463    exit 1 
     462    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     463    exit 1 
    464464fi 
    465465# 
     
    467467if [ ! -w ${PROJECT_LOG} ] 
    468468then 
    469    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    470    exit 1 
     469    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     470    exit 1 
    471471fi 
    472472# 
     
    535535if [ "${list_url}" = "" ] 
    536536then 
    537    echo "iii : no files founds" >> ${log} 2>&1 
     537    echo "iii : no files founds" >> ${log} 2>&1 
    538538else 
    539539    # 
  • trunk/src/get_trmm.sh

    r565 r630  
    122122system=$(uname) 
    123123case "${system}" in 
    124    AIX|IRIX64) 
    125       echo "www : no specific posix checking" 
    126       date_cmd=date 
    127    ;; 
    128    Darwin) 
    129       set -o posix 
    130       date_cmd=gdate 
    131    ;; 
    132    Linux) 
    133       set -o posix 
    134       date_cmd=date 
    135    ;; 
    136    *) 
    137      set -o posix 
    138    ;; 
     124    AIX|IRIX64) 
     125        echo "www : no specific posix checking" 
     126        date_cmd=date 
     127    ;; 
     128    Darwin) 
     129        set -o posix 
     130        date_cmd=gdate 
     131    ;; 
     132    Linux) 
     133        set -o posix 
     134        date_cmd=date 
     135    ;; 
     136    *) 
     137       set -o posix 
     138    ;; 
    139139esac 
    140140unset system 
     
    164164if [ ${#} -lt ${minargcount} ] 
    165165then 
    166    echo "eee : not enought arguments" 
    167    echo "${usage}" 
    168    exit 1 
     166    echo "eee : not enought arguments" 
     167    echo "${usage}" 
     168    exit 1 
    169169fi 
    170170unset minargcount 
     
    172172while [ ${#} -gt 0 ] 
    173173do 
    174    case ${1} in 
    175       -p) 
     174    case ${1} in 
     175        -p) 
    176176         product=${2} 
    177177         shift 
     
    200200         exit 1 
    201201      ;; 
    202    esac 
    203    # next flag 
    204    shift 
     202    esac 
     203    # next flag 
     204    shift 
    205205done 
    206206unset usage 
     
    264264if [ "${PROJECT_LOG}" = "" ] 
    265265then 
    266    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    267    exit 1 
     266    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     267    exit 1 
    268268fi 
    269269# 
     
    271271if [ ! -d ${PROJECT_LOG} ] 
    272272then 
    273    echo "${command} : eee : ${PROJECT_LOG} not found" 
    274    exit 1 
     273    echo "${command} : eee : ${PROJECT_LOG} not found" 
     274    exit 1 
    275275fi 
    276276# 
     
    278278if [ ! -x ${PROJECT_LOG} ] 
    279279then 
    280    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    281    exit 1 
     280    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     281    exit 1 
    282282fi 
    283283# 
     
    285285if [ ! -w ${PROJECT_LOG} ] 
    286286then 
    287    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    288    exit 1 
     287    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     288    exit 1 
    289289fi 
    290290# 
     
    350350if [ "${list_url}" = "" ] 
    351351then 
    352    echo "iii : no files founds" >> ${log} 2>&1 
     352    echo "iii : no files founds" >> ${log} 2>&1 
    353353else 
    354354    # 
  • trunk/src/is_leap_year.sh

    r267 r630  
    5656# - fplod 20100318T075424Z aedon.locean-ipsl.upmc.fr (Darwin) 
    5757# 
    58 # 
    5958# - fplod 2008-08-05T13:21:05Z aedon.locean-ipsl.upmc.fr (Darwin) 
    6059# 
     
    6968  \( $(( ${ily_year} % 4)) -eq 0 -a \ 
    7069  $(( ${ily_year} % 100)) -ne 0 \) ] && { 
    71    exit 0 
     70    exit 0 
    7271   } || { 
    7372    exit 1 
  • trunk/src/olr_split.sh

    r526 r630  
    184184system=$(uname) 
    185185case "${system}" in 
    186    AIX|IRIX64) 
    187       echo " www : no specific posix checking" 
    188    ;; 
    189    *) 
    190      set -o posix 
    191    ;; 
     186    AIX|IRIX64) 
     187        echo " www : no specific posix checking" 
     188    ;; 
     189    *) 
     190        set -o posix 
     191    ;; 
    192192esac 
    193193unset system 
     
    198198# 
    199199case $(hostname) in 
    200    zeus.locean-ipsl.upmc.fr|dedale.locean-ipsl.upmc.fr) 
    201       echo "eee : pb on UDUnits library on zeus" 
    202       echo "eee : contact system team" 
    203       exit 1 
    204    ;; 
     200    zeus.locean-ipsl.upmc.fr|dedale.locean-ipsl.upmc.fr) 
     201        echo "eee : pb on UDUnits library on zeus" 
     202        echo "eee : contact system team" 
     203        exit 1 
     204    ;; 
    205205esac 
    206206# 
     
    226226if [ ${#} -lt ${minargcount} ] 
    227227then 
    228    echo "eee : not enought arguments" 
    229    echo "${usage}" 
    230    exit 1 
     228    echo "eee : not enought arguments" 
     229    echo "${usage}" 
     230    exit 1 
    231231fi 
    232232unset minargcount 
     
    234234while [ ${#} -gt 0 ] 
    235235do 
    236    case ${1} in 
    237       -g) 
    238          global=1 
    239          # ++ comment connaitre la 1er année si -g. 
    240          # dans le README on nous dit que ça commence en 1974 mais il faudrait automatiser 
    241          # ++ idem pour la dernière année 
    242          # pour l'instant forçage 
    243          yearmin=1974 
    244          yearmax=2008 
    245          echo "www : forçage yearmin yearmax : ${yearmin} ${yearmax}" 
    246       ;; 
    247       -f) 
    248          force=1 
    249       ;; 
    250       -r) 
    251          rebuild=1 
    252       ;; 
    253       -y) 
    254          yearmin=${2} 
    255          yearmax=${yearmin} 
    256          shift 
    257       ;; 
    258       -h) 
    259          echo "${usage}" 
    260          exit 0 
    261       ;; 
    262       *) 
    263          # other choice 
    264          echo "eee : unknown option ${1}" 
    265          echo "${usage}" 
    266          exit 1 
    267       ;; 
    268    esac 
    269    # next flag 
    270    shift 
     236    case ${1} in 
     237        -g) 
     238            global=1 
     239            # ++ comment connaitre la 1er année si -g. 
     240            # dans le README on nous dit que ça commence en 1974 mais il faudrait automatiser 
     241            # ++ idem pour la dernière année 
     242            # pour l'instant forçage 
     243            yearmin=1974 
     244            yearmax=2008 
     245            echo "www : forçage yearmin yearmax : ${yearmin} ${yearmax}" 
     246        ;; 
     247        -f) 
     248            force=1 
     249        ;; 
     250        -r) 
     251            rebuild=1 
     252        ;; 
     253        -y) 
     254            yearmin=${2} 
     255            yearmax=${yearmin} 
     256            shift 
     257        ;; 
     258        -h) 
     259            echo "${usage}" 
     260            exit 0 
     261        ;; 
     262        *) 
     263            # other choice 
     264            echo "eee : unknown option ${1}" 
     265            echo "${usage}" 
     266            exit 1 
     267        ;; 
     268    esac 
     269    # next flag 
     270    shift 
    271271done 
    272272unset usage 
     
    277277if [ "${PROJECT_LOG}" = "" ] 
    278278then 
    279    echo " eee : \${PROJECT_LOG} not defined" 
    280    exit 1 
     279    echo " eee : \${PROJECT_LOG} not defined" 
     280    exit 1 
    281281fi 
    282282# 
     
    284284if [ ! -d ${PROJECT_LOG} ] 
    285285then 
    286    echo " eee : ${PROJECT_LOG} not found" 
    287    exit 1 
     286    echo " eee : ${PROJECT_LOG} not found" 
     287    exit 1 
    288288fi 
    289289# 
     
    291291if [ ! -x ${PROJECT_LOG} ] 
    292292then 
    293    echo " eee : ${PROJECT_LOG} not reachable" 
    294    exit 1 
     293    echo " eee : ${PROJECT_LOG} not reachable" 
     294    exit 1 
    295295fi 
    296296# 
     
    298298if [ ! -w ${PROJECT_LOG} ] 
    299299then 
    300    echo " eee : ${PROJECT_LOG} not writable" 
    301    exit 1 
     300    echo " eee : ${PROJECT_LOG} not writable" 
     301    exit 1 
    302302fi 
    303303# 
     
    312312if [ ! -r ${PROJECT_ID}/olr.day.mean.nc ] 
    313313then 
    314    echo "eee : ${filein} not accessible" 1>> ${log} 
    315    exit 1 
     314    echo "eee : ${filein} not accessible" 1>> ${log} 
     315    exit 1 
    316316fi 
    317317# 
     
    321321while [ ${iyear} -le ${yearmax} ] 
    322322do 
    323    timemin=$(echo ${iyear} | awk ' {printf "%4.4d-01-01 00:00:00.0",$1}') 
    324    timemax=$(echo ${iyear} | awk ' {printf "%4.4d-12-31 00:00:00.0",$1}') #++23:59:59 
    325    echo "iii : extraction ${iyear} from ${filein}" 1>> ${log} 
    326    if [ ${global} -eq 0 ] 
    327    then 
    328       fileout=${PROJECT_OD}/$(basename ${filein} .nc)_${iyear}_ng.nc 
    329    else 
    330       fileout=${PROJECT_OD}/$(basename ${filein} .nc)_${iyear}.nc 
    331    fi 
    332    if [ -f ${fileout} ] 
    333    then 
    334       if [ ${force} -eq 0 ] 
    335       then 
    336          echo "eee : ${fileout} already exists" 1>> ${log} 
    337          exit 1 
    338       else 
    339          # I remove the file because I don't know how to tell ncks to ask interactivily if I want to append, overwrite etc... 
    340          rm -f ${fileout} 
    341       fi 
    342    fi 
    343    if [ ${global} -eq 0 ] 
    344    then 
    345       # build float representation of lat and long limit (for hyperslab) 
    346       clatmin=$(echo ${latmin} | awk ' {printf "%+3.1f",$1}') 
    347       clatmax=$(echo ${latmax} | awk ' {printf "%+3.1f",$1}') 
    348       clonmin=$(echo ${lonmin} | awk ' {printf "%+4.1f",$1}') 
    349       clonmax=$(echo ${lonmax} | awk ' {printf "%+4.1f",$1}') 
     323    timemin=$(echo ${iyear} | awk ' {printf "%4.4d-01-01 00:00:00.0",$1}') 
     324    timemax=$(echo ${iyear} | awk ' {printf "%4.4d-12-31 00:00:00.0",$1}') #++23:59:59 
     325    echo "iii : extraction ${iyear} from ${filein}" 1>> ${log} 
     326    if [ ${global} -eq 0 ] 
     327    then 
     328        fileout=${PROJECT_OD}/$(basename ${filein} .nc)_${iyear}_ng.nc 
     329    else 
     330        fileout=${PROJECT_OD}/$(basename ${filein} .nc)_${iyear}.nc 
     331    fi 
     332    if [ -f ${fileout} ] 
     333    then 
     334        if [ ${force} -eq 0 ] 
     335        then 
     336            echo "eee : ${fileout} already exists" 1>> ${log} 
     337            exit 1 
     338        else 
     339            # I remove the file because I don't know how to tell ncks to ask interactivily if I want to append, overwrite etc... 
     340            rm -f ${fileout} 
     341        fi 
     342    fi 
     343    if [ ${global} -eq 0 ] 
     344    then 
     345        # build float representation of lat and long limit (for hyperslab) 
     346        clatmin=$(echo ${latmin} | awk ' {printf "%+3.1f",$1}') 
     347        clatmax=$(echo ${latmax} | awk ' {printf "%+3.1f",$1}') 
     348        clonmin=$(echo ${lonmin} | awk ' {printf "%+4.1f",$1}') 
     349        clonmax=$(echo ${lonmax} | awk ' {printf "%+4.1f",$1}') 
     350        ncks \ 
     351        -O \ 
     352        --dimension time,"${timemin}","${timemax}" \ 
     353        --dimension lat,"${clatmin}","${clatmax}" \ 
     354        --dimension lon,"${clonmin}","${clonmax}" \ 
     355        ${filein} ${fileout} 
     356        status_ncks=${?} 
     357        if [ ${status_ncks} -ne 0 ] 
     358        then 
     359            echo "eee : pb with ncks ${filein}" 1>> ${log} 
     360            exit 1 
     361        else 
     362            list_split="${list_split} ${fileout}" 
     363        fi 
     364        unset status_ncks 
     365    else 
    350366      ncks \ 
    351          -O \ 
    352          --dimension time,"${timemin}","${timemax}" \ 
    353          --dimension lat,"${clatmin}","${clatmax}" \ 
    354          --dimension lon,"${clonmin}","${clonmax}" \ 
    355          ${filein} ${fileout} 
     367      -O \ 
     368      --dimension time,"${timemin}","${timemax}" \ 
     369      ${filein} ${fileout} 
    356370      status_ncks=${?} 
    357371      if [ ${status_ncks} -ne 0 ] 
    358372      then 
    359          echo "eee : pb with ncks ${filein}" 1>> ${log} 
    360          exit 1 
     373          echo "eee : pb with ncks ${filein}" 1>> ${log} 
     374          exit 1 
    361375      else 
    362          list_split="${list_split} ${fileout}" 
     376          list_split="${list_split} ${fileout}" 
    363377      fi 
    364378      unset status_ncks 
    365    else 
    366       ncks \ 
    367          -O \ 
    368          --dimension time,"${timemin}","${timemax}" \ 
    369          ${filein} ${fileout} 
    370       status_ncks=${?} 
    371       if [ ${status_ncks} -ne 0 ] 
    372       then 
    373          echo "eee : pb with ncks ${filein}" 1>> ${log} 
    374          exit 1 
    375       else 
    376          list_split="${list_split} ${fileout}" 
    377       fi 
    378       unset status_ncks 
    379    fi 
    380    iyear=$(( ${iyear} + 1 )) 
     379    fi 
     380    iyear=$(( ${iyear} + 1 )) 
    381381done 
    382382unset iyear 
     
    386386if [ ${rebuild} -eq 1 ] 
    387387then 
    388    # if rebuild is asked, concatenation of all the splitted files 
    389    filetot=${PROJECT_OD}/$(basename ${filein} .nc)_rebuild.nc 
    390    rm -f  ${filetot} 2> /dev/null 
    391    ncrcat ${list_split} ${filetot} 
    392    status_ncrcat=${?} 
    393    if [ ${status_ncrcat} -ne 0 ] 
    394    then 
    395       echo "eee : pb with ncrcat" 1>> ${log} 
    396       exit 1 
    397    else 
    398       echo "iii : rebuild result in ${filetot}" 1>> ${log} 
    399    fi 
    400    unset status_ncrcat 
     388    # if rebuild is asked, concatenation of all the splitted files 
     389    filetot=${PROJECT_OD}/$(basename ${filein} .nc)_rebuild.nc 
     390    rm -f  ${filetot} 2> /dev/null 
     391    ncrcat ${list_split} ${filetot} 
     392    status_ncrcat=${?} 
     393    if [ ${status_ncrcat} -ne 0 ] 
     394    then 
     395        echo "eee : pb with ncrcat" 1>> ${log} 
     396        exit 1 
     397    else 
     398        echo "iii : rebuild result in ${filetot}" 1>> ${log} 
     399    fi 
     400    unset status_ncrcat 
    401401fi 
    402402# 
  • trunk/src/paper01_pre.sh

    r526 r630  
    134134system=$(uname) 
    135135case "${system}" in 
    136    AIX|IRIX64) 
    137       echo " www : no specific posix checking" 
    138    ;; 
    139    *) 
    140      set -o posix 
    141    ;; 
     136    AIX|IRIX64) 
     137        echo " www : no specific posix checking" 
     138    ;; 
     139    *) 
     140       set -o posix 
     141    ;; 
    142142esac 
    143143unset system 
     
    146146# 
    147147case $(hostname) in 
    148    zeus.locean-ipsl.upmc.fr|dedale.locean-ipsl.upmc.fr) 
    149       echo "eee : pb on UDUnits library on zeus" 
    150       echo "eee : contact system team" 
    151       exit 1 
     148    zeus.locean-ipsl.upmc.fr|dedale.locean-ipsl.upmc.fr) 
     149        echo "eee : pb on UDUnits library on zeus" 
     150        echo "eee : contact system team" 
     151        exit 1 
    152152   ;; 
    153153esac 
     
    172172if [ "${PROJECT_LOG}" = "" ] 
    173173then 
    174    echo " eee : \${PROJECT_LOG} not defined" 
    175    exit 1 
     174    echo " eee : \${PROJECT_LOG} not defined" 
     175    exit 1 
    176176fi 
    177177# 
     
    179179if [ ! -d ${PROJECT_LOG} ] 
    180180then 
    181    echo " eee : ${PROJECT_LOG} not found" 
    182    exit 1 
     181    echo " eee : ${PROJECT_LOG} not found" 
     182    exit 1 
    183183fi 
    184184# 
     
    186186if [ ! -x ${PROJECT_LOG} ] 
    187187then 
    188    echo " eee : ${PROJECT_LOG} not reachable" 
    189    exit 1 
     188    echo " eee : ${PROJECT_LOG} not reachable" 
     189    exit 1 
    190190fi 
    191191# 
     
    193193if [ ! -w ${PROJECT_LOG} ] 
    194194then 
    195    echo " eee : ${PROJECT_LOG} not writable" 
    196    exit 1 
     195    echo " eee : ${PROJECT_LOG} not writable" 
     196    exit 1 
    197197fi 
    198198# 
     
    214214if [ ${getamsu} -eq 1 ] 
    215215then 
    216    # AMSU 
    217    list_channel="a4 a5 b5 b3" 
    218    list_type="year climato" 
    219    list_year="2006" 
    220    refloc="/usr/home/lelod/AMSU/" 
    221    # ++ seulement valable en interne locean 
    222    for channel in ${list_channel} 
    223    do 
    224       for type in ${list_type} 
    225       do 
    226          case ${type} in 
    227             year) 
    228                refloc="/usr/home/lelod/AMSU/" 
    229                for iyear in ${list_year} 
    230                do 
    231                   cyear=$(printf "%4.4d" ${iyear}) 
    232                   fileref=${channel}.an${cyear}.nc 
    233                done 
    234             ;; 
    235             climato) 
    236                fileref=${channel}.climato.nc 
    237             ;; 
    238             *) 
    239                echo "eee : wrong file type" 1>> ${log} 
    240                exit 1 
    241             ;; 
    242          esac 
    243          # ++ test if exists 
    244          if [ ! -f ${refloc}/${fileref} ] 
    245          then 
    246             echo "eee : ${refloc}/${fileref} unavailable" 1>> ${log} 
    247             exit 1 
    248          fi 
    249          if  [ -f ${PROJECT_ID}/${fileref} ] 
    250          then 
    251             echo "iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 
    252             echo "iii : nothing done" 
    253          else 
    254             ln -s ${refloc}/${fileref} ${PROJECT_ID}/ 
    255          fi 
    256       done 
    257    done 
     216    # AMSU 
     217    list_channel="a4 a5 b5 b3" 
     218    list_type="year climato" 
     219    list_year="2006" 
     220    refloc="/usr/home/lelod/AMSU/" 
     221    # ++ seulement valable en interne locean 
     222    for channel in ${list_channel} 
     223    do 
     224        for type in ${list_type} 
     225        do 
     226            case ${type} in 
     227                year) 
     228                    refloc="/usr/home/lelod/AMSU/" 
     229                    for iyear in ${list_year} 
     230                    do 
     231                        cyear=$(printf "%4.4d" ${iyear}) 
     232                        fileref=${channel}.an${cyear}.nc 
     233                    done 
     234                ;; 
     235                climato) 
     236                    fileref=${channel}.climato.nc 
     237                ;; 
     238                *) 
     239                    echo "eee : wrong file type" 1>> ${log} 
     240                    exit 1 
     241                ;; 
     242            esac 
     243            # ++ test if exists 
     244            if [ ! -f ${refloc}/${fileref} ] 
     245            then 
     246                echo "eee : ${refloc}/${fileref} unavailable" 1>> ${log} 
     247                exit 1 
     248            fi 
     249            if  [ -f ${PROJECT_ID}/${fileref} ] 
     250            then 
     251                echo "iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 
     252                echo "iii : nothing done" 
     253            else 
     254                ln -s ${refloc}/${fileref} ${PROJECT_ID}/ 
     255            fi 
     256        done 
     257    done 
    258258fi 
    259259 
     
    261261if [ ${getolr} -eq 1 ] 
    262262then 
    263    fileref=olr.day.mean.nc 
    264    locref=ftp://ftp.climserv.ipsl.polytechnique.fr/noaa-olr/ 
    265    if  [ -f ${PROJECT_ID}/${fileref} ] 
    266    then 
    267       echo "iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 
    268       echo "iii : nothing done" 1>> ${log} 
    269    else 
    270       wget -P ${PROJECT_ID} ${locref}/${fileref} 1>> ${log} 2>&1 
    271       wget_status=${?} 
    272       if [ ${wget_status} -ne 0 ] 
    273       then 
    274          echo "eee : ${locref}/${file} not found" >> ${log} 2>&1 
    275          # exit 1 #++ 
    276       else 
    277          echo "iii : ${locref}/${file} found" >> ${log} 2>&1 
    278       fi 
    279    fi 
     263    fileref=olr.day.mean.nc 
     264    locref=ftp://ftp.climserv.ipsl.polytechnique.fr/noaa-olr/ 
     265    if  [ -f ${PROJECT_ID}/${fileref} ] 
     266    then 
     267        echo "iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 
     268        echo "iii : nothing done" 1>> ${log} 
     269    else 
     270       wget -P ${PROJECT_ID} ${locref}/${fileref} 1>> ${log} 2>&1 
     271       wget_status=${?} 
     272       if [ ${wget_status} -ne 0 ] 
     273       then 
     274           echo "eee : ${locref}/${file} not found" >> ${log} 2>&1 
     275           # exit 1 #++ 
     276       else 
     277           echo "iii : ${locref}/${file} found" >> ${log} 2>&1 
     278       fi 
     279    fi 
    280280fi 
    281281# 
     
    290290while [ ${iyear} -le ${iyearmax} ] 
    291291do 
    292    cyear=$(printf "%4.4d" ${iyear}) 
    293    list_file="${list_file} ${PROJECT_ID}/olr.day.mean_${cyear}_ng.nc" 
    294    iyear=$(( ${iyear} + 1 )) 
    295    nfile=$(( ${nfile} + 1 )) 
     292    cyear=$(printf "%4.4d" ${iyear}) 
     293    list_file="${list_file} ${PROJECT_ID}/olr.day.mean_${cyear}_ng.nc" 
     294    iyear=$(( ${iyear} + 1 )) 
     295    nfile=$(( ${nfile} + 1 )) 
    296296done 
    297297# 
     
    299299for file in ${list_file} 
    300300do 
    301    if [ ! -f ${file} ] 
    302    then 
    303       echo " iii : ${file} not found" 1>> ${log} 
    304    else 
    305       nfound=$(( ${nfound} + 1 )) 
    306    fi 
     301    if [ ! -f ${file} ] 
     302    then 
     303        echo " iii : ${file} not found" 1>> ${log} 
     304    else 
     305        nfound=$(( ${nfound} + 1 )) 
     306    fi 
    307307done 
    308308if [ ${nfound} -ne ${nfile} ] 
    309309then 
    310    echo " iii : production of ${list_file}" 1>> ${log} 
    311    olr_split.sh -f 
    312    # ++ ok ? 
     310    echo " iii : production of ${list_file}" 1>> ${log} 
     311    olr_split.sh -f 
     312    # ++ ok ? 
    313313fi 
    314314# 
     
    318318if [ ${getecmwf_opera} -eq 1 ] 
    319319then 
    320    dirref="/bdd/OPERA/NETCDF/GLOBAL_1125/4xdaily/AN_PL/" # ++ climserv local 
    321    locref=ftp://ftp.climserv.ipsl.polytechnique.fr/opera/GLOBAL_1125/4xdaily/AN_PL/ 
    322    list_url="" 
    323    list_param="geopt" 
    324    for param in ${list_param} 
    325    do 
     320    dirref="/bdd/OPERA/NETCDF/GLOBAL_1125/4xdaily/AN_PL/" # ++ climserv local 
     321    locref=ftp://ftp.climserv.ipsl.polytechnique.fr/opera/GLOBAL_1125/4xdaily/AN_PL/ 
     322    list_url="" 
     323    list_param="geopt" 
     324    for param in ${list_param} 
     325    do 
    326326      iyearmin=2002 
    327327      iyearmax=2008 
     
    364364         echo "iii : ${file} exists" >> ${log} 
    365365      fi 
    366    done 
     366    done 
    367367fi 
    368368if [ ${getecmwf_era40} -eq 1 ] 
    369369then 
    370    list_url="" 
    371    locref=ftp://ftp.climserv.ipsl.polytechnique.fr/era40/4xdaily/AN_PL/ 
    372    list_param="z" 
    373    for param in ${list_param} 
    374    do 
    375       iyearmin=2000 
    376       iyearmax=2002 
    377       iyear=${iyearmin} 
    378       while [ ${iyear} -le ${iyearmax} ] 
    379       do 
    380          cyear=$(printf "%4.4d" ${iyear}) 
    381          if [ ${iyear} -le 2001 ] 
    382          then 
    383             imonthmin=1 
    384             imonthmax=12 
    385          else 
    386             imonthmin=1 
    387             imonthmax=08 
    388          fi 
    389          imonth=${imonthmin} 
    390          while [ ${imonth} -le ${imonthmax} ] 
    391          do 
    392             cmonth=$(printf "%2.2d" ${imonth}) 
    393             list_url="${list_url} ${locref}/${cyear}/${param}.${cyear}${cmonth}.aph.nc" 
    394             imonth=$(( ${imonth} + 1 )) 
    395          done 
    396          iyear=$(( ${iyear} + 1 )) 
    397       done 
    398    done 
    399    for url in ${list_url} 
    400    do 
    401       file=${PROJECT_ID}/$(basename ${url}) 
    402       if [ ! -f ${file} ] 
    403       then 
    404          wget --no-verbose -P ${PROJECT_ID} ${url} >> ${log} 2>&1 
    405          wget_status=${?} 
    406          if [ ${wget_status} -ne 0 ] 
    407          then 
    408             echo "eee : ${url} not found" >> ${log} 2>&1 
    409             # exit 1 #++ 
    410          else 
    411             echo "iii : ${url} found" >> ${log} 2>&1 
    412          fi 
    413       else 
    414         echo "iii : ${file} exists" >> ${log} 
    415       fi 
    416    done 
     370    list_url="" 
     371    locref=ftp://ftp.climserv.ipsl.polytechnique.fr/era40/4xdaily/AN_PL/ 
     372    list_param="z" 
     373    for param in ${list_param} 
     374    do 
     375       iyearmin=2000 
     376       iyearmax=2002 
     377       iyear=${iyearmin} 
     378       while [ ${iyear} -le ${iyearmax} ] 
     379       do 
     380           cyear=$(printf "%4.4d" ${iyear}) 
     381           if [ ${iyear} -le 2001 ] 
     382            then 
     383                imonthmin=1 
     384                imonthmax=12 
     385            else 
     386                imonthmin=1 
     387                imonthmax=08 
     388            fi 
     389            imonth=${imonthmin} 
     390            while [ ${imonth} -le ${imonthmax} ] 
     391            do 
     392                cmonth=$(printf "%2.2d" ${imonth}) 
     393                list_url="${list_url} ${locref}/${cyear}/${param}.${cyear}${cmonth}.aph.nc" 
     394                imonth=$(( ${imonth} + 1 )) 
     395            done 
     396            iyear=$(( ${iyear} + 1 )) 
     397        done 
     398    done 
     399    for url in ${list_url} 
     400    do 
     401       file=${PROJECT_ID}/$(basename ${url}) 
     402       if [ ! -f ${file} ] 
     403       then 
     404           wget --no-verbose -P ${PROJECT_ID} ${url} >> ${log} 2>&1 
     405           wget_status=${?} 
     406           if [ ${wget_status} -ne 0 ] 
     407           then 
     408               echo "eee : ${url} not found" >> ${log} 2>&1 
     409               # exit 1 #++ 
     410           else 
     411               echo "iii : ${url} found" >> ${log} 2>&1 
     412           fi 
     413       else 
     414           echo "iii : ${file} exists" >> ${log} 
     415       fi 
     416    done 
    417417fi 
    418418# 
  • trunk/src/plogd.sh

    r215 r630  
    5858system=$(uname) 
    5959case "${system}" in 
    60    AIX|IRIX64) 
     60    AIX|IRIX64) 
    6161      echo " www : no specific posix checking" 
    6262   ;; 
     
    7373if [ "${1}" = "" ] 
    7474then 
    75    echo "${command} : eee : 1st parameter missing" >&2 
    76    exit 1 
     75    echo "${command} : eee : 1st parameter missing" >&2 
     76    exit 1 
    7777fi 
    7878# test if a2ps available 
     
    8282if [ ${status} -ne 0 ] 
    8383then 
    84    echo "${command} : eee : ${tool} unavailable" >&2 
    85    exit 4 
     84    echo "${command} : eee : ${tool} unavailable" >&2 
     85    exit 4 
    8686fi 
    8787unset tool 
     
    9393if [ ${tmp} -eq 0 ] 
    9494then 
    95    if [ "${log}" = "" ] 
    96    then 
     95    if [ "${log}" = "" ] 
     96    then 
    9797      echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 
    9898      exit 1 
    99    else 
     99    else 
    100100      # printing 
    101101      a2ps --print-anyway=1 ${log} 
    102102      exit 0 
    103    fi 
     103    fi 
    104104else 
    105    exit 1 
     105    exit 1 
    106106fi 
  • trunk/src/presentation_lpao.sh

    r463 r630  
    9696system=$(uname) 
    9797case "${system}" in 
    98 AIX|IRIX64) 
    99   echo " www : no specific posix checking" 
    100 ;; 
    101 Darwin) 
    102   octavecmd=/Applications/Octave.app/Contents/Resources/bin/octave 
    103   set -o posix 
    104 ;; 
    105 *) 
    106   set -o posix 
    107 ;; 
     98    AIX|IRIX64) 
     99       echo " www : no specific posix checking" 
     100    ;; 
     101    Darwin) 
     102       octavecmd=/Applications/Octave.app/Contents/Resources/bin/octave 
     103       set -o posix 
     104    ;; 
     105    *) 
     106       set -o posix 
     107    ;; 
    108108esac 
    109109# 
     
    120120# 
    121121case "${system}" in 
    122 Darwin) 
    123  timecmd=/usr/bin/time 
    124 ;; 
    125 *) 
    126  timecmd=time 
    127 ;; 
     122    Darwin) 
     123        timecmd=/usr/bin/time 
     124    ;; 
     125    *) 
     126        timecmd=time 
     127    ;; 
    128128esac 
    129129# 
     
    134134if [ ${#} -lt ${minargcount} ] 
    135135then 
    136   echo "eee : not enought arguments" 
    137   echo "${usage}" 
    138   exit 1 
     136    echo "eee : not enought arguments" 
     137    echo "${usage}" 
     138    exit 1 
    139139fi 
    140140# 
    141141while [ ${#} -gt 0 ] 
    142142do 
    143  case ${1} in 
    144  -a) 
    145   application=${2} 
    146   shift 
    147  ;; 
    148  *) # anything else 
    149   echo "eee : ${usage}" 
    150   exit 1 
    151  ;; 
    152  esac 
    153  shift # next flag 
     143    case ${1} in 
     144        -a) 
     145            application=${2} 
     146            shift 
     147        ;; 
     148        *) # anything else 
     149           echo "eee : ${usage}" 
     150           exit 1 
     151        ;; 
     152    esac 
     153    shift # next flag 
    154154done 
    155155# 
    156156case ${application} in 
    157 octave) 
    158  application=${octavecmd} 
    159 ;; 
     157    octave) 
     158        application=${octavecmd} 
     159    ;; 
    160160esac 
    161161log=${PROJECT_LOG}/$(basename ${0} .sh).log.${log_date} 
     
    175175if [ ${status} -ne 0 ] 
    176176then 
    177  echo " eee : ${tool} not found" 
    178  exit 1 
     177    echo " eee : ${tool} not found" 
     178    exit 1 
    179179fi 
    180180unset status 
     
    192192# 
    193193case ${application} in 
    194 matlab) 
    195  ${timecmd} matlab -nojvm -nosplash < ${script} 1>> ${log} 2>&1 
    196  status=${?} 
    197 ;; 
    198 ${octavecmd}) 
    199  ${timecmd} ${octavecmd} --silent ${script} 1>> ${log} 2>&1 
    200  status=${?} 
    201 ;; 
     194    matlab) 
     195        ${timecmd} matlab -nojvm -nosplash < ${script} 1>> ${log} 2>&1 
     196        status=${?} 
     197    ;; 
     198    ${octavecmd}) 
     199        ${timecmd} ${octavecmd} --silent ${script} 1>> ${log} 2>&1 
     200        status=${?} 
     201    ;; 
    202202esac 
    203203# 
    204204if [ ${status} -ne 0 ] 
    205205then 
    206    echo "eee : ${application} script failed" 1>> ${log} 2>&1 
    207    exit 1 
     206    echo "eee : ${application} script failed" 1>> ${log} 2>&1 
     207    exit 1 
    208208fi 
    209209# remove temporary latex files 
    210210rm ${PROJECT_OD}/presentation_lpao.log \ 
    211    ${PROJECT_OD}/presentation_lpao.out \ 
    212    ${PROJECT_OD}/presentation_lpao.aux \ 
    213    2> /dev/null 
     211    ${PROJECT_OD}/presentation_lpao.out \ 
     212    ${PROJECT_OD}/presentation_lpao.aux \ 
     213    2> /dev/null 
    214214# 
    215215pdflatex \ 
     
    221221# remove temporary latex files 
    222222rm ${PROJECT_OD}/presentation_lpao.log \ 
    223    ${PROJECT_OD}/presentation_lpao.out \ 
    224    ${PROJECT_OD}/presentation_lpao.aux \ 
    225    2> /dev/null 
     223    ${PROJECT_OD}/presentation_lpao.out \ 
     224    ${PROJECT_OD}/presentation_lpao.aux \ 
     225    2> /dev/null 
    226226# 
    227227unset log_date 
  • trunk/src/run_cresamsu.sh

    r543 r630  
    9191system=$(uname) 
    9292case "${system}" in 
    93    AIX|IRIX64) 
    94      echo "${command} : www : no specific posix checking" 
    95      date_cmd=date 
    96    ;; 
    97    Darwin) 
    98      set -o posix 
    99      date_cmd=gdate 
    100    ;; 
    101    Linux) 
    102      set -o posix 
    103      date_cmd=date 
    104    ;; 
    105    *) 
    106     set -o posix 
     93    AIX|IRIX64) 
     94        echo "${command} : www : no specific posix checking" 
     95        date_cmd=date 
     96    ;; 
     97    Darwin) 
     98       set -o posix 
     99       date_cmd=gdate 
     100    ;; 
     101    Linux) 
     102       set -o posix 
     103       date_cmd=date 
     104    ;; 
     105    *) 
     106       set -o posix 
    107107   ;; 
    108108esac 
     
    122122while [ ${#} -gt 0 ] 
    123123do 
    124    case ${1} in 
    125      -b) 
    126         # first date to get 
    127         yyyymmddb=${2} 
    128         shift 
    129      ;; 
    130      -e) 
    131         # last date to get 
    132         yyyymmdde=${2} 
    133         shift 
    134      ;; 
    135      -lonmin) 
    136         lonmin=${2} 
    137         shift 
    138      ;; 
    139      -lonmax) 
    140         lonmax=${2} 
    141         shift 
    142      ;;  
    143      -latmin) 
    144         latmin=${2} 
    145         shift 
    146      ;; 
    147      -latmax) 
    148         latmax=${2} 
    149         shift 
    150      ;; 
    151      -numch) 
    152         numch=${2} 
    153         shift 
    154      ;; 
    155      -temp) 
    156         temp=${2} 
    157         shift 
    158      ;; 
    159      -rtemp) 
    160         rtemp=${2} 
    161         shift 
    162      ;; 
    163      -rhdeg) 
    164         rhdeg=${2} 
    165         shift 
    166      ;; 
    167      -f) 
    168         force=1 
    169      ;; 
    170      -h) 
    171         echo "${usage}" 
    172         exit 0 
    173      ;; 
    174      *) 
    175         # other choice 
    176         echo "${command} : eee : unknown option ${1}" 
    177         echo "${usage}" 
    178         exit 1 
    179      ;; 
    180    esac 
    181    # next flag 
    182    shift 
     124    case ${1} in 
     125        -b) 
     126            # first date to get 
     127            yyyymmddb=${2} 
     128            shift 
     129        ;; 
     130        -e) 
     131            # last date to get 
     132            yyyymmdde=${2} 
     133            shift 
     134        ;; 
     135        -lonmin) 
     136            lonmin=${2} 
     137            shift 
     138        ;; 
     139        -lonmax) 
     140            lonmax=${2} 
     141            shift 
     142        ;;  
     143        -latmin) 
     144            latmin=${2} 
     145            shift 
     146        ;; 
     147        -latmax) 
     148            latmax=${2} 
     149            shift 
     150        ;; 
     151        -numch) 
     152           numch=${2} 
     153           shift 
     154        ;; 
     155        -temp) 
     156           temp=${2} 
     157           shift 
     158        ;; 
     159        -rtemp) 
     160           rtemp=${2} 
     161           shift 
     162        ;; 
     163        -rhdeg) 
     164           rhdeg=${2} 
     165           shift 
     166        ;; 
     167        -f) 
     168           force=1 
     169       ;; 
     170        -h) 
     171           echo "${usage}" 
     172           exit 0 
     173        ;; 
     174        *) 
     175          # other choice 
     176           echo "${command} : eee : unknown option ${1}" 
     177           echo "${usage}" 
     178           exit 1 
     179        ;; 
     180    esac 
     181    # next flag 
     182    shift 
    183183done 
    184184unset usage 
  • trunk/src/run_traite_amsuab.sh

    r573 r630  
    107107system=$(uname) 
    108108case "${system}" in 
    109    AIX|IRIX64) 
     109    AIX|IRIX64) 
    110110     echo "${command} : www : no specific posix checking" 
    111111     date_cmd=date 
    112112   ;; 
    113    Darwin) 
     113    Darwin) 
    114114     set -o posix 
    115115     date_cmd=gdate 
    116116   ;; 
    117    Linux) 
     117    Linux) 
    118118     set -o posix 
    119119     date_cmd=date 
     
    138138while [ ${#} -gt 0 ] 
    139139do 
    140    case ${1} in 
     140    case ${1} in 
    141141     -b) 
    142142        # first date to get 
     
    182182        exit 1 
    183183     ;; 
    184    esac 
    185    # next flag 
    186    shift 
     184    esac 
     185    # next flag 
     186    shift 
    187187done 
    188188unset usage 
  • trunk/src/script_cat_climeraint2d.sh

    r267 r630  
    6565# Concatenation de tous les pas de temps 
    6666while [ annee -le $an_fin ] 
    67    do 
    68  
    69 while [ imois -le $mois_fin ] 
    70    do 
    71  
    72      if [ imois -le 9 ]; then 
    73       mois=0$imois 
     67do 
     68    while [ imois -le $mois_fin ] 
     69    do 
     70     if [ imois -le 9 ] 
     71     then 
     72         mois=0$imois 
    7473     else 
    75       mois=$imois 
     74         mois=$imois 
    7675     fi 
    7776 
  • trunk/src/script_cat_climeraint3d.sh

    r263 r630  
    7171# Concatenation de tous les pas de temps 
    7272while [ ${annee} -le $an_fin ] 
    73    do 
    74 while [ ${imois} -le $mois_fin ] 
    75    do 
    76      if [ ${imois} -le 9 ]; then 
    77       mois=0$imois 
    78      else 
    79       mois=$imois 
    80      fi 
     73do 
     74    while [ ${imois} -le $mois_fin ] 
     75    do 
     76        if [ ${imois} -le 9 ] 
     77        then 
     78           mois=0$imois 
     79        else 
     80           mois=$imois 
     81        fi 
    8182 
    82 ls $data/$annee/$groupe.$annee$mois.*.nc > input 
    83 # ls $chemin/$groupe.$annee$mois.*.nc > input 
    84 filein=`head -1 input` 
    85 echo 'filein='$filein 
     83        ls $data/$annee/$groupe.$annee$mois.*.nc > input 
     84        # ls $chemin/$groupe.$annee$mois.*.nc > input 
     85        filein=`head -1 input` 
     86        echo 'filein='$filein 
     87        fileout=$chemin/M$groupe.$annee.$mois.6TU.nc  
     88        echo 'fileout='$fileout 
    8689 
    87  
    88 fileout=$chemin/M$groupe.$annee.$mois.6TU.nc  
    89  
    90 echo 'fileout='$fileout 
    91  
    92 # Unpack : geo_value = var*scale_factor + add_offset  
    93 jpt=$( ncdump -h ${filein} | grep UNLIMITED ) 
    94 jpt=${jpt##*\(} 
    95 jpt=${jpt%% currently*} 
    96 ncks -d lat,-40.,50. -d level,100.,1000. -d time,1,$(( $jpt - 3 )),4 $filein ${fileout}_1 
    97 #ncks -d lat,-40.,50. -d time,1,$(( $jpt - 3 )),4 $filein ${fileout}_1 
    98 ncpdq -U ${fileout}_1 ${fileout} 
    99 rm ${fileout}_1 
    100 # read a 
    101  
    102 let imois=imois+1 
    103 done  
    104 # \rm $chemin/$groupe* 
    105 #concatenation des fichiers extraits mois par mois 
    106 ncrcat $chemin/M$groupe.$annee.*  $chemin/cat$groupe.$annee.6TU.nc 
    107 let imois=1 
    108 let annee=annee+1 
    109  
     90        # Unpack : geo_value = var*scale_factor + add_offset  
     91        jpt=$( ncdump -h ${filein} | grep UNLIMITED ) 
     92        jpt=${jpt##*\(} 
     93        jpt=${jpt%% currently*} 
     94        ncks -d lat,-40.,50. -d level,100.,1000. -d time,1,$(( $jpt - 3 )),4 $filein ${fileout}_1 
     95        #ncks -d lat,-40.,50. -d time,1,$(( $jpt - 3 )),4 $filein ${fileout}_1 
     96        ncpdq -U ${fileout}_1 ${fileout} 
     97        rm ${fileout}_1 
     98        # read a 
     99         
     100        let imois=imois+1 
     101    done  
     102    # \rm $chemin/$groupe* 
     103    #concatenation des fichiers extraits mois par mois 
     104    ncrcat $chemin/M$groupe.$annee.*  $chemin/cat$groupe.$annee.6TU.nc 
     105    let imois=1 
     106    let annee=annee+1 
     107     
    110108done 
    111109 
  • trunk/src/tlogd.sh

    r215 r630  
    5757system=$(uname) 
    5858case "${system}" in 
    59    AIX|IRIX64) 
    60       echo " www : no specific posix checking" 
    61    ;; 
    62    *) 
    63       set -o posix 
    64    ;; 
     59    AIX|IRIX64) 
     60        echo " www : no specific posix checking" 
     61    ;; 
     62    *) 
     63        set -o posix 
     64    ;; 
    6565esac 
    6666unset system 
     
    7272if [ "${1}" = "" ] 
    7373then 
    74    echo "${command} : eee : 1st parameter missing" >&2 
    75    exit 1 
     74    echo "${command} : eee : 1st parameter missing" >&2 
     75    exit 1 
    7676fi 
    7777# check for ${PROJECT_LOG} definition 
    7878if [ "${PROJECT_LOG}" = "" ] 
    7979then 
    80    echo " eee : \${PROJECT_LOG} not defined" 
    81    exit 1 
     80    echo " eee : \${PROJECT_LOG} not defined" 
     81    exit 1 
    8282fi 
    8383# 
     
    8585if [ ! -d ${PROJECT_LOG} ] 
    8686then 
    87    echo " eee : ${PROJECT_LOG} not found" 
    88    exit 1 
     87    echo " eee : ${PROJECT_LOG} not found" 
     88    exit 1 
    8989fi 
    9090# 
     
    9292if [ ! -x ${PROJECT_LOG} ] 
    9393then 
    94    echo " eee : ${PROJECT_LOG} not reachable" 
    95    exit 1 
     94    echo " eee : ${PROJECT_LOG} not reachable" 
     95    exit 1 
    9696fi 
    9797# 
     
    101101if [ ${tmp} -eq 0 ] 
    102102then 
    103    if [ "${log}" = "" ] 
    104    then 
     103    if [ "${log}" = "" ] 
     104    then 
    105105      echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 
    106106      exit 1 
    107    else 
     107    else 
    108108      more ${log} 
    109109      exit 0 
    110    fi 
     110    fi 
    111111else 
    112    exit 1 
     112    exit 1 
    113113fi 
  • trunk/src/traite_amsuab.sh

    r601 r630  
    283283system=$(uname) 
    284284case "${system}" in 
    285    AIX|IRIX64) 
    286      echo "${command} : www : no specific posix checking" 
    287      date_cmd=date 
    288    ;; 
    289    Darwin) 
    290      set -o posix 
    291      date_cmd=gdate 
    292    ;; 
    293    Linux) 
    294      set -o posix 
    295      date_cmd=date 
    296    ;; 
    297    *) 
    298     set -o posix 
    299    ;; 
     285    AIX|IRIX64) 
     286       echo "${command} : www : no specific posix checking" 
     287       date_cmd=date 
     288    ;; 
     289    Darwin) 
     290       set -o posix 
     291       date_cmd=gdate 
     292    ;; 
     293    Linux) 
     294       set -o posix 
     295       date_cmd=date 
     296    ;; 
     297    *) 
     298       set -o posix 
     299    ;; 
    300300esac 
    301301unset system 
     
    330330if [ ${#} -lt ${minargcount} ] 
    331331then 
    332    echo "${command} : eee : not enought arguments" 
    333    echo "${usage}" 
    334    exit 1 
     332    echo "${command} : eee : not enought arguments" 
     333    echo "${usage}" 
     334    exit 1 
    335335fi 
    336336unset minargcount 
     
    338338while [ ${#} -gt 0 ] 
    339339do 
    340    case ${1} in 
    341      -b) 
    342         # first date to get 
    343         yyyymmddb=${2} 
    344         shift 
    345      ;; 
    346      -e) 
    347         # last date to get 
    348         yyyymmdde=${2} 
    349         shift 
    350      ;; 
    351      -lonmin) 
    352         lonmin=${2} 
    353         shift 
    354      ;; 
    355      -lonmax) 
    356         lonmax=${2} 
    357         shift 
    358      ;; 
    359      -latmin) 
    360         latmin=${2} 
    361         shift 
    362      ;; 
    363      -latmax) 
    364         latmax=${2} 
    365         shift 
    366      ;; 
    367      -numch) 
    368         numch=${2} 
    369         shift 
    370      ;; 
    371      -f) 
    372         force=1 
    373      ;; 
    374      -h) 
    375         echo "${usage}" 
    376         exit 0 
    377      ;; 
    378      *) 
    379         # other choice 
    380         echo "${command} : eee : unknown option ${1}" 
    381         echo "${usage}" 
    382         exit 1 
    383      ;; 
    384    esac 
    385    # next flag 
    386    shift 
     340    case ${1} in 
     341        -b) 
     342           # first date to get 
     343           yyyymmddb=${2} 
     344           shift 
     345        ;; 
     346        -e) 
     347           # last date to get 
     348           yyyymmdde=${2} 
     349           shift 
     350        ;; 
     351        -lonmin) 
     352            lonmin=${2} 
     353            shift 
     354         ;; 
     355        -lonmax) 
     356            lonmax=${2} 
     357            shift 
     358        ;; 
     359        -latmin) 
     360            latmin=${2} 
     361            shift 
     362        ;; 
     363        -latmax) 
     364            latmax=${2} 
     365            shift 
     366        ;; 
     367        -numch) 
     368            numch=${2} 
     369            shift 
     370        ;; 
     371        -f) 
     372            force=1 
     373        ;; 
     374        -h) 
     375            echo "${usage}" 
     376            exit 0 
     377        ;; 
     378        *) 
     379            # other choice 
     380            echo "${command} : eee : unknown option ${1}" 
     381            echo "${usage}" 
     382            exit 1 
     383        ;; 
     384    esac 
     385    # next flag 
     386    shift 
    387387done 
    388388unset usage 
     
    446446if [ ${status} -ne 0 ] 
    447447then 
    448    echo "${command} : eee : tool ${IDL_CMD} not found" 
    449    echo "${command} : eee : check varamma_profile.sh sequence" 
    450    exit 1 
     448    echo "${command} : eee : tool ${IDL_CMD} not found" 
     449    echo "${command} : eee : check varamma_profile.sh sequence" 
     450    exit 1 
    451451fi 
    452452unset status 
     
    459459if [ ${status} -ne 0 ] 
    460460then 
    461    echo "${command} : eee : tool ${tool} not found" 
    462    exit 1 
     461    echo "${command} : eee : tool ${tool} not found" 
     462    exit 1 
    463463fi 
    464464unset status 
     
    468468if [ ! -w ${PROJECT_LOG} ] 
    469469then 
    470    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    471    exit 1 
     470    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     471    exit 1 
    472472fi 
    473473# 
     
    496496if [ ${status} -ne 0 ] 
    497497then 
    498    echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log} 
    499    exit 1 
     498    echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log} 
     499    exit 1 
    500500fi 
    501501geomax=$(geolocation_to_string_sh.sh -lon ${lonmax} -lat ${latmax}) 
     
    503503if [ ${status} -ne 0 ] 
    504504then 
    505    echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log} 
    506    exit 1 
     505    echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log} 
     506    exit 1 
    507507fi 
    508508# 
     
    523523result = file_bathy_to_mem(${lonmin}, ${lonmax}, ${latmin}, ${latmax}) 
    524524IF (result EQ -1) THEN BEGIN 
    525    print, 'eee : pb file_bathy_to_mem' 
    526    return, result 
     525    print, 'eee : pb file_bathy_to_mem' 
     526    return, result 
    527527ENDIF 
    528528; 
     
    543543; 
    544544FOR j=juld,jule DO BEGIN 
    545    caldat,j, mm,dd,yyyy 
    546    print, 'iii : traitement du jour ',yyyy,mm,dd 
    547    result = search_amsufiles('${numch}', yyyy,mm, dd) 
    548    result_type=size(result,/type) 
    549    IF (result_type EQ 3) THEN BEGIN 
     545    caldat,j, mm,dd,yyyy 
     546    print, 'iii : traitement du jour ',yyyy,mm,dd 
     547    result = search_amsufiles('${numch}', yyyy,mm, dd) 
     548    result_type=size(result,/type) 
     549    IF (result_type EQ 3) THEN BEGIN 
    550550      IF (result EQ -1) THEN BEGIN 
    551551         print, 'eee : pb search_amsufiles' 
    552552         return, result 
    553553      ENDIF 
    554    ENDIF ELSE BEGIN 
     554    ENDIF ELSE BEGIN 
    555555      files_list = result 
    556    ENDELSE 
    557    extract_amsu, '${numch}', files_list, yyyy, mm, dd, resol, ${lonmin}, ${lonmax}, ${latmin}, ${latmax} 
     556    ENDELSE 
     557    extract_amsu, '${numch}', files_list, yyyy, mm, dd, resol, ${lonmin}, ${lonmax}, ${latmin}, ${latmax} 
    558558EOF 
    559559if [ ${netcdf_build} -eq 1 ] 
    560560    then 
    561561    cat >> ${PROJECT}/src/traite_amsu_temp.pro << EOF 
    562    resol_grid=0.1 
    563    amsu2ncdf, '${numch}', yyyy,mm,dd, ${lonmin}, ${lonmax}, ${latmin}, ${latmax}, resol_grid 
     562    resol_grid=0.1 
     563    amsu2ncdf, '${numch}', yyyy,mm,dd, ${lonmin}, ${lonmax}, ${latmin}, ${latmax}, resol_grid 
    564564EOF 
    565565fi 
  • trunk/src/traite_amsuab_old.sh

    r602 r630  
    283283system=$(uname) 
    284284case "${system}" in 
    285    AIX|IRIX64) 
     285    AIX|IRIX64) 
    286286     echo "${command} : www : no specific posix checking" 
    287287     date_cmd=date 
    288288   ;; 
    289    Darwin) 
     289    Darwin) 
    290290     set -o posix 
    291291     date_cmd=gdate 
    292292   ;; 
    293    Linux) 
     293    Linux) 
    294294     set -o posix 
    295295     date_cmd=date 
     
    330330if [ ${#} -lt ${minargcount} ] 
    331331then 
    332    echo "${command} : eee : not enought arguments" 
    333    echo "${usage}" 
    334    exit 1 
     332    echo "${command} : eee : not enought arguments" 
     333    echo "${usage}" 
     334    exit 1 
    335335fi 
    336336unset minargcount 
     
    338338while [ ${#} -gt 0 ] 
    339339do 
    340    case ${1} in 
     340    case ${1} in 
    341341     -b) 
    342342        # first date to get 
     
    382382        exit 1 
    383383     ;; 
    384    esac 
     384    esac 
    385385   # next flag 
    386    shift 
     386    shift 
    387387done 
    388388unset usage 
     
    446446if [ ${status} -ne 0 ] 
    447447then 
    448    echo "${command} : eee : tool ${IDL_CMD} not found" 
    449    echo "${command} : eee : check varamma_profile.sh sequence" 
    450    exit 1 
     448    echo "${command} : eee : tool ${IDL_CMD} not found" 
     449    echo "${command} : eee : check varamma_profile.sh sequence" 
     450    exit 1 
    451451fi 
    452452unset status 
     
    459459if [ ${status} -ne 0 ] 
    460460then 
    461    echo "${command} : eee : tool ${tool} not found" 
    462    exit 1 
     461    echo "${command} : eee : tool ${tool} not found" 
     462    exit 1 
    463463fi 
    464464unset status 
     
    468468if [ ! -w ${PROJECT_LOG} ] 
    469469then 
    470    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    471    exit 1 
     470    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     471    exit 1 
    472472fi 
    473473# 
     
    496496if [ ${status} -ne 0 ] 
    497497then 
    498    echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log} 
    499    exit 1 
     498    echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log} 
     499    exit 1 
    500500fi 
    501501geomax=$(geolocation_to_string_sh.sh -lon ${lonmax} -lat ${latmax}) 
     
    503503if [ ${status} -ne 0 ] 
    504504then 
    505    echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log} 
    506    exit 1 
     505    echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log} 
     506    exit 1 
    507507fi 
    508508# 
     
    542542result_type=size(result,/type) 
    543543IF (result_type EQ 3) THEN BEGIN 
    544    IF (result EQ -1) THEN BEGIN 
     544    IF (result EQ -1) THEN BEGIN 
    545545       print, 'eee : pb search_amsufiles' 
    546546       return, result 
    547    ENDIF 
     547    ENDIF 
    548548ENDIF ELSE BEGIN 
    549    files_list = result 
     549    files_list = result 
    550550ENDELSE 
    551551; 
    552552result = file_bathy_to_mem(${lonmin}, ${lonmax}, ${latmin}, ${latmax}) 
    553553IF (result EQ -1) THEN BEGIN 
    554    print, 'eee : pb file_bathy_to_mem' 
    555    return, result 
     554    print, 'eee : pb file_bathy_to_mem' 
     555    return, result 
    556556ENDIF 
    557557; 
     
    573573; 
    574574CASE size(files_list,/DIMENSION) OF 
    575    0L : BEGIN 
     575    0L : BEGIN 
    576576            print, 'www : no file found' 
    577577        END 
    578    ELSE: BEGIN 
     578    ELSE: BEGIN 
    579579            print, 'iii : nb de fichiers', size(files_list,/DIMENSION) 
    580580            resol=1 
  • trunk/src/traite_msg-prod.sh

    r565 r630  
    170170system=$(uname) 
    171171case "${system}" in 
    172    AIX|IRIX64) 
    173      echo "www : no specific posix checking" 
    174      date_cmd=date 
    175    ;; 
    176    Darwin) 
    177      set -o posix 
    178      date_cmd=gdate 
    179    ;; 
    180    Linux) 
    181      set -o posix 
    182      date_cmd=date 
    183    ;; 
    184    *) 
    185     set -o posix 
     172    AIX|IRIX64) 
     173        echo "www : no specific posix checking" 
     174        date_cmd=date 
     175    ;; 
     176    Darwin) 
     177        set -o posix 
     178        date_cmd=gdate 
     179    ;; 
     180    Linux) 
     181        set -o posix 
     182        date_cmd=date 
     183    ;; 
     184    *) 
     185        set -o posix 
    186186   ;; 
    187187esac 
     
    216216if [ ${#} -lt ${minargcount} ] 
    217217then 
    218    echo "eee : not enought arguments" 
    219    echo "${usage}" 
    220    exit 1 
     218    echo "eee : not enought arguments" 
     219    echo "${usage}" 
     220    exit 1 
    221221fi 
    222222unset minargcount 
     
    224224while [ ${#} -gt 0 ] 
    225225do 
    226    case ${1} in 
     226    case ${1} in 
    227227     -p) 
    228228        product=${2} 
     
    252252        exit 1 
    253253     ;; 
    254    esac 
     254    esac 
    255255   # next flag 
    256    shift 
     256    shift 
    257257done 
    258258unset usage 
     
    422422if [ "${PROJECT_LOG}" = "" ] 
    423423then 
    424    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    425    exit 1 
     424    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     425    exit 1 
    426426fi 
    427427# 
     
    429429if [ ! -d ${PROJECT_LOG} ] 
    430430then 
    431    echo "${command} : eee : ${PROJECT_LOG} not found" 
    432    exit 1 
     431    echo "${command} : eee : ${PROJECT_LOG} not found" 
     432    exit 1 
    433433fi 
    434434# 
     
    436436if [ ! -x ${PROJECT_LOG} ] 
    437437then 
    438    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    439    exit 1 
     438    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     439    exit 1 
    440440fi 
    441441# 
     
    443443if [ ! -w ${PROJECT_LOG} ] 
    444444then 
    445    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    446    exit 1 
     445    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     446    exit 1 
    447447fi 
    448448# 
     
    462462# 
    463463nbscript=`ps -eaf | grep -v grep |grep ${command}|grep "/bin/sh"|wc -l` 
    464 if [ ${nbscript} -gt 2 ]; then 
    465   echo "Un script ${command} est encore en cours d'execution" 
    466   ps -eaf | grep -v grep |grep ${command} 
    467   exit 1 
     464if [ ${nbscript} -gt 2 ] 
     465then 
     466    echo "Un script ${command} est encore en cours d'execution" 
     467    ps -eaf | grep -v grep |grep ${command} 
     468    exit 1 
    468469fi 
    469470# 
  • trunk/src/traite_trmm.sh

    r565 r630  
    144144system=$(uname) 
    145145case "${system}" in 
    146    AIX|IRIX64) 
     146    AIX|IRIX64) 
    147147     echo "www : no specific posix checking" 
    148148     date_cmd=date 
    149149   ;; 
    150    Darwin) 
     150    Darwin) 
    151151     set -o posix 
    152152     date_cmd=gdate 
    153153   ;; 
    154    Linux) 
     154    Linux) 
    155155     set -o posix 
    156156     date_cmd=date 
     
    187187if [ ${#} -lt ${minargcount} ] 
    188188then 
    189    echo "eee : not enought arguments" 
    190    echo "${usage}" 
    191    exit 1 
     189    echo "eee : not enought arguments" 
     190    echo "${usage}" 
     191    exit 1 
    192192fi 
    193193unset minargcount 
     
    195195while [ ${#} -gt 0 ] 
    196196do 
    197    case ${1} in 
     197    case ${1} in 
    198198     -b) 
    199199        # first date to get 
     
    239239        exit 1 
    240240     ;; 
    241    esac 
     241    esac 
    242242   # next flag 
    243    shift 
     243    shift 
    244244done 
    245245unset usage 
     
    305305if [ ${status} -ne 0 ] 
    306306then 
    307    echo "${command} : eee : tool ${tool} not found" 
    308    exit 1 
     307    echo "${command} : eee : tool ${tool} not found" 
     308    exit 1 
    309309fi 
    310310unset status 
     
    316316if [ ${status} -ne 0 ] 
    317317then 
    318    echo "${command} : eee : tool ${tool} not found" 
    319    exit 1 
     318    echo "${command} : eee : tool ${tool} not found" 
     319    exit 1 
    320320fi 
    321321unset status 
     
    325325if [ ! -w ${PROJECT_LOG} ] 
    326326then 
    327    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    328    exit 1 
     327    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     328    exit 1 
    329329fi 
    330330# 
  • trunk/src/varamma_profile.sh

    r532 r630  
    223223system=$(uname) 
    224224case "${system}" in 
    225    AIX|IRIX64) 
     225    AIX|IRIX64) 
    226226      echo " www : no specific posix checking" 
    227227   ;; 
     
    246246while [ ${#} -gt 0 ] 
    247247do 
    248    case ${1} in 
     248    case ${1} in 
    249249      -d) 
    250250         # directory for application choosen by user (see svn checkout command used) 
     
    283283         # nb : no exit because this file should be launched by login process 
    284284      ;; 
    285    esac 
     285    esac 
    286286   # next flag 
    287    shift 
     287    shift 
    288288done 
    289289unset usage 
     
    292292if [ ! -d ${directory} ] 
    293293then 
    294    echo " eee : ${directory} not found" 
     294    echo " eee : ${directory} not found" 
    295295   # nb : no exit because this file should be launched by login process 
    296296fi 
     
    299299if [ ! -x ${directory} ] 
    300300then 
    301    echo " eee : ${directory} not reachable" 
     301    echo " eee : ${directory} not reachable" 
    302302   # nb : no exit because this file should be launched by login process 
    303303fi 
     
    314314if [ ${test_path} -ne 0 ] 
    315315then 
    316    PATH=${suppath}:${PATH} 
    317    export PATH 
     316    PATH=${suppath}:${PATH} 
     317    export PATH 
    318318else 
    319319   # option bavarde oui/non pas encore implantée ++ 
    320    echo "${command} : iii : ${suppath} already in \${PATH}" 
     320    echo "${command} : iii : ${suppath} already in \${PATH}" 
    321321fi 
    322322unset test_path 
     
    326326if [ ${test_path} -ne 0 ] 
    327327then 
    328    PATH=${suppath}:${PATH} 
    329    export PATH 
     328    PATH=${suppath}:${PATH} 
     329    export PATH 
    330330else 
    331331   # option bavarde oui/non pas encore implantée ++ 
    332    echo "${command} : iii : ${suppath} already in \${PATH}" 
     332    echo "${command} : iii : ${suppath} already in \${PATH}" 
    333333fi 
    334334unset test_path 
     
    342342if [ ${test_manpath} -ne 0 ] 
    343343then 
    344    MANPATH=${suppath}:${MANPATH} 
    345    export MANPATH 
     344    MANPATH=${suppath}:${MANPATH} 
     345    export MANPATH 
    346346else 
    347347   # option bavarde oui/non pas encore implantée ++ 
    348    echo "${command} : iii : ${suppath} already in \${MANPATH}" 
     348    echo "${command} : iii : ${suppath} already in \${MANPATH}" 
    349349fi 
    350350set -u 
     
    357357if [ ! -d ${VARAMMA_LOG} ] 
    358358then 
    359    mkdir -p ${VARAMMA_LOG} 
    360    status=${?} 
    361    if [ ${status} -ne 0 ] 
    362    then 
     359    mkdir -p ${VARAMMA_LOG} 
     360    status=${?} 
     361    if [ ${status} -ne 0 ] 
     362    then 
    363363      echo "${command} : eee : can not create \${VARAMMA_LOG}" 
    364364      # nb : no exit because this file should be launched by login process 
    365    else 
     365    else 
    366366      echo "${command} : iii : creation of \${VARAMMA_LOG}" 
    367    fi 
    368    unset status 
     367    fi 
     368    unset status 
    369369fi 
    370370# check for permission on VARAMMA_LOG 
    371371if [ ! -x ${VARAMMA_LOG} ] 
    372372then 
    373    echo " eee : ${VARAMMA_LOG} not reachable" 
     373    echo " eee : ${VARAMMA_LOG} not reachable" 
    374374   # nb : no exit because this file should be launched by login process 
    375375fi 
     
    378378if [ ! -w ${VARAMMA_LOG} ] 
    379379then 
    380    echo " eee : ${VARAMMA_LOG} not writable" 
     380    echo " eee : ${VARAMMA_LOG} not writable" 
    381381   # nb : no exit because this file shouldreachable be launched by login process 
    382382fi 
     
    391391if [ ! -d ${VARAMMA_ID} ] 
    392392then 
    393    mkdir -p ${VARAMMA_ID} 
    394    echo "${command} : iii : creation of \${VARAMMA_ID}" 
     393    mkdir -p ${VARAMMA_ID} 
     394    echo "${command} : iii : creation of \${VARAMMA_ID}" 
    395395fi 
    396396# check for permission on VARAMMA_ID 
    397397if [ ! -x ${VARAMMA_ID} ] 
    398398then 
    399    echo " eee : ${VARAMMA_ID} not reachable" 
     399    echo " eee : ${VARAMMA_ID} not reachable" 
    400400   # nb : no exit because this file should be launched by login process 
    401401fi 
     
    412412if [ ! -x ${VARAMMA_OD} ] 
    413413then 
    414    echo " eee : ${VARAMMA_OD} not reachable" 
     414    echo " eee : ${VARAMMA_OD} not reachable" 
    415415   # nb : no exit because this file should be launched by login process 
    416416fi 
    417417if [ ! -w ${VARAMMA_OD} ] 
    418418then 
    419    echo " eee : ${VARAMMA_OD} not writable" 
     419    echo " eee : ${VARAMMA_OD} not writable" 
    420420   # nb : no exit because this file should be launched by login process 
    421421fi 
Note: See TracChangeset for help on using the changeset viewer.