Changeset 91 for trunk/src/refdataget.sh


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

fix thanks to coding rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/refdataget.sh

    r89 r91  
    9393system=$(uname) 
    9494case "${system}" in 
    95    AIX|IRIX64) 
    96       echo " www : no specific posix checking" 
    97    ;; 
    98    *) 
    99       set -o posix 
    100    ;; 
     95    AIX|IRIX64) 
     96        echo " www : no specific posix checking" 
     97    ;; 
     98    *) 
     99        set -o posix 
     100    ;; 
    101101esac 
    102102unset system 
     
    116116if [ "${IRCAAM_LOG}" = "" ] 
    117117then 
    118    echo " eee : \${IRCAAM_LOG} not defined" 
    119    exit 1 
     118    echo " eee : \${IRCAAM_LOG} not defined" 
     119    exit 1 
    120120fi 
    121121# 
     
    123123if [ ! -d ${IRCAAM_LOG} ] 
    124124then 
    125    echo " eee : ${IRCAAM_LOG} not found" 
    126    exit 1 
     125    echo " eee : ${IRCAAM_LOG} not found" 
     126    exit 1 
    127127fi 
    128128# 
     
    130130if [ ! -x ${IRCAAM_LOG} ] 
    131131then 
    132    echo " eee : ${IRCAAM_LOG} not reachable" 
    133    exit 1 
     132    echo " eee : ${IRCAAM_LOG} not reachable" 
     133    exit 1 
    134134fi 
    135135# 
     
    137137if [ ! -w ${IRCAAM_LOG} ] 
    138138then 
    139    echo " eee : ${IRCAAM_LOG} not writable" 
    140    exit 1 
     139    echo " eee : ${IRCAAM_LOG} not writable" 
     140    exit 1 
    141141fi 
    142142# 
     
    150150if [ ! -w ${IRCAAM_ID} ] 
    151151then 
    152    echo " eee : ${IRCAAM_ID} not writable" 
    153    exit 1 
     152    echo " eee : ${IRCAAM_ID} not writable" 
     153    exit 1 
    154154fi 
    155155 
     
    165165for simu in ${list_simu} 
    166166do 
    167    case ${simu} in 
    168       CtIV|CtCl|AfNQIVIV) 
    169          dirref="${dirrefb}/Sim/" 
    170       ;; 
    171       AsNQIVIV) 
    172          dirref="${dirrefb}/Sim_As/" 
    173       ;; 
    174       TrNQIVIV) 
    175          dirref="${dirrefb}/Sim_Tr/" 
    176       ;; 
    177       *) 
    178          echo "eee : wrong \${simu}" 
    179          exit 1 
    180       ;; 
    181    esac 
    182    dirref="${dirref}/${simu}/" 
    183    for param in ${list_param} 
    184    do 
     167    case ${simu} in 
     168        CtIV|CtCl|AfNQIVIV) 
     169            dirref="${dirrefb}/Sim/" 
     170        ;; 
     171        AsNQIVIV) 
     172            dirref="${dirrefb}/Sim_As/" 
     173        ;; 
     174        TrNQIVIV) 
     175            dirref="${dirrefb}/Sim_Tr/" 
     176        ;; 
     177        *) 
     178            echo "eee : wrong \${simu}" 
     179            exit 1 
     180        ;; 
     181    esac 
     182    dirref="${dirref}/${simu}/" 
     183    for param in ${list_param} 
     184    do 
    185185      year_i=${year_min} 
    186186      while [ ${year_i} -le ${year_max} ] 
    187187      do 
    188          year_c=$(printf "%4.4d" ${year_i}') 
    189          fileref=${param}.${simu}.${year_c}06-09.nc 
    190          if  [ -f ${IRCAAM_ID}/${fileref} ] 
    191          then 
    192             echo "iii : ${IRCAAM_ID}/${fileref} exist" ${log} 2>&1 
    193             echo "iii : nothing done" >> ${log} 2>&1 
    194          else 
    195             wget --no-verbose --user=ircaam-dods --password=${dods_passwd} \ 
    196                -P ${IRCAAM_ID} \ 
    197                ${dirref}/${fileref} >> ${log} 2>&1 
    198             # ++ ok ? 
    199             # ++ si climserv faire ln -s ${dirref}/${fileref} ${IRCAAM_ID}/ 
    200          fi 
    201          year_i=$(( ${year_i} + 1 )) 
     188          year_c=$(printf "%4.4d" ${year_i}') 
     189          fileref=${param}.${simu}.${year_c}06-09.nc 
     190          if  [ -f ${IRCAAM_ID}/${fileref} ] 
     191          then 
     192              echo "iii : ${IRCAAM_ID}/${fileref} exist" ${log} 2>&1 
     193              echo "iii : nothing done" >> ${log} 2>&1 
     194          else 
     195              wget --no-verbose --user=ircaam-dods --password=${dods_passwd} \ 
     196              -P ${IRCAAM_ID} \ 
     197              ${dirref}/${fileref} >> ${log} 2>&1 
     198              # ++ ok ? 
     199              # ++ si climserv faire ln -s ${dirref}/${fileref} ${IRCAAM_ID}/ 
     200          fi 
     201          year_i=$(( ${year_i} + 1 )) 
    202202      done 
    203203      unset year_i 
    204    done 
    205    unset param 
     204    done 
     205    unset param 
    206206done 
    207207# OLR 
     
    210210if  [ -f ${IRCAAM_ID}/${fileref} ] 
    211211then 
    212    echo "iii : ${IRCAAM_ID}/${fileref} exist"  >> ${log} 2>&1 
    213    echo "iii : nothing done" >> ${log} 2>&1 
     212    echo "iii : ${IRCAAM_ID}/${fileref} exist"  >> ${log} 2>&1 
     213    echo "iii : nothing done" >> ${log} 2>&1 
    214214else 
    215    wget --no-verbose -P ${IRCAAM_ID} ${dirref}/${fileref} >> ${log} 
     215    wget --no-verbose -P ${IRCAAM_ID} ${dirref}/${fileref} >> ${log} 
    216216   # ++ ok ? 
    217217fi 
Note: See TracChangeset for help on using the changeset viewer.