Changeset 630
- Timestamp:
- 01/29/14 17:53:06 (10 years ago)
- Location:
- trunk
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/adm/extract_demoandtest.sh
r517 r630 77 77 system=$(uname) 78 78 case "${system}" in 79 AIX|IRIX64)80 echo " www : no specific posix checking"81 ;;82 *)83 set -o posix84 ;;79 AIX|IRIX64) 80 echo " www : no specific posix checking" 81 ;; 82 *) 83 set -o posix 84 ;; 85 85 esac 86 86 # … … 95 95 if [ ${#} -lt ${minargcount} ] 96 96 then 97 echo "eee : not enought arguments"98 echo "${usage}"99 exit 197 echo "eee : not enought arguments" 98 echo "${usage}" 99 exit 1 100 100 fi 101 101 # … … 106 106 while [ ! -z "${1}" ] 107 107 do 108 case ${1} in109 -i)110 filein=${2}111 shift112 ;;113 -o)114 fileout=${2}115 shift116 ;;117 -m)118 mode=${2}119 shift120 ;;121 -h)122 echo "${usage}"123 exit 0124 ;;125 *)126 echo "eee : unknown option ${1}"127 echo "${usage}"128 exit 1129 ;;130 esac131 # next flag132 shift108 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 133 133 done 134 134 # … … 138 138 # 139 139 case "${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 1151 ;;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 ;; 152 152 esac 153 153 # … … 164 164 if [ ! -s /tmp/${$}_1 ] 165 165 then 166 rm /tmp/${$}_0 /tmp/${$}_1167 echo "iii : no ${mode} block in ${filein}"168 exit 1166 rm /tmp/${$}_0 /tmp/${$}_1 167 echo "iii : no ${mode} block in ${filein}" 168 exit 1 169 169 fi 170 170 # -
trunk/adm/linkchecker.sh
r532 r630 92 92 system=$(uname) 93 93 case "${system}" in 94 AIX|IRIX64)95 echo " www : no specific posix checking"96 ;;97 *)98 set -o posix99 ;;94 AIX|IRIX64) 95 echo " www : no specific posix checking" 96 ;; 97 *) 98 set -o posix 99 ;; 100 100 esac 101 101 command=$(basename ${0}) … … 109 109 if [ ${#} -lt ${minargcount} ] 110 110 then 111 echo "eee : not enought arguments"112 echo "${usage}"113 exit 1111 echo "eee : not enought arguments" 112 echo "${usage}" 113 exit 1 114 114 fi 115 115 # … … 119 119 while [ ! -z "${1}" ] 120 120 do 121 case ${1} in122 -d)123 idircheck=$(( ${idircheck} + 1 ))124 dircheck[${idircheck}]=$(cd ${2};pwd)125 shift126 ;;127 -u)128 iurlcheck=$(( ${iurlcheck} + 1 ))129 urlcheck[${iurlcheck}]=${2}130 shift131 ;;132 esac133 # next flag134 shift135 done121 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 136 136 # 137 137 # +++ remove temporarily … … 146 146 if [ ${commandcheck} = "linkchecker" ] 147 147 then 148 # test if linkchecker is available149 type ${commandcheck} 1> /dev/null 2>&1150 status=${?}151 if [ ${status} -ne 0 ]152 then153 echo "${command} : eee : ${commandcheck} unavailable"154 exit 1155 fi156 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" 157 157 fi 158 158 # 159 159 if [ ${commandcheck} = "checklink" ] 160 160 then 161 # test if checklink is available162 type ${commandcheck} 1> /dev/null 2>&1163 status=${?}164 if [ ${status} -ne 0 ]165 then166 echo "${command} : eee : ${commandcheck} unavailable"167 exit 1168 fi169 #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" 171 171 fi 172 172 # … … 175 175 if [ ${dirchecksize} -gt 0 ] 176 176 then 177 idircheck=1178 while [ ${idircheck} -le ${dirchecksize} ]179 do180 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>&1184 idircheck=$(( ${idircheck} + 1 ))185 done177 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 186 186 fi 187 187 # … … 190 190 if [ ${urlchecksize} -gt 0 ] 191 191 then 192 iurlcheck=1193 while [ ${iurlcheck} -le ${urlchecksize} ]194 do195 echo "iii : beginning of check of ${urlcheck[${iurlcheck}]}" 1>>${log}196 # ++ test si urlcheck commence par http ou pas197 fverif=${urlcheck[${iurlcheck}]}198 echo "iii : check of ${fverif}"199 ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1200 iurlcheck=$(( ${iurlcheck} + 1 ))201 done192 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 202 202 fi 203 203 # -
trunk/adm/mlintall.sh
r326 r630 104 104 system=$(uname) 105 105 case "${system}" in 106 AIX|IRIX64)107 echo " www : no specific posix checking"108 ;;109 *)110 set -o posix111 ;;106 AIX|IRIX64) 107 echo " www : no specific posix checking" 108 ;; 109 *) 110 set -o posix 111 ;; 112 112 esac 113 113 # … … 124 124 if [ ${#} -lt ${minargcount} ] 125 125 then 126 echo "eee : not enought arguments"127 echo "${usage}"128 exit 1126 echo "eee : not enought arguments" 127 echo "${usage}" 128 exit 1 129 129 fi 130 130 unset minargcount … … 133 133 while [ ! -z "${1}" ] 134 134 do 135 case "${1}" in136 -i)137 # directory for inputs choosen by user138 indir=${2}139 # si l'opérateur a mis ., on force à $(pwd) pour être plus clair140 # dans les sorties141 if [ "${indir}" = "." ]142 then143 indir=$(pwd)144 fi145 shift146 ;;147 -o)148 # directory for outputs choosen by user149 outdir=${2}150 # si l'opérateur a mis ., on force à $(pwd) pour être plus clair151 # dans les sorties152 if [ "${outdir}" = "." ]153 then154 outdir=$(pwd)155 fi156 shift157 ;;158 -a)159 mlint_option=${2}160 shift161 ;;162 *)163 # other choice164 echo "eee : unknown option ${1}"165 echo "${usage}"166 exit 1167 ;;168 esac169 # next flag170 shift135 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 171 171 done 172 172 # … … 176 176 if [ ! -d ${indir} ] 177 177 then 178 echo " eee : ${indir} not found"179 exit 1178 echo " eee : ${indir} not found" 179 exit 1 180 180 fi 181 181 # … … 183 183 if [ ! -x ${indir} ] 184 184 then 185 echo " eee : ${indir} not reachable"186 exit 1185 echo " eee : ${indir} not reachable" 186 exit 1 187 187 fi 188 188 # … … 191 191 if [ ! -d ${outdir} ] 192 192 then 193 mkdir -p ${outdir}194 echo "${command} : iii : creation of \${outdir}"193 mkdir -p ${outdir} 194 echo "${command} : iii : creation of \${outdir}" 195 195 fi 196 196 # check for permission on outdir 197 197 if [ ! -x ${outdir} ] 198 198 then 199 echo " eee : ${outdir} not reachable"200 exit 1199 echo " eee : ${outdir} not reachable" 200 exit 1 201 201 fi 202 202 if [ ! -w ${outdir} ] 203 203 then 204 echo " eee : ${outdir} not writable"205 exit 1204 echo " eee : ${outdir} not writable" 205 exit 1 206 206 fi 207 207 # … … 237 237 for m_file in ${list_m_files} 238 238 do 239 # build the command240 arg_mlint=$(basename ${m_file} .m)241 if [ "${mlint_option}" = "" ]242 then243 command_matlab="mlint('${arg_mlint}');"244 else245 command_matlab="mlint('${arg_mlint}','-${mlint_option}');"246 fi247 cat ${outdir}/command_add_path.m > ${outdir}/mlintall.m248 # write matlab command file249 {250 echo ${command_matlab}251 echo "exit"252 } >> ${outdir}/mlintall.m253 # change directory before launching matlab254 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_matlab261 unset arg_mlint262 rm mlintall.m263 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} 264 264 done 265 265 unset list_m_files -
trunk/docs/docs_dev/makefile_non_sphinx
r532 r630 10 10 # 11 11 # génération des manuels à partir des fichiers non assimilables directement 12 # par sphinx 12 # par sphinx 13 13 # 14 14 # SEE ALSO 15 15 # ======== 16 # 16 # 17 17 # :ref:`builddoc` 18 18 # … … 28 28 # improve dependencies 29 29 # 30 # autodoc not ok may be see autodoc-process-docstring 30 # autodoc not ok may be see autodoc-process-docstring 31 31 # 32 32 # sort pb within index_manuals for matlab scripts because severals … … 44 44 # 45 45 # - fplod 20120413T083156Z cratos (Linux) 46 # 46 # 47 47 # * creation from part of adm/makefile 48 48 # … … 364 364 @extract_rst.sh -i $< -l IDL -o $@ 365 365 366 source/manuals/%.m.rst : ../../src/%.m 366 source/manuals/%.m.rst : ../../src/%.m 367 367 @extract_rst.sh -i $< -l matlab -o $@ 368 368 … … 373 373 @extract_rst.sh -i $< -l matlab -o $@ 374 374 375 source/manuals/%.jnl.rst : ../../src/%.jnl 375 source/manuals/%.jnl.rst : ../../src/%.jnl 376 376 @extract_rst.sh -i $< -l ferret -o $@ -
trunk/docs/docs_dev/source/guides/rundemotest.rst
r628 r630 54 54 55 55 $ cd ${PROJECT}/src 56 $ nosetests --with-doctest -v 56 $ nosetests --with-doctest -v *.py 57 58 or:: 59 60 $ cd ${PROJECT}/src 61 $ coverage -rm -o *.py 57 62 58 63 octave -
trunk/src/cat_clim_ecmwf.sh
r396 r630 127 127 system=$(uname) 128 128 case "${system}" in 129 AIX|IRIX64)130 echo " www : no specific posix checking"131 ;;132 *)133 set -o posix134 ;;129 AIX|IRIX64) 130 echo " www : no specific posix checking" 131 ;; 132 *) 133 set -o posix 134 ;; 135 135 esac 136 136 unset system … … 157 157 if [ ${#} -lt ${minargcount} ] 158 158 then 159 echo "eee : not enought arguments"160 echo "${usage}"161 exit 1159 echo "eee : not enought arguments" 160 echo "${usage}" 161 exit 1 162 162 fi 163 163 unset minargcount … … 165 165 while [ ${#} -gt 0 ] 166 166 do 167 case ${1} in168 -h)169 echo "${usage}"170 exit 0171 ;;172 *)173 # other choice174 echo "eee : unknown option ${1}"175 echo "${usage}"176 exit 1177 ;;178 esac179 # next flag180 shift167 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 181 181 done 182 182 unset usage … … 185 185 if [ "${PROJECT_LOG}" = "" ] 186 186 then 187 echo " eee : \${PROJECT_LOG} not defined"188 exit 1187 echo " eee : \${PROJECT_LOG} not defined" 188 exit 1 189 189 fi 190 190 # … … 192 192 if [ ! -d ${PROJECT_LOG} ] 193 193 then 194 echo " eee : ${PROJECT_LOG} not found"195 exit 1194 echo " eee : ${PROJECT_LOG} not found" 195 exit 1 196 196 fi 197 197 # … … 199 199 if [ ! -x ${PROJECT_LOG} ] 200 200 then 201 echo " eee : ${PROJECT_LOG} not reachable"202 exit 1201 echo " eee : ${PROJECT_LOG} not reachable" 202 exit 1 203 203 fi 204 204 # … … 206 206 if [ ! -w ${PROJECT_LOG} ] 207 207 then 208 echo " eee : ${PROJECT_LOG} not writable"209 exit 1208 echo " eee : ${PROJECT_LOG} not writable" 209 exit 1 210 210 fi 211 211 # … … 223 223 while [ ${iyear} -le ${yearmax} ] 224 224 do 225 cyear=$(printf "%4.4d" ${iyear})226 imonth=${monthmin}227 nmonth=0228 listmonth=" "229 while [ ${imonth} -le ${monthmax} ]230 do225 cyear=$(printf "%4.4d" ${iyear}) 226 imonth=${monthmin} 227 nmonth=0 228 listmonth=" " 229 while [ ${imonth} -le ${monthmax} ] 230 do 231 231 cmonth=$(printf "%2.2d" ${imonth}) 232 232 if [ ${iyear} -le 2001 ] … … 257 257 fi 258 258 imonth=$(( ${imonth} + 1 )) 259 done260 # concatenation of monthly files261 listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc"262 # ++ si un aucun ++ si un seul cp au lieu de ncrcat263 # test if more than one file within current year264 case ${nmonth} in265 0)266 echo "eee : nothing to concatenate for year ${iyear}"267 #++ exit 1268 ;;269 1)270 cp ${listmonth} ${PROJECT_OD}/catr.${cyear}.6TU.nc271 listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc"272 ;;273 *)274 ncrcat ${listmonth} ${PROJECT_OD}/catr.${cyear}.6TU.nc275 listyear="${listyear} ${PROJECT_OD}/catr.${cyear}.6TU.nc"276 ;;277 esac278 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 )) 279 279 done 280 280 unset iyear … … 286 286 if [ -f ${fileout} ] 287 287 then 288 echo "eee : ${fileout} already exists"289 unset fileout290 unset yearmin291 unset yearmax292 exit 1288 echo "eee : ${fileout} already exists" 289 unset fileout 290 unset yearmin 291 unset yearmax 292 exit 1 293 293 fi 294 294 # … … 298 298 if [ ${status_ncrcat} -ne 0 ] 299 299 then 300 echo "eee : pb with ncrcat"301 exit 1300 echo "eee : pb with ncrcat" 301 exit 1 302 302 fi 303 303 unset status_ncrcat … … 309 309 if [ -f ${fileout} ] 310 310 then 311 echo "eee : ${fileout} already exists"312 exit 1311 echo "eee : ${fileout} already exists" 312 exit 1 313 313 fi 314 314 unset yearmin … … 320 320 if [ ${status_ncks} -ne 0 ] 321 321 then 322 echo "eee : pb with ncea"323 exit 1322 echo "eee : pb with ncea" 323 exit 1 324 324 fi 325 325 unset status_ncea -
trunk/src/cat_clim_olr.sh
r526 r630 198 198 system=$(uname) 199 199 case "${system}" in 200 AIX|IRIX64)200 AIX|IRIX64) 201 201 echo " www : no specific posix checking" 202 202 ;; … … 226 226 if [ ${#} -lt ${minargcount} ] 227 227 then 228 echo "eee : not enought arguments"229 echo "${usage}"230 exit 1228 echo "eee : not enought arguments" 229 echo "${usage}" 230 exit 1 231 231 fi 232 232 unset minargcount … … 234 234 while [ ${#} -gt 0 ] 235 235 do 236 case ${1} in236 case ${1} in 237 237 -yearmin) 238 238 yearmin=${2} … … 256 256 exit 1 257 257 ;; 258 esac258 esac 259 259 # next flag 260 shift260 shift 261 261 done 262 262 unset usage … … 265 265 if [ "${PROJECT_LOG}" = "" ] 266 266 then 267 echo " eee : \${PROJECT_LOG} not defined"268 exit 1267 echo " eee : \${PROJECT_LOG} not defined" 268 exit 1 269 269 fi 270 270 # … … 272 272 if [ ! -d ${PROJECT_LOG} ] 273 273 then 274 echo " eee : ${PROJECT_LOG} not found"275 exit 1274 echo " eee : ${PROJECT_LOG} not found" 275 exit 1 276 276 fi 277 277 # … … 279 279 if [ ! -x ${PROJECT_LOG} ] 280 280 then 281 echo " eee : ${PROJECT_LOG} not reachable"282 exit 1281 echo " eee : ${PROJECT_LOG} not reachable" 282 exit 1 283 283 fi 284 284 # … … 286 286 if [ ! -w ${PROJECT_LOG} ] 287 287 then 288 echo " eee : ${PROJECT_LOG} not writable"289 exit 1288 echo " eee : ${PROJECT_LOG} not writable" 289 exit 1 290 290 fi 291 291 # … … 305 305 while [ ${iyear} -le ${yearmax} ] 306 306 do 307 cyear=$(printf "%4.4d" ${iyear})308 filein=${PROJECT_ID}/olr.day.mean_${cyear}_ng.nc309 if [ ! -r ${PROJECT_ID}/olr.day.mean.nc ]310 then307 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 311 311 echo "eee : ${filein} not accessible" 1>>${log} 312 312 exit 1 313 fi314 file365[${iyear}]=${PROJECT_OD}/olr.day.mean_${cyear}_365d_ng.nc315 file365_1=${PROJECT_OD}/olr.day.mean_${cyear}_365d1_ng.nc316 file365_2=${PROJECT_OD}/olr.day.mean_${cyear}_365d2_ng.nc313 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 317 317 # get rid of yyyy0229 318 is_leap_year.sh ${iyear}319 ily_status=${?}320 if [ ${ily_status} -eq 0 ]321 then318 is_leap_year.sh ${iyear} 319 ily_status=${?} 320 if [ ${ily_status} -eq 0 ] 321 then 322 322 time1=$(echo ${iyear} | awk ' {printf "%4.4d-01-01 00:00:00.0",$1}') 323 323 time2=$(echo ${iyear} | awk ' {printf "%4.4d-02-28 00:00:00.0",$1}') #++23:59 … … 361 361 rm ${file365_1} ${file365_2} 362 362 fi 363 else363 else 364 364 cp ${filein} ${file365[${iyear}]} 365 365 echo "iii : copy ${filein} ${file365[${iyear}]}" 1>>${log} 366 fi367 listin="${listin} ${file365[${iyear}]}"368 iyear=$(( ${iyear} + 1 ))366 fi 367 listin="${listin} ${file365[${iyear}]}" 368 iyear=$(( ${iyear} + 1 )) 369 369 done 370 370 # … … 374 374 if [ -f ${fileout} ] 375 375 then 376 if [ ${force} -eq 0 ]377 then376 if [ ${force} -eq 0 ] 377 then 378 378 echo "eee : ${fileout} already exists" 1>>${log} 379 379 exit 1 380 fi380 fi 381 381 fi 382 382 # … … 387 387 if [ ${status_ncea} -ne 0 ] 388 388 then 389 echo "eee : pb with ncea" 1>>${log}390 exit 1389 echo "eee : pb with ncea" 1>>${log} 390 exit 1 391 391 else 392 echo "iii : results in ${fileout}" 1>> ${log}393 rm ${listin}392 echo "iii : results in ${fileout}" 1>> ${log} 393 rm ${listin} 394 394 fi 395 395 unset status_ncea … … 403 403 if [ ${status_ncap} -ne 0 ] 404 404 then 405 echo "eee : pb with ncap" 1>>${log}406 exit 1405 echo "eee : pb with ncap" 1>>${log} 406 exit 1 407 407 else 408 echo "iii : results in ${fileout}_short" 1>> ${log}408 echo "iii : results in ${fileout}_short" 1>> ${log} 409 409 fi 410 410 unset status_ncap -
trunk/src/classes_principales.sh
r396 r630 100 100 system=$(uname) 101 101 case "${system}" in 102 AIX|IRIX64)103 echo " www : no specific posix checking"104 ;;105 *)106 set -o posix107 ;;102 AIX|IRIX64) 103 echo " www : no specific posix checking" 104 ;; 105 *) 106 set -o posix 107 ;; 108 108 esac 109 109 unset system … … 121 121 # 122 122 case "${system}" in 123 Darwin)124 timecmd=/usr/bin/time125 ;;126 *)127 timecmd=time128 ;;123 Darwin) 124 timecmd=/usr/bin/time 125 ;; 126 *) 127 timecmd=time 128 ;; 129 129 esac 130 130 # … … 135 135 if [ ${#} -lt ${minargcount} ] 136 136 then 137 echo "eee : not enought arguments"138 echo "${usage}"139 exit 1137 echo "eee : not enought arguments" 138 echo "${usage}" 139 exit 1 140 140 fi 141 141 # 142 142 while [ ${#} -gt 0 ] 143 143 do 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 155 156 done 156 157 # … … 171 172 if [ ${status} -ne 0 ] 172 173 then 173 echo " eee : ${tool} not found"174 exit 1174 echo " eee : ${tool} not found" 175 exit 1 175 176 fi 176 177 unset status … … 189 190 # 190 191 case ${application} in 191 matlab)192 ${timecmd} matlab -nojvm -nosplash < ${script} 1>> ${log} 2>&1193 status=${?}194 ;;195 octave)196 ${timecmd} octave --silent ${script} 1>> ${log} 2>&1197 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 ;; 199 200 esac 200 201 # 201 202 if [ ${status} -ne 0 ] 202 203 then 203 echo "eee : ${application} script failed" 1>> ${log} 2>&1204 exit 1204 echo "eee : ${application} script failed" 1>> ${log} 2>&1 205 exit 1 205 206 fi 206 207 # remove temporary latex files 207 208 rm ${PROJECT_OD}/classes_principales.bbl \ 208 209 210 211 212 209 ${PROJECT_OD}/classes_principales.blg \ 210 ${PROJECT_OD}/classes_principales.log \ 211 ${PROJECT_OD}/classes_principales.out \ 212 ${PROJECT_OD}/classes_principales.aux \ 213 2> /dev/null 213 214 214 215 pdflatex \ … … 225 226 # remove temporary latex files 226 227 rm ${PROJECT_OD}/classes_principales.bbl \ 227 228 229 230 231 228 ${PROJECT_OD}/classes_principales.blg \ 229 ${PROJECT_OD}/classes_principales.log \ 230 ${PROJECT_OD}/classes_principales.out \ 231 ${PROJECT_OD}/classes_principales.aux \ 232 2> /dev/null 232 233 # 233 234 unset log_date -
trunk/src/concat-files.sh
r565 r630 135 135 system=$(uname) 136 136 case "${system}" in 137 AIX|IRIX64)138 echo "www : no specific posix checking"139 date_cmd=date140 ;;141 Darwin)142 set -o posix143 date_cmd=gdate144 ;;145 Linux)146 set -o posix147 date_cmd=date137 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 148 148 ;; 149 149 *) … … 177 177 if [ ${#} -lt ${minargcount} ] 178 178 then 179 echo "eee : not enought arguments"180 echo "${usage}"181 exit 1179 echo "eee : not enought arguments" 180 echo "${usage}" 181 exit 1 182 182 fi 183 183 unset minargcount … … 185 185 while [ ${#} -gt 0 ] 186 186 do 187 case ${1} in187 case ${1} in 188 188 -p) 189 189 product=${2} … … 213 213 exit 1 214 214 ;; 215 esac215 esac 216 216 # next flag 217 shift217 shift 218 218 done 219 219 unset usage … … 294 294 if [ ${status} -ne 0 ] 295 295 then 296 echo "${command} : eee : tool ${tool} not found"297 exit 1296 echo "${command} : eee : tool ${tool} not found" 297 exit 1 298 298 fi 299 299 unset status … … 305 305 if [ ${status} -ne 0 ] 306 306 then 307 echo "${command} : eee : tool ${tool} not found"308 exit 1307 echo "${command} : eee : tool ${tool} not found" 308 exit 1 309 309 fi 310 310 unset status … … 312 312 if [ "${PROJECT_LOG}" = "" ] 313 313 then 314 echo "${command} : eee : \${PROJECT_LOG} not defined"315 exit 1314 echo "${command} : eee : \${PROJECT_LOG} not defined" 315 exit 1 316 316 fi 317 317 # … … 319 319 if [ ! -d ${PROJECT_LOG} ] 320 320 then 321 echo "${command} : eee : ${PROJECT_LOG} not found"322 exit 1321 echo "${command} : eee : ${PROJECT_LOG} not found" 322 exit 1 323 323 fi 324 324 # … … 326 326 if [ ! -x ${PROJECT_LOG} ] 327 327 then 328 echo "${command} : eee : ${PROJECT_LOG} not reachable"329 exit 1328 echo "${command} : eee : ${PROJECT_LOG} not reachable" 329 exit 1 330 330 fi 331 331 # … … 333 333 if [ ! -w ${PROJECT_LOG} ] 334 334 then 335 echo "${command} : eee : ${PROJECT_LOG} not writable"336 exit 1335 echo "${command} : eee : ${PROJECT_LOG} not writable" 336 exit 1 337 337 fi 338 338 # -
trunk/src/create_gif.sh
r526 r630 131 131 system=$(uname) 132 132 case "${system}" in 133 AIX|IRIX64)134 echo "www : no specific posix checking"135 date_cmd=date136 ;;137 Darwin)138 set -o posix139 date_cmd=gdate140 ;;141 Linux)142 set -o posix143 date_cmd=date144 ;;145 *)146 set -o posix147 ;;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 ;; 148 148 esac 149 149 unset system … … 174 174 if [ ${status} -ne 0 ] 175 175 then 176 echo "${command} : eee : tool ${tool} not found"177 exit 1176 echo "${command} : eee : tool ${tool} not found" 177 exit 1 178 178 fi 179 179 unset status … … 183 183 if [ -f ${2} ] 184 184 then 185 echo "iii : ${2} already exist" >> ${log} 2>&1186 exit 0185 echo "iii : ${2} already exist" >> ${log} 2>&1 186 exit 0 187 187 fi 188 188 # 189 189 ferret -gif -nojnl -memsize 256 << EOF >> ${log} 2>&1 190 CANCEL MODE VERIFY191 CANCEL DATA/ALL192 CANCEL SYMBOL/ALL193 GO create_gif_msg-${3}.jnl "${1}" "${2}"194 quit190 CANCEL MODE VERIFY 191 CANCEL DATA/ALL 192 CANCEL SYMBOL/ALL 193 GO create_gif_msg-${3}.jnl "${1}" "${2}" 194 quit 195 195 EOF 196 196 status=${?} 197 197 if [ ${status} -ne 0 ] 198 198 then 199 echo "eee : pb with create_gif_${3}.jnl : ${status}" >> ${log} 2>&1200 exit 1199 echo "eee : pb with create_gif_${3}.jnl : ${status}" >> ${log} 2>&1 200 exit 1 201 201 fi 202 202 unset status … … 204 204 if [ "${4}" != "" -a "${4}" != "0" ] 205 205 then 206 convert -draw "image Over ""${4}"" pal_msg-"${3}".gif" "${2}" "${2}" >> ${log} 2>&1206 convert -draw "image Over ""${4}"" pal_msg-"${3}".gif" "${2}" "${2}" >> ${log} 2>&1 207 207 fi 208 208 # -
trunk/src/create_nc.sh
r526 r630 144 144 system=$(uname) 145 145 case "${system}" in 146 AIX|IRIX64)147 echo "www : no specific posix checking"148 date_cmd=date149 ;;150 Darwin)151 set -o posix152 date_cmd=gdate153 ;;154 Linux)155 set -o posix156 date_cmd=date157 ;;158 *)159 set -o posix160 ;;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 ;; 161 161 esac 162 162 unset system … … 194 194 if [ ${status} -ne 0 ] 195 195 then 196 echo "${command} : eee : tool ${tool} not found"197 exit 1196 echo "${command} : eee : tool ${tool} not found" 197 exit 1 198 198 fi 199 199 unset status … … 205 205 if [ ${status} -ne 0 ] 206 206 then 207 echo "${command} : eee : tool ${tool} not found"208 exit 1207 echo "${command} : eee : tool ${tool} not found" 208 exit 1 209 209 fi 210 210 unset status … … 216 216 if [ ${status} -ne 0 ] 217 217 then 218 echo "${command} : eee : tool ${tool} not found"219 exit 1218 echo "${command} : eee : tool ${tool} not found" 219 exit 1 220 220 fi 221 221 unset status … … 237 237 if [ -f ${8} ] 238 238 then 239 if [ ${force} -eq 0 ]240 then241 echo "eee : ${8} already exists" 1>> ${log}242 exit 1243 else244 rm -f ${8}245 fi239 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 246 246 fi 247 247 ferret -gif -nojnl -memsize 256 << EOF >> ${log} 2>&1 248 249 250 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 251 251 EOF 252 if [ ! -f ${8} ]; then 253 echo "${8} non creation failed." >> ${log} 2>&1 254 exit 1 252 if [ ! -f ${8} ] 253 then 254 echo "${8} non creation failed." >> ${log} 2>&1 255 exit 1 255 256 fi 256 257 # … … 272 273 # 273 274 if [ "${9}" != 0 ]; then 274 ncatted -O -h -a long_name,DATA,o,c,"${9}" ${8} >> ${log} 2>&1275 ncatted -O -h -a long_name,DATA,o,c,"${9}" ${8} >> ${log} 2>&1 275 276 fi 276 277 if [ "${10}" != 0 ]; then 277 ncatted -O -h -a units,DATA,o,c,"${10}" ${8} >> ${log} 2>&1278 ncatted -O -h -a units,DATA,o,c,"${10}" ${8} >> ${log} 2>&1 278 279 fi 279 280 if [ "${11}" != 1 ]; then 280 ncatted -O -h -a scale_factor,DATA,o,f,"${11}" ${8} >> ${log} 2>&1281 ncatted -O -h -a scale_factor,DATA,o,f,"${11}" ${8} >> ${log} 2>&1 281 282 fi 282 283 if [ "${12}" != 0 ]; then 283 ncatted -O -h -a add_offset,DATA,o,f,${12} ${8} >> ${log} 2>&1284 ncatted -O -h -a add_offset,DATA,o,f,${12} ${8} >> ${log} 2>&1 284 285 fi 285 286 # -
trunk/src/cresamsu.sh
r544 r630 137 137 system=$(uname) 138 138 case "${system}" in 139 AIX|IRIX64)140 echo "${command} : www : no specific posix checking"141 date_cmd=date142 ;;143 Darwin)144 set -o posix145 date_cmd=gdate146 ;;147 Linux)148 set -o posix149 date_cmd=date150 ;;151 *)152 set -o posix153 ;;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 ;; 154 154 esac 155 155 unset system … … 180 180 if [ ${#} -lt ${minargcount} ] 181 181 then 182 echo "${command} : eee : not enought arguments (${#} vs ${minargcount})"183 echo "${usage}"184 exit 1182 echo "${command} : eee : not enought arguments (${#} vs ${minargcount})" 183 echo "${usage}" 184 exit 1 185 185 fi 186 186 unset minargcount … … 188 188 while [ ${#} -gt 0 ] 189 189 do 190 case ${1} in191 -b)192 # first date to get193 yyyymmddb=${2}194 shift195 ;;196 -e)197 # last date to get198 yyyymmdde=${2}199 shift200 ;;201 -lonmin)202 lonmin=${2}203 shift204 ;;205 -lonmax)206 lonmax=${2}207 shift208 ;;209 -latmin)210 latmin=${2}211 shift212 ;;213 -latmax)214 latmax=${2}215 shift216 ;;217 -numch)218 numch=${2}219 shift220 ;;221 -temp)222 temp=${2}223 shift224 ;;225 -rtemp)226 rtemp=${2}227 shift228 ;;229 -rhdeg)230 rhdeg=${2}231 shift232 ;;233 -f)234 force=1235 ;;236 -h)237 echo "${usage}"238 exit 0239 ;;240 *)241 # other choice242 echo "${command} : eee : unknown option ${1}"243 echo "${usage}"244 exit 1245 ;;246 esac247 # next flag248 shift190 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 249 249 done 250 250 unset usage … … 311 311 if [ ${status} -ne 0 ] 312 312 then 313 echo "${command} : eee : tool ${IDL_CMD} not found"314 echo "${command} : eee : check varamma_profile.sh sequence"315 exit 1313 echo "${command} : eee : tool ${IDL_CMD} not found" 314 echo "${command} : eee : check varamma_profile.sh sequence" 315 exit 1 316 316 fi 317 317 unset status … … 321 321 if [ ! -w ${PROJECT_LOG} ] 322 322 then 323 echo "${command} : eee : ${PROJECT_LOG} not writable"324 exit 1323 echo "${command} : eee : ${PROJECT_LOG} not writable" 324 exit 1 325 325 fi 326 326 # … … 378 378 result_type=size(result_cresamsu,/type) 379 379 IF (result_type EQ 3) THEN BEGIN 380 IF (result_cresamsu NE 0) THEN BEGIN381 print, 'eee : pb cresamsu'382 return, result_cresamsu383 ENDIF380 IF (result_cresamsu NE 0) THEN BEGIN 381 print, 'eee : pb cresamsu' 382 return, result_cresamsu 383 ENDIF 384 384 ENDIF 385 385 result = 0 … … 425 425 if [ ${status} -ne 0 ] 426 426 then 427 echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1428 cat ${PROJECT}/src/cresamsu_${$}.pro >> ${log} 2>&1429 exit 1427 echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1 428 cat ${PROJECT}/src/cresamsu_${$}.pro >> ${log} 2>&1 429 exit 1 430 430 fi 431 431 rm ${PROJECT}/src/cresamsu_${$}.pro -
trunk/src/dlogd.sh
r215 r630 56 56 system=$(uname) 57 57 case "${system}" in 58 AIX|IRIX64)59 echo " www : no specific posix checking"60 ;;61 *)62 set -o posix63 ;;58 AIX|IRIX64) 59 echo " www : no specific posix checking" 60 ;; 61 *) 62 set -o posix 63 ;; 64 64 esac 65 65 unset system … … 71 71 if [ "${1}" = "" ] 72 72 then 73 echo "${command} : eee : 1st parameter missing" >&274 exit 173 echo "${command} : eee : 1st parameter missing" >&2 74 exit 1 75 75 fi 76 76 # … … 78 78 if [ "${PROJECT_LOG}" = "" ] 79 79 then 80 echo " eee : \${PROJECT_LOG} not defined"81 exit 180 echo " eee : \${PROJECT_LOG} not defined" 81 exit 1 82 82 fi 83 83 # … … 85 85 if [ ! -d ${PROJECT_LOG} ] 86 86 then 87 echo " eee : ${PROJECT_LOG} not found"88 exit 187 echo " eee : ${PROJECT_LOG} not found" 88 exit 1 89 89 fi 90 90 # … … 92 92 if [ ! -x ${PROJECT_LOG} ] 93 93 then 94 echo " eee : ${PROJECT_LOG} not reachable"95 exit 194 echo " eee : ${PROJECT_LOG} not reachable" 95 exit 1 96 96 fi 97 97 # check for write permission on PROJECT_LOG 98 98 if [ ! -w ${PROJECT_LOG} ] 99 99 then 100 echo " eee : ${PROJECT_LOG} not writable"101 exit 1100 echo " eee : ${PROJECT_LOG} not writable" 101 exit 1 102 102 fi 103 103 # … … 107 107 if [ ${tmp} -eq 0 ] 108 108 then 109 if [ "${log}" = "" ]110 then111 echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2112 exit 1113 else114 # destruction du fichier ${log}115 /bin/rm -i ${log}116 unset log117 exit 0118 fi109 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 119 119 else 120 exit 1120 exit 1 121 121 fi -
trunk/src/elogd.sh
r215 r630 64 64 system=$(uname) 65 65 case "${system}" in 66 AIX|IRIX64)67 echo " www : no specific posix checking"68 ;;69 *)70 set -o posix71 ;;66 AIX|IRIX64) 67 echo " www : no specific posix checking" 68 ;; 69 *) 70 set -o posix 71 ;; 72 72 esac 73 73 unset system … … 79 79 if [ ! "${EDITOR}" ] 80 80 then 81 echo " ${command} : eee : EDITOR undefined" >&282 exit 181 echo " ${command} : eee : EDITOR undefined" >&2 82 exit 1 83 83 fi 84 84 if [ "${1}" = "" ] 85 85 then 86 echo "${command} : eee : 1st parameter missing" >&287 exit 186 echo "${command} : eee : 1st parameter missing" >&2 87 exit 1 88 88 fi 89 89 # … … 91 91 if [ "${PROJECT_LOG}" = "" ] 92 92 then 93 echo " eee : \${PROJECT_LOG} not defined"94 exit 193 echo " eee : \${PROJECT_LOG} not defined" 94 exit 1 95 95 fi 96 96 # … … 98 98 if [ ! -d ${PROJECT_LOG} ] 99 99 then 100 echo " eee : ${PROJECT_LOG} not found"101 exit 1100 echo " eee : ${PROJECT_LOG} not found" 101 exit 1 102 102 fi 103 103 # … … 105 105 if [ ! -x ${PROJECT_LOG} ] 106 106 then 107 echo " eee : ${PROJECT_LOG} not reachable"108 exit 1107 echo " eee : ${PROJECT_LOG} not reachable" 108 exit 1 109 109 fi 110 110 # … … 114 114 if [ ${tmp} -eq 0 ] 115 115 then 116 if [ "${log}" = "" ]117 then118 echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2119 exit 1120 else121 # edit122 ${EDITOR} ${log}123 unset log124 exit 0125 fi116 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 126 126 else 127 exit 1127 exit 1 128 128 fi -
trunk/src/extract_netcdf_TRMM.sh
r532 r630 85 85 if [ "${lesfiles}" = "" ] 86 86 then 87 echo "iii : no files ${find_name} found under ${find_dir}"88 exit 087 echo "iii : no files ${find_name} found under ${find_dir}" 88 exit 0 89 89 fi 90 90 # … … 94 94 for ifile in ${lesfiles} 95 95 do 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 then104 echo "eee : pb with ncks on ${ifile}"105 ncdump -h ${ifile}106 exit 1107 else108 echo "iii : adding ${outdir}/tmp/${newfile}"109 fi110 unset status111 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 then115 echo "eee : pb with ncap2 on ${newfile}"116 ncdump -h ${newfile}117 exit 1118 else96 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 119 119 echo "iii : adding ${outdir}/tmp/${newfile2}" 120 fi120 fi 121 121 #++rm -f ${outdir}/tmp/${newfile} 122 122 done -
trunk/src/extract_zone_nc.sh
r350 r630 140 140 if [ "${lesfiles}" = "" ] 141 141 then 142 echo "iii : no files ${find_name} found under ${find_dir}"143 exit 0142 echo "iii : no files ${find_name} found under ${find_dir}" 143 exit 0 144 144 fi 145 145 … … 148 148 for ifile in ${lesfiles} 149 149 do 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 then158 echo "eee : pb with ncks on ${ifile}"159 ncdump -h ${ifile}160 exit 1161 else162 echo "iii : adding ${outdir}/${newfile}"163 fi164 # 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 done150 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 96 96 system=$(uname) 97 97 case "${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 101 105 ;; 102 Darwin) 103 set -o posix 104 date_cmd=gdate 105 ;; 106 Linux) 106 Linux) 107 107 set -o posix 108 108 date_cmd=date … … 128 128 if [ ${#} -lt ${minargcount} ] 129 129 then 130 echo "eee : not enought arguments"131 echo "${usage}"132 exit 1130 echo "eee : not enought arguments" 131 echo "${usage}" 132 exit 1 133 133 fi 134 134 unset minargcount … … 136 136 while [ ${#} -gt 0 ] 137 137 do 138 case ${1} in138 case ${1} in 139 139 -lon) 140 140 lon=${2} … … 155 155 exit 1 156 156 ;; 157 esac158 # next flag159 shift157 esac 158 # next flag 159 shift 160 160 done 161 161 unset usage … … 175 175 if [ ${lon} -ge 0 ] 176 176 then 177 lonletter='e'177 lonletter='e' 178 178 else 179 lonletter='w'179 lonletter='w' 180 180 fi 181 181 if [ ${lat} -ge 0 ] 182 182 then 183 latletter='n'183 latletter='n' 184 184 else 185 latletter='s'185 latletter='s' 186 186 fi 187 187 # -
trunk/src/get_amsu.sh
r585 r630 134 134 system=$(uname) 135 135 case "${system}" in 136 AIX|IRIX64)137 echo "www : no specific posix checking"136 AIX|IRIX64) 137 echo "www : no specific posix checking" 138 138 date_cmd=date 139 139 ;; 140 Darwin)140 Darwin) 141 141 set -o posix 142 142 date_cmd=gdate 143 143 ;; 144 Linux)144 Linux) 145 145 set -o posix 146 146 date_cmd=date … … 174 174 if [ ${#} -lt ${minargcount} ] 175 175 then 176 echo "eee : not enought arguments"177 echo "${usage}"178 exit 1176 echo "eee : not enought arguments" 177 echo "${usage}" 178 exit 1 179 179 fi 180 180 unset minargcount … … 182 182 while [ ${#} -gt 0 ] 183 183 do 184 case ${1} in184 case ${1} in 185 185 -b) 186 186 # first date to get … … 206 206 exit 1 207 207 ;; 208 esac208 esac 209 209 # next flag 210 shift210 shift 211 211 done 212 212 unset usage … … 260 260 if [ "${PROJECT_LOG}" = "" ] 261 261 then 262 echo "${command} : eee : \${PROJECT_LOG} not defined"263 exit 1262 echo "${command} : eee : \${PROJECT_LOG} not defined" 263 exit 1 264 264 fi 265 265 # … … 267 267 if [ ! -d ${PROJECT_LOG} ] 268 268 then 269 echo "${command} : eee : ${PROJECT_LOG} not found"270 exit 1269 echo "${command} : eee : ${PROJECT_LOG} not found" 270 exit 1 271 271 fi 272 272 # … … 274 274 if [ ! -x ${PROJECT_LOG} ] 275 275 then 276 echo "${command} : eee : ${PROJECT_LOG} not reachable"277 exit 1276 echo "${command} : eee : ${PROJECT_LOG} not reachable" 277 exit 1 278 278 fi 279 279 # … … 281 281 if [ ! -w ${PROJECT_LOG} ] 282 282 then 283 echo "${command} : eee : ${PROJECT_LOG} not writable"284 exit 1283 echo "${command} : eee : ${PROJECT_LOG} not writable" 284 exit 1 285 285 fi 286 286 # … … 371 371 if [ "${list_url}" = "" ] 372 372 then 373 echo "iii : no files founds" >> ${log} 2>&1373 echo "iii : no files founds" >> ${log} 2>&1 374 374 else 375 375 # -
trunk/src/get_epsat.sh
r565 r630 126 126 system=$(uname) 127 127 case "${system}" in 128 AIX|IRIX64)128 AIX|IRIX64) 129 129 echo "www : no specific posix checking" 130 130 date_cmd=date 131 131 ;; 132 Darwin)132 Darwin) 133 133 set -o posix 134 134 date_cmd=gdate 135 135 ;; 136 Linux)136 Linux) 137 137 set -o posix 138 138 date_cmd=date … … 166 166 if [ ${#} -lt ${minargcount} ] 167 167 then 168 echo "eee : not enought arguments"169 echo "${usage}"170 exit 1168 echo "eee : not enought arguments" 169 echo "${usage}" 170 exit 1 171 171 fi 172 172 unset minargcount … … 174 174 while [ ${#} -gt 0 ] 175 175 do 176 case ${1} in176 case ${1} in 177 177 -b) 178 178 # first date to get … … 198 198 exit 1 199 199 ;; 200 esac200 esac 201 201 # next flag 202 shift202 shift 203 203 done 204 204 unset usage … … 252 252 if [ "${PROJECT_LOG}" = "" ] 253 253 then 254 echo "${command} : eee : \${PROJECT_LOG} not defined"255 exit 1254 echo "${command} : eee : \${PROJECT_LOG} not defined" 255 exit 1 256 256 fi 257 257 # … … 259 259 if [ ! -d ${PROJECT_LOG} ] 260 260 then 261 echo "${command} : eee : ${PROJECT_LOG} not found"262 exit 1261 echo "${command} : eee : ${PROJECT_LOG} not found" 262 exit 1 263 263 fi 264 264 # … … 266 266 if [ ! -x ${PROJECT_LOG} ] 267 267 then 268 echo "${command} : eee : ${PROJECT_LOG} not reachable"269 exit 1268 echo "${command} : eee : ${PROJECT_LOG} not reachable" 269 exit 1 270 270 fi 271 271 # … … 273 273 if [ ! -w ${PROJECT_LOG} ] 274 274 then 275 echo "${command} : eee : ${PROJECT_LOG} not writable"276 exit 1275 echo "${command} : eee : ${PROJECT_LOG} not writable" 276 exit 1 277 277 fi 278 278 # … … 336 336 if [ "${list_url}" = "" ] 337 337 then 338 echo "iii : no files founds" >> ${log} 2>&1338 echo "iii : no files founds" >> ${log} 2>&1 339 339 else 340 340 # -
trunk/src/get_msg.sh
r625 r630 151 151 system=$(uname) 152 152 case "${system}" in 153 AIX|IRIX64)154 echo "www : no specific posix checking"155 date_cmd=date156 ;;157 Darwin)158 set -o posix159 date_cmd=gdate160 ;;161 Linux)162 set -o posix163 date_cmd=date164 ;;165 *)166 set -o posix153 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 167 167 ;; 168 168 esac … … 192 192 if [ ${#} -lt ${minargcount} ] 193 193 then 194 echo "eee : not enought arguments"195 echo "${usage}"196 exit 1194 echo "eee : not enought arguments" 195 echo "${usage}" 196 exit 1 197 197 fi 198 198 unset minargcount … … 200 200 while [ ${#} -gt 0 ] 201 201 do 202 case ${1} in203 -p)204 product=${2}205 shift206 ;;207 -b)208 # first date to get209 yyyymmddb=${2}210 shift211 ;;212 -e)213 # last date to get214 yyyymmdde=${2}215 shift216 ;;217 -f)218 force=1219 ;;220 -h)221 echo "${usage}"222 exit 0223 ;;224 *)225 # other choice226 echo "eee : unknown option ${1}"227 echo "${usage}"228 exit 1229 ;;230 esac231 # next flag232 shift202 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 233 233 done 234 234 unset usage … … 319 319 if [ "${PROJECT_LOG}" = "" ] 320 320 then 321 echo "${command} : eee : \${PROJECT_LOG} not defined"322 exit 1321 echo "${command} : eee : \${PROJECT_LOG} not defined" 322 exit 1 323 323 fi 324 324 # … … 326 326 if [ ! -d ${PROJECT_LOG} ] 327 327 then 328 echo "${command} : eee : ${PROJECT_LOG} not found"329 exit 1328 echo "${command} : eee : ${PROJECT_LOG} not found" 329 exit 1 330 330 fi 331 331 # … … 333 333 if [ ! -x ${PROJECT_LOG} ] 334 334 then 335 echo "${command} : eee : ${PROJECT_LOG} not reachable"336 exit 1335 echo "${command} : eee : ${PROJECT_LOG} not reachable" 336 exit 1 337 337 fi 338 338 # … … 340 340 if [ ! -w ${PROJECT_LOG} ] 341 341 then 342 echo "${command} : eee : ${PROJECT_LOG} not writable"343 exit 1342 echo "${command} : eee : ${PROJECT_LOG} not writable" 343 exit 1 344 344 fi 345 345 # … … 425 425 if [ "${list_url}" = "" ] 426 426 then 427 echo "iii : no files founds" >> ${log} 2>&1427 echo "iii : no files founds" >> ${log} 2>&1 428 428 else 429 429 # -
trunk/src/get_msg_xrit.sh
r626 r630 305 305 system=$(uname) 306 306 case "${system}" in 307 AIX|IRIX64)308 echo "www : no specific posix checking"309 date_cmd=date310 ;;311 Darwin)312 set -o posix313 date_cmd=gdate314 ;;315 Linux)316 set -o posix317 date_cmd=date318 ;;319 *)320 set -o posix321 ;;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 ;; 322 322 esac 323 323 unset system … … 346 346 if [ ${#} -lt ${minargcount} ] 347 347 then 348 echo "eee : not enought arguments"349 echo "${usage}"350 exit 1348 echo "eee : not enought arguments" 349 echo "${usage}" 350 exit 1 351 351 fi 352 352 unset minargcount … … 354 354 while [ ${#} -gt 0 ] 355 355 do 356 case ${1} in357 -p)358 product=${2}359 shift360 ;;361 -b)362 # first date to get363 yyyymmddb=${2}364 shift365 ;;366 -e)367 # last date to get368 yyyymmdde=${2}369 shift370 ;;371 -f)372 force=1373 ;;374 -h)375 echo "${usage}"376 exit 0377 ;;378 *)379 # other choice380 echo "eee : unknown option ${1}"381 echo "${usage}"382 exit 1383 ;;384 esac385 # next flag386 shift356 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 387 387 done 388 388 unset usage … … 446 446 if [ "${PROJECT_LOG}" = "" ] 447 447 then 448 echo "${command} : eee : \${PROJECT_LOG} not defined"449 exit 1448 echo "${command} : eee : \${PROJECT_LOG} not defined" 449 exit 1 450 450 fi 451 451 # … … 453 453 if [ ! -d ${PROJECT_LOG} ] 454 454 then 455 echo "${command} : eee : ${PROJECT_LOG} not found"456 exit 1455 echo "${command} : eee : ${PROJECT_LOG} not found" 456 exit 1 457 457 fi 458 458 # … … 460 460 if [ ! -x ${PROJECT_LOG} ] 461 461 then 462 echo "${command} : eee : ${PROJECT_LOG} not reachable"463 exit 1462 echo "${command} : eee : ${PROJECT_LOG} not reachable" 463 exit 1 464 464 fi 465 465 # … … 467 467 if [ ! -w ${PROJECT_LOG} ] 468 468 then 469 echo "${command} : eee : ${PROJECT_LOG} not writable"470 exit 1469 echo "${command} : eee : ${PROJECT_LOG} not writable" 470 exit 1 471 471 fi 472 472 # … … 535 535 if [ "${list_url}" = "" ] 536 536 then 537 echo "iii : no files founds" >> ${log} 2>&1537 echo "iii : no files founds" >> ${log} 2>&1 538 538 else 539 539 # -
trunk/src/get_trmm.sh
r565 r630 122 122 system=$(uname) 123 123 case "${system}" in 124 AIX|IRIX64)125 echo "www : no specific posix checking"126 date_cmd=date127 ;;128 Darwin)129 set -o posix130 date_cmd=gdate131 ;;132 Linux)133 set -o posix134 date_cmd=date135 ;;136 *)137 set -o posix138 ;;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 ;; 139 139 esac 140 140 unset system … … 164 164 if [ ${#} -lt ${minargcount} ] 165 165 then 166 echo "eee : not enought arguments"167 echo "${usage}"168 exit 1166 echo "eee : not enought arguments" 167 echo "${usage}" 168 exit 1 169 169 fi 170 170 unset minargcount … … 172 172 while [ ${#} -gt 0 ] 173 173 do 174 case ${1} in175 -p)174 case ${1} in 175 -p) 176 176 product=${2} 177 177 shift … … 200 200 exit 1 201 201 ;; 202 esac203 # next flag204 shift202 esac 203 # next flag 204 shift 205 205 done 206 206 unset usage … … 264 264 if [ "${PROJECT_LOG}" = "" ] 265 265 then 266 echo "${command} : eee : \${PROJECT_LOG} not defined"267 exit 1266 echo "${command} : eee : \${PROJECT_LOG} not defined" 267 exit 1 268 268 fi 269 269 # … … 271 271 if [ ! -d ${PROJECT_LOG} ] 272 272 then 273 echo "${command} : eee : ${PROJECT_LOG} not found"274 exit 1273 echo "${command} : eee : ${PROJECT_LOG} not found" 274 exit 1 275 275 fi 276 276 # … … 278 278 if [ ! -x ${PROJECT_LOG} ] 279 279 then 280 echo "${command} : eee : ${PROJECT_LOG} not reachable"281 exit 1280 echo "${command} : eee : ${PROJECT_LOG} not reachable" 281 exit 1 282 282 fi 283 283 # … … 285 285 if [ ! -w ${PROJECT_LOG} ] 286 286 then 287 echo "${command} : eee : ${PROJECT_LOG} not writable"288 exit 1287 echo "${command} : eee : ${PROJECT_LOG} not writable" 288 exit 1 289 289 fi 290 290 # … … 350 350 if [ "${list_url}" = "" ] 351 351 then 352 echo "iii : no files founds" >> ${log} 2>&1352 echo "iii : no files founds" >> ${log} 2>&1 353 353 else 354 354 # -
trunk/src/is_leap_year.sh
r267 r630 56 56 # - fplod 20100318T075424Z aedon.locean-ipsl.upmc.fr (Darwin) 57 57 # 58 #59 58 # - fplod 2008-08-05T13:21:05Z aedon.locean-ipsl.upmc.fr (Darwin) 60 59 # … … 69 68 \( $(( ${ily_year} % 4)) -eq 0 -a \ 70 69 $(( ${ily_year} % 100)) -ne 0 \) ] && { 71 exit 070 exit 0 72 71 } || { 73 72 exit 1 -
trunk/src/olr_split.sh
r526 r630 184 184 system=$(uname) 185 185 case "${system}" in 186 AIX|IRIX64)187 echo " www : no specific posix checking"188 ;;189 *)190 set -o posix191 ;;186 AIX|IRIX64) 187 echo " www : no specific posix checking" 188 ;; 189 *) 190 set -o posix 191 ;; 192 192 esac 193 193 unset system … … 198 198 # 199 199 case $(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 1204 ;;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 ;; 205 205 esac 206 206 # … … 226 226 if [ ${#} -lt ${minargcount} ] 227 227 then 228 echo "eee : not enought arguments"229 echo "${usage}"230 exit 1228 echo "eee : not enought arguments" 229 echo "${usage}" 230 exit 1 231 231 fi 232 232 unset minargcount … … 234 234 while [ ${#} -gt 0 ] 235 235 do 236 case ${1} in237 -g)238 global=1239 # ++ comment connaitre la 1er année si -g.240 # dans le README on nous dit que ça commence en 1974 mais il faudrait automatiser241 # ++ idem pour la dernière année242 # pour l'instant forçage243 yearmin=1974244 yearmax=2008245 echo "www : forçage yearmin yearmax : ${yearmin} ${yearmax}"246 ;;247 -f)248 force=1249 ;;250 -r)251 rebuild=1252 ;;253 -y)254 yearmin=${2}255 yearmax=${yearmin}256 shift257 ;;258 -h)259 echo "${usage}"260 exit 0261 ;;262 *)263 # other choice264 echo "eee : unknown option ${1}"265 echo "${usage}"266 exit 1267 ;;268 esac269 # next flag270 shift236 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 271 271 done 272 272 unset usage … … 277 277 if [ "${PROJECT_LOG}" = "" ] 278 278 then 279 echo " eee : \${PROJECT_LOG} not defined"280 exit 1279 echo " eee : \${PROJECT_LOG} not defined" 280 exit 1 281 281 fi 282 282 # … … 284 284 if [ ! -d ${PROJECT_LOG} ] 285 285 then 286 echo " eee : ${PROJECT_LOG} not found"287 exit 1286 echo " eee : ${PROJECT_LOG} not found" 287 exit 1 288 288 fi 289 289 # … … 291 291 if [ ! -x ${PROJECT_LOG} ] 292 292 then 293 echo " eee : ${PROJECT_LOG} not reachable"294 exit 1293 echo " eee : ${PROJECT_LOG} not reachable" 294 exit 1 295 295 fi 296 296 # … … 298 298 if [ ! -w ${PROJECT_LOG} ] 299 299 then 300 echo " eee : ${PROJECT_LOG} not writable"301 exit 1300 echo " eee : ${PROJECT_LOG} not writable" 301 exit 1 302 302 fi 303 303 # … … 312 312 if [ ! -r ${PROJECT_ID}/olr.day.mean.nc ] 313 313 then 314 echo "eee : ${filein} not accessible" 1>> ${log}315 exit 1314 echo "eee : ${filein} not accessible" 1>> ${log} 315 exit 1 316 316 fi 317 317 # … … 321 321 while [ ${iyear} -le ${yearmax} ] 322 322 do 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 350 366 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} 356 370 status_ncks=${?} 357 371 if [ ${status_ncks} -ne 0 ] 358 372 then 359 echo "eee : pb with ncks ${filein}" 1>> ${log}360 exit 1373 echo "eee : pb with ncks ${filein}" 1>> ${log} 374 exit 1 361 375 else 362 list_split="${list_split} ${fileout}"376 list_split="${list_split} ${fileout}" 363 377 fi 364 378 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 )) 381 381 done 382 382 unset iyear … … 386 386 if [ ${rebuild} -eq 1 ] 387 387 then 388 # if rebuild is asked, concatenation of all the splitted files389 filetot=${PROJECT_OD}/$(basename ${filein} .nc)_rebuild.nc390 rm -f ${filetot} 2> /dev/null391 ncrcat ${list_split} ${filetot}392 status_ncrcat=${?}393 if [ ${status_ncrcat} -ne 0 ]394 then395 echo "eee : pb with ncrcat" 1>> ${log}396 exit 1397 else398 echo "iii : rebuild result in ${filetot}" 1>> ${log}399 fi400 unset status_ncrcat388 # 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 401 401 fi 402 402 # -
trunk/src/paper01_pre.sh
r526 r630 134 134 system=$(uname) 135 135 case "${system}" in 136 AIX|IRIX64)137 echo " www : no specific posix checking"138 ;;139 *)140 set -o posix141 ;;136 AIX|IRIX64) 137 echo " www : no specific posix checking" 138 ;; 139 *) 140 set -o posix 141 ;; 142 142 esac 143 143 unset system … … 146 146 # 147 147 case $(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 1148 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 152 152 ;; 153 153 esac … … 172 172 if [ "${PROJECT_LOG}" = "" ] 173 173 then 174 echo " eee : \${PROJECT_LOG} not defined"175 exit 1174 echo " eee : \${PROJECT_LOG} not defined" 175 exit 1 176 176 fi 177 177 # … … 179 179 if [ ! -d ${PROJECT_LOG} ] 180 180 then 181 echo " eee : ${PROJECT_LOG} not found"182 exit 1181 echo " eee : ${PROJECT_LOG} not found" 182 exit 1 183 183 fi 184 184 # … … 186 186 if [ ! -x ${PROJECT_LOG} ] 187 187 then 188 echo " eee : ${PROJECT_LOG} not reachable"189 exit 1188 echo " eee : ${PROJECT_LOG} not reachable" 189 exit 1 190 190 fi 191 191 # … … 193 193 if [ ! -w ${PROJECT_LOG} ] 194 194 then 195 echo " eee : ${PROJECT_LOG} not writable"196 exit 1195 echo " eee : ${PROJECT_LOG} not writable" 196 exit 1 197 197 fi 198 198 # … … 214 214 if [ ${getamsu} -eq 1 ] 215 215 then 216 # AMSU217 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 locean222 for channel in ${list_channel}223 do224 for type in ${list_type}225 do226 case ${type} in227 year)228 refloc="/usr/home/lelod/AMSU/"229 for iyear in ${list_year}230 do231 cyear=$(printf "%4.4d" ${iyear})232 fileref=${channel}.an${cyear}.nc233 done234 ;;235 climato)236 fileref=${channel}.climato.nc237 ;;238 *)239 echo "eee : wrong file type" 1>> ${log}240 exit 1241 ;;242 esac243 # ++ test if exists244 if [ ! -f ${refloc}/${fileref} ]245 then246 echo "eee : ${refloc}/${fileref} unavailable" 1>> ${log}247 exit 1248 fi249 if [ -f ${PROJECT_ID}/${fileref} ]250 then251 echo "iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log}252 echo "iii : nothing done"253 else254 ln -s ${refloc}/${fileref} ${PROJECT_ID}/255 fi256 done257 done216 # 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 258 258 fi 259 259 … … 261 261 if [ ${getolr} -eq 1 ] 262 262 then 263 fileref=olr.day.mean.nc264 locref=ftp://ftp.climserv.ipsl.polytechnique.fr/noaa-olr/265 if [ -f ${PROJECT_ID}/${fileref} ]266 then267 echo "iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log}268 echo "iii : nothing done" 1>> ${log}269 else270 wget -P ${PROJECT_ID} ${locref}/${fileref} 1>> ${log} 2>&1271 wget_status=${?}272 if [ ${wget_status} -ne 0 ]273 then274 echo "eee : ${locref}/${file} not found" >> ${log} 2>&1275 # exit 1 #++276 else277 echo "iii : ${locref}/${file} found" >> ${log} 2>&1278 fi279 fi263 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 280 280 fi 281 281 # … … 290 290 while [ ${iyear} -le ${iyearmax} ] 291 291 do 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 )) 296 296 done 297 297 # … … 299 299 for file in ${list_file} 300 300 do 301 if [ ! -f ${file} ]302 then303 echo " iii : ${file} not found" 1>> ${log}304 else305 nfound=$(( ${nfound} + 1 ))306 fi301 if [ ! -f ${file} ] 302 then 303 echo " iii : ${file} not found" 1>> ${log} 304 else 305 nfound=$(( ${nfound} + 1 )) 306 fi 307 307 done 308 308 if [ ${nfound} -ne ${nfile} ] 309 309 then 310 echo " iii : production of ${list_file}" 1>> ${log}311 olr_split.sh -f312 # ++ ok ?310 echo " iii : production of ${list_file}" 1>> ${log} 311 olr_split.sh -f 312 # ++ ok ? 313 313 fi 314 314 # … … 318 318 if [ ${getecmwf_opera} -eq 1 ] 319 319 then 320 dirref="/bdd/OPERA/NETCDF/GLOBAL_1125/4xdaily/AN_PL/" # ++ climserv local321 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 do320 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 326 326 iyearmin=2002 327 327 iyearmax=2008 … … 364 364 echo "iii : ${file} exists" >> ${log} 365 365 fi 366 done366 done 367 367 fi 368 368 if [ ${getecmwf_era40} -eq 1 ] 369 369 then 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 do375 iyearmin=2000376 iyearmax=2002377 iyear=${iyearmin}378 while [ ${iyear} -le ${iyearmax} ]379 do380 cyear=$(printf "%4.4d" ${iyear})381 if [ ${iyear} -le 2001 ]382 then383 imonthmin=1384 imonthmax=12385 else386 imonthmin=1387 imonthmax=08388 fi389 imonth=${imonthmin}390 while [ ${imonth} -le ${imonthmax} ]391 do392 cmonth=$(printf "%2.2d" ${imonth})393 list_url="${list_url} ${locref}/${cyear}/${param}.${cyear}${cmonth}.aph.nc"394 imonth=$(( ${imonth} + 1 ))395 done396 iyear=$(( ${iyear} + 1 ))397 done398 done399 for url in ${list_url}400 do401 file=${PROJECT_ID}/$(basename ${url})402 if [ ! -f ${file} ]403 then404 wget --no-verbose -P ${PROJECT_ID} ${url} >> ${log} 2>&1405 wget_status=${?}406 if [ ${wget_status} -ne 0 ]407 then408 echo "eee : ${url} not found" >> ${log} 2>&1409 # exit 1 #++410 else411 echo "iii : ${url} found" >> ${log} 2>&1412 fi413 else414 echo "iii : ${file} exists" >> ${log}415 fi416 done370 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 417 417 fi 418 418 # -
trunk/src/plogd.sh
r215 r630 58 58 system=$(uname) 59 59 case "${system}" in 60 AIX|IRIX64)60 AIX|IRIX64) 61 61 echo " www : no specific posix checking" 62 62 ;; … … 73 73 if [ "${1}" = "" ] 74 74 then 75 echo "${command} : eee : 1st parameter missing" >&276 exit 175 echo "${command} : eee : 1st parameter missing" >&2 76 exit 1 77 77 fi 78 78 # test if a2ps available … … 82 82 if [ ${status} -ne 0 ] 83 83 then 84 echo "${command} : eee : ${tool} unavailable" >&285 exit 484 echo "${command} : eee : ${tool} unavailable" >&2 85 exit 4 86 86 fi 87 87 unset tool … … 93 93 if [ ${tmp} -eq 0 ] 94 94 then 95 if [ "${log}" = "" ]96 then95 if [ "${log}" = "" ] 96 then 97 97 echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 98 98 exit 1 99 else99 else 100 100 # printing 101 101 a2ps --print-anyway=1 ${log} 102 102 exit 0 103 fi103 fi 104 104 else 105 exit 1105 exit 1 106 106 fi -
trunk/src/presentation_lpao.sh
r463 r630 96 96 system=$(uname) 97 97 case "${system}" in 98 AIX|IRIX64)99 echo " www : no specific posix checking"100 ;;101 Darwin)102 octavecmd=/Applications/Octave.app/Contents/Resources/bin/octave103 set -o posix104 ;;105 *)106 set -o posix107 ;;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 ;; 108 108 esac 109 109 # … … 120 120 # 121 121 case "${system}" in 122 Darwin)123 timecmd=/usr/bin/time124 ;;125 *)126 timecmd=time127 ;;122 Darwin) 123 timecmd=/usr/bin/time 124 ;; 125 *) 126 timecmd=time 127 ;; 128 128 esac 129 129 # … … 134 134 if [ ${#} -lt ${minargcount} ] 135 135 then 136 echo "eee : not enought arguments"137 echo "${usage}"138 exit 1136 echo "eee : not enought arguments" 137 echo "${usage}" 138 exit 1 139 139 fi 140 140 # 141 141 while [ ${#} -gt 0 ] 142 142 do 143 case ${1} in144 -a)145 application=${2}146 shift147 ;;148 *) # anything else149 echo "eee : ${usage}"150 exit 1151 ;;152 esac153 shift # next flag143 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 154 154 done 155 155 # 156 156 case ${application} in 157 octave)158 application=${octavecmd}159 ;;157 octave) 158 application=${octavecmd} 159 ;; 160 160 esac 161 161 log=${PROJECT_LOG}/$(basename ${0} .sh).log.${log_date} … … 175 175 if [ ${status} -ne 0 ] 176 176 then 177 echo " eee : ${tool} not found"178 exit 1177 echo " eee : ${tool} not found" 178 exit 1 179 179 fi 180 180 unset status … … 192 192 # 193 193 case ${application} in 194 matlab)195 ${timecmd} matlab -nojvm -nosplash < ${script} 1>> ${log} 2>&1196 status=${?}197 ;;198 ${octavecmd})199 ${timecmd} ${octavecmd} --silent ${script} 1>> ${log} 2>&1200 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 ;; 202 202 esac 203 203 # 204 204 if [ ${status} -ne 0 ] 205 205 then 206 echo "eee : ${application} script failed" 1>> ${log} 2>&1207 exit 1206 echo "eee : ${application} script failed" 1>> ${log} 2>&1 207 exit 1 208 208 fi 209 209 # remove temporary latex files 210 210 rm ${PROJECT_OD}/presentation_lpao.log \ 211 ${PROJECT_OD}/presentation_lpao.out \212 ${PROJECT_OD}/presentation_lpao.aux \213 2> /dev/null211 ${PROJECT_OD}/presentation_lpao.out \ 212 ${PROJECT_OD}/presentation_lpao.aux \ 213 2> /dev/null 214 214 # 215 215 pdflatex \ … … 221 221 # remove temporary latex files 222 222 rm ${PROJECT_OD}/presentation_lpao.log \ 223 ${PROJECT_OD}/presentation_lpao.out \224 ${PROJECT_OD}/presentation_lpao.aux \225 2> /dev/null223 ${PROJECT_OD}/presentation_lpao.out \ 224 ${PROJECT_OD}/presentation_lpao.aux \ 225 2> /dev/null 226 226 # 227 227 unset log_date -
trunk/src/run_cresamsu.sh
r543 r630 91 91 system=$(uname) 92 92 case "${system}" in 93 AIX|IRIX64)94 echo "${command} : www : no specific posix checking"95 date_cmd=date96 ;;97 Darwin)98 set -o posix99 date_cmd=gdate100 ;;101 Linux)102 set -o posix103 date_cmd=date104 ;;105 *)106 set -o posix93 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 107 107 ;; 108 108 esac … … 122 122 while [ ${#} -gt 0 ] 123 123 do 124 case ${1} in125 -b)126 # first date to get127 yyyymmddb=${2}128 shift129 ;;130 -e)131 # last date to get132 yyyymmdde=${2}133 shift134 ;;135 -lonmin)136 lonmin=${2}137 shift138 ;;139 -lonmax)140 lonmax=${2}141 shift142 ;;143 -latmin)144 latmin=${2}145 shift146 ;;147 -latmax)148 latmax=${2}149 shift150 ;;151 -numch)152 numch=${2}153 shift154 ;;155 -temp)156 temp=${2}157 shift158 ;;159 -rtemp)160 rtemp=${2}161 shift162 ;;163 -rhdeg)164 rhdeg=${2}165 shift166 ;;167 -f)168 force=1169 ;;170 -h)171 echo "${usage}"172 exit 0173 ;;174 *)175 # other choice176 echo "${command} : eee : unknown option ${1}"177 echo "${usage}"178 exit 1179 ;;180 esac181 # next flag182 shift124 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 183 183 done 184 184 unset usage -
trunk/src/run_traite_amsuab.sh
r573 r630 107 107 system=$(uname) 108 108 case "${system}" in 109 AIX|IRIX64)109 AIX|IRIX64) 110 110 echo "${command} : www : no specific posix checking" 111 111 date_cmd=date 112 112 ;; 113 Darwin)113 Darwin) 114 114 set -o posix 115 115 date_cmd=gdate 116 116 ;; 117 Linux)117 Linux) 118 118 set -o posix 119 119 date_cmd=date … … 138 138 while [ ${#} -gt 0 ] 139 139 do 140 case ${1} in140 case ${1} in 141 141 -b) 142 142 # first date to get … … 182 182 exit 1 183 183 ;; 184 esac185 # next flag186 shift184 esac 185 # next flag 186 shift 187 187 done 188 188 unset usage -
trunk/src/script_cat_climeraint2d.sh
r267 r630 65 65 # Concatenation de tous les pas de temps 66 66 while [ 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 67 do 68 while [ imois -le $mois_fin ] 69 do 70 if [ imois -le 9 ] 71 then 72 mois=0$imois 74 73 else 75 mois=$imois74 mois=$imois 76 75 fi 77 76 -
trunk/src/script_cat_climeraint3d.sh
r263 r630 71 71 # Concatenation de tous les pas de temps 72 72 while [ ${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 73 do 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 81 82 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 86 89 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 110 108 done 111 109 -
trunk/src/tlogd.sh
r215 r630 57 57 system=$(uname) 58 58 case "${system}" in 59 AIX|IRIX64)60 echo " www : no specific posix checking"61 ;;62 *)63 set -o posix64 ;;59 AIX|IRIX64) 60 echo " www : no specific posix checking" 61 ;; 62 *) 63 set -o posix 64 ;; 65 65 esac 66 66 unset system … … 72 72 if [ "${1}" = "" ] 73 73 then 74 echo "${command} : eee : 1st parameter missing" >&275 exit 174 echo "${command} : eee : 1st parameter missing" >&2 75 exit 1 76 76 fi 77 77 # check for ${PROJECT_LOG} definition 78 78 if [ "${PROJECT_LOG}" = "" ] 79 79 then 80 echo " eee : \${PROJECT_LOG} not defined"81 exit 180 echo " eee : \${PROJECT_LOG} not defined" 81 exit 1 82 82 fi 83 83 # … … 85 85 if [ ! -d ${PROJECT_LOG} ] 86 86 then 87 echo " eee : ${PROJECT_LOG} not found"88 exit 187 echo " eee : ${PROJECT_LOG} not found" 88 exit 1 89 89 fi 90 90 # … … 92 92 if [ ! -x ${PROJECT_LOG} ] 93 93 then 94 echo " eee : ${PROJECT_LOG} not reachable"95 exit 194 echo " eee : ${PROJECT_LOG} not reachable" 95 exit 1 96 96 fi 97 97 # … … 101 101 if [ ${tmp} -eq 0 ] 102 102 then 103 if [ "${log}" = "" ]104 then103 if [ "${log}" = "" ] 104 then 105 105 echo "${command} : eee : no release of ${PROJECT_LOG}/${1}.log" >&2 106 106 exit 1 107 else107 else 108 108 more ${log} 109 109 exit 0 110 fi110 fi 111 111 else 112 exit 1112 exit 1 113 113 fi -
trunk/src/traite_amsuab.sh
r601 r630 283 283 system=$(uname) 284 284 case "${system}" in 285 AIX|IRIX64)286 echo "${command} : www : no specific posix checking"287 date_cmd=date288 ;;289 Darwin)290 set -o posix291 date_cmd=gdate292 ;;293 Linux)294 set -o posix295 date_cmd=date296 ;;297 *)298 set -o posix299 ;;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 ;; 300 300 esac 301 301 unset system … … 330 330 if [ ${#} -lt ${minargcount} ] 331 331 then 332 echo "${command} : eee : not enought arguments"333 echo "${usage}"334 exit 1332 echo "${command} : eee : not enought arguments" 333 echo "${usage}" 334 exit 1 335 335 fi 336 336 unset minargcount … … 338 338 while [ ${#} -gt 0 ] 339 339 do 340 case ${1} in341 -b)342 # first date to get343 yyyymmddb=${2}344 shift345 ;;346 -e)347 # last date to get348 yyyymmdde=${2}349 shift350 ;;351 -lonmin)352 lonmin=${2}353 shift354 ;;355 -lonmax)356 lonmax=${2}357 shift358 ;;359 -latmin)360 latmin=${2}361 shift362 ;;363 -latmax)364 latmax=${2}365 shift366 ;;367 -numch)368 numch=${2}369 shift370 ;;371 -f)372 force=1373 ;;374 -h)375 echo "${usage}"376 exit 0377 ;;378 *)379 # other choice380 echo "${command} : eee : unknown option ${1}"381 echo "${usage}"382 exit 1383 ;;384 esac385 # next flag386 shift340 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 387 387 done 388 388 unset usage … … 446 446 if [ ${status} -ne 0 ] 447 447 then 448 echo "${command} : eee : tool ${IDL_CMD} not found"449 echo "${command} : eee : check varamma_profile.sh sequence"450 exit 1448 echo "${command} : eee : tool ${IDL_CMD} not found" 449 echo "${command} : eee : check varamma_profile.sh sequence" 450 exit 1 451 451 fi 452 452 unset status … … 459 459 if [ ${status} -ne 0 ] 460 460 then 461 echo "${command} : eee : tool ${tool} not found"462 exit 1461 echo "${command} : eee : tool ${tool} not found" 462 exit 1 463 463 fi 464 464 unset status … … 468 468 if [ ! -w ${PROJECT_LOG} ] 469 469 then 470 echo "${command} : eee : ${PROJECT_LOG} not writable"471 exit 1470 echo "${command} : eee : ${PROJECT_LOG} not writable" 471 exit 1 472 472 fi 473 473 # … … 496 496 if [ ${status} -ne 0 ] 497 497 then 498 echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log}499 exit 1498 echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log} 499 exit 1 500 500 fi 501 501 geomax=$(geolocation_to_string_sh.sh -lon ${lonmax} -lat ${latmax}) … … 503 503 if [ ${status} -ne 0 ] 504 504 then 505 echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log}506 exit 1505 echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log} 506 exit 1 507 507 fi 508 508 # … … 523 523 result = file_bathy_to_mem(${lonmin}, ${lonmax}, ${latmin}, ${latmax}) 524 524 IF (result EQ -1) THEN BEGIN 525 print, 'eee : pb file_bathy_to_mem'526 return, result525 print, 'eee : pb file_bathy_to_mem' 526 return, result 527 527 ENDIF 528 528 ; … … 543 543 ; 544 544 FOR j=juld,jule DO BEGIN 545 caldat,j, mm,dd,yyyy546 print, 'iii : traitement du jour ',yyyy,mm,dd547 result = search_amsufiles('${numch}', yyyy,mm, dd)548 result_type=size(result,/type)549 IF (result_type EQ 3) THEN BEGIN545 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 550 550 IF (result EQ -1) THEN BEGIN 551 551 print, 'eee : pb search_amsufiles' 552 552 return, result 553 553 ENDIF 554 ENDIF ELSE BEGIN554 ENDIF ELSE BEGIN 555 555 files_list = result 556 ENDELSE557 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} 558 558 EOF 559 559 if [ ${netcdf_build} -eq 1 ] 560 560 then 561 561 cat >> ${PROJECT}/src/traite_amsu_temp.pro << EOF 562 resol_grid=0.1563 amsu2ncdf, '${numch}', yyyy,mm,dd, ${lonmin}, ${lonmax}, ${latmin}, ${latmax}, resol_grid562 resol_grid=0.1 563 amsu2ncdf, '${numch}', yyyy,mm,dd, ${lonmin}, ${lonmax}, ${latmin}, ${latmax}, resol_grid 564 564 EOF 565 565 fi -
trunk/src/traite_amsuab_old.sh
r602 r630 283 283 system=$(uname) 284 284 case "${system}" in 285 AIX|IRIX64)285 AIX|IRIX64) 286 286 echo "${command} : www : no specific posix checking" 287 287 date_cmd=date 288 288 ;; 289 Darwin)289 Darwin) 290 290 set -o posix 291 291 date_cmd=gdate 292 292 ;; 293 Linux)293 Linux) 294 294 set -o posix 295 295 date_cmd=date … … 330 330 if [ ${#} -lt ${minargcount} ] 331 331 then 332 echo "${command} : eee : not enought arguments"333 echo "${usage}"334 exit 1332 echo "${command} : eee : not enought arguments" 333 echo "${usage}" 334 exit 1 335 335 fi 336 336 unset minargcount … … 338 338 while [ ${#} -gt 0 ] 339 339 do 340 case ${1} in340 case ${1} in 341 341 -b) 342 342 # first date to get … … 382 382 exit 1 383 383 ;; 384 esac384 esac 385 385 # next flag 386 shift386 shift 387 387 done 388 388 unset usage … … 446 446 if [ ${status} -ne 0 ] 447 447 then 448 echo "${command} : eee : tool ${IDL_CMD} not found"449 echo "${command} : eee : check varamma_profile.sh sequence"450 exit 1448 echo "${command} : eee : tool ${IDL_CMD} not found" 449 echo "${command} : eee : check varamma_profile.sh sequence" 450 exit 1 451 451 fi 452 452 unset status … … 459 459 if [ ${status} -ne 0 ] 460 460 then 461 echo "${command} : eee : tool ${tool} not found"462 exit 1461 echo "${command} : eee : tool ${tool} not found" 462 exit 1 463 463 fi 464 464 unset status … … 468 468 if [ ! -w ${PROJECT_LOG} ] 469 469 then 470 echo "${command} : eee : ${PROJECT_LOG} not writable"471 exit 1470 echo "${command} : eee : ${PROJECT_LOG} not writable" 471 exit 1 472 472 fi 473 473 # … … 496 496 if [ ${status} -ne 0 ] 497 497 then 498 echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log}499 exit 1498 echo "${command} : eee : pb geomin with geolocation_to_string_sh.sh" 1>> ${log} 499 exit 1 500 500 fi 501 501 geomax=$(geolocation_to_string_sh.sh -lon ${lonmax} -lat ${latmax}) … … 503 503 if [ ${status} -ne 0 ] 504 504 then 505 echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log}506 exit 1505 echo "${command} : eee : pb geomax with geolocation_to_string_sh.sh" 1>> ${log} 506 exit 1 507 507 fi 508 508 # … … 542 542 result_type=size(result,/type) 543 543 IF (result_type EQ 3) THEN BEGIN 544 IF (result EQ -1) THEN BEGIN544 IF (result EQ -1) THEN BEGIN 545 545 print, 'eee : pb search_amsufiles' 546 546 return, result 547 ENDIF547 ENDIF 548 548 ENDIF ELSE BEGIN 549 files_list = result549 files_list = result 550 550 ENDELSE 551 551 ; 552 552 result = file_bathy_to_mem(${lonmin}, ${lonmax}, ${latmin}, ${latmax}) 553 553 IF (result EQ -1) THEN BEGIN 554 print, 'eee : pb file_bathy_to_mem'555 return, result554 print, 'eee : pb file_bathy_to_mem' 555 return, result 556 556 ENDIF 557 557 ; … … 573 573 ; 574 574 CASE size(files_list,/DIMENSION) OF 575 0L : BEGIN575 0L : BEGIN 576 576 print, 'www : no file found' 577 577 END 578 ELSE: BEGIN578 ELSE: BEGIN 579 579 print, 'iii : nb de fichiers', size(files_list,/DIMENSION) 580 580 resol=1 -
trunk/src/traite_msg-prod.sh
r565 r630 170 170 system=$(uname) 171 171 case "${system}" in 172 AIX|IRIX64)173 echo "www : no specific posix checking"174 date_cmd=date175 ;;176 Darwin)177 set -o posix178 date_cmd=gdate179 ;;180 Linux)181 set -o posix182 date_cmd=date183 ;;184 *)185 set -o posix172 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 186 186 ;; 187 187 esac … … 216 216 if [ ${#} -lt ${minargcount} ] 217 217 then 218 echo "eee : not enought arguments"219 echo "${usage}"220 exit 1218 echo "eee : not enought arguments" 219 echo "${usage}" 220 exit 1 221 221 fi 222 222 unset minargcount … … 224 224 while [ ${#} -gt 0 ] 225 225 do 226 case ${1} in226 case ${1} in 227 227 -p) 228 228 product=${2} … … 252 252 exit 1 253 253 ;; 254 esac254 esac 255 255 # next flag 256 shift256 shift 257 257 done 258 258 unset usage … … 422 422 if [ "${PROJECT_LOG}" = "" ] 423 423 then 424 echo "${command} : eee : \${PROJECT_LOG} not defined"425 exit 1424 echo "${command} : eee : \${PROJECT_LOG} not defined" 425 exit 1 426 426 fi 427 427 # … … 429 429 if [ ! -d ${PROJECT_LOG} ] 430 430 then 431 echo "${command} : eee : ${PROJECT_LOG} not found"432 exit 1431 echo "${command} : eee : ${PROJECT_LOG} not found" 432 exit 1 433 433 fi 434 434 # … … 436 436 if [ ! -x ${PROJECT_LOG} ] 437 437 then 438 echo "${command} : eee : ${PROJECT_LOG} not reachable"439 exit 1438 echo "${command} : eee : ${PROJECT_LOG} not reachable" 439 exit 1 440 440 fi 441 441 # … … 443 443 if [ ! -w ${PROJECT_LOG} ] 444 444 then 445 echo "${command} : eee : ${PROJECT_LOG} not writable"446 exit 1445 echo "${command} : eee : ${PROJECT_LOG} not writable" 446 exit 1 447 447 fi 448 448 # … … 462 462 # 463 463 nbscript=`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 464 if [ ${nbscript} -gt 2 ] 465 then 466 echo "Un script ${command} est encore en cours d'execution" 467 ps -eaf | grep -v grep |grep ${command} 468 exit 1 468 469 fi 469 470 # -
trunk/src/traite_trmm.sh
r565 r630 144 144 system=$(uname) 145 145 case "${system}" in 146 AIX|IRIX64)146 AIX|IRIX64) 147 147 echo "www : no specific posix checking" 148 148 date_cmd=date 149 149 ;; 150 Darwin)150 Darwin) 151 151 set -o posix 152 152 date_cmd=gdate 153 153 ;; 154 Linux)154 Linux) 155 155 set -o posix 156 156 date_cmd=date … … 187 187 if [ ${#} -lt ${minargcount} ] 188 188 then 189 echo "eee : not enought arguments"190 echo "${usage}"191 exit 1189 echo "eee : not enought arguments" 190 echo "${usage}" 191 exit 1 192 192 fi 193 193 unset minargcount … … 195 195 while [ ${#} -gt 0 ] 196 196 do 197 case ${1} in197 case ${1} in 198 198 -b) 199 199 # first date to get … … 239 239 exit 1 240 240 ;; 241 esac241 esac 242 242 # next flag 243 shift243 shift 244 244 done 245 245 unset usage … … 305 305 if [ ${status} -ne 0 ] 306 306 then 307 echo "${command} : eee : tool ${tool} not found"308 exit 1307 echo "${command} : eee : tool ${tool} not found" 308 exit 1 309 309 fi 310 310 unset status … … 316 316 if [ ${status} -ne 0 ] 317 317 then 318 echo "${command} : eee : tool ${tool} not found"319 exit 1318 echo "${command} : eee : tool ${tool} not found" 319 exit 1 320 320 fi 321 321 unset status … … 325 325 if [ ! -w ${PROJECT_LOG} ] 326 326 then 327 echo "${command} : eee : ${PROJECT_LOG} not writable"328 exit 1327 echo "${command} : eee : ${PROJECT_LOG} not writable" 328 exit 1 329 329 fi 330 330 # -
trunk/src/varamma_profile.sh
r532 r630 223 223 system=$(uname) 224 224 case "${system}" in 225 AIX|IRIX64)225 AIX|IRIX64) 226 226 echo " www : no specific posix checking" 227 227 ;; … … 246 246 while [ ${#} -gt 0 ] 247 247 do 248 case ${1} in248 case ${1} in 249 249 -d) 250 250 # directory for application choosen by user (see svn checkout command used) … … 283 283 # nb : no exit because this file should be launched by login process 284 284 ;; 285 esac285 esac 286 286 # next flag 287 shift287 shift 288 288 done 289 289 unset usage … … 292 292 if [ ! -d ${directory} ] 293 293 then 294 echo " eee : ${directory} not found"294 echo " eee : ${directory} not found" 295 295 # nb : no exit because this file should be launched by login process 296 296 fi … … 299 299 if [ ! -x ${directory} ] 300 300 then 301 echo " eee : ${directory} not reachable"301 echo " eee : ${directory} not reachable" 302 302 # nb : no exit because this file should be launched by login process 303 303 fi … … 314 314 if [ ${test_path} -ne 0 ] 315 315 then 316 PATH=${suppath}:${PATH}317 export PATH316 PATH=${suppath}:${PATH} 317 export PATH 318 318 else 319 319 # option bavarde oui/non pas encore implantée ++ 320 echo "${command} : iii : ${suppath} already in \${PATH}"320 echo "${command} : iii : ${suppath} already in \${PATH}" 321 321 fi 322 322 unset test_path … … 326 326 if [ ${test_path} -ne 0 ] 327 327 then 328 PATH=${suppath}:${PATH}329 export PATH328 PATH=${suppath}:${PATH} 329 export PATH 330 330 else 331 331 # option bavarde oui/non pas encore implantée ++ 332 echo "${command} : iii : ${suppath} already in \${PATH}"332 echo "${command} : iii : ${suppath} already in \${PATH}" 333 333 fi 334 334 unset test_path … … 342 342 if [ ${test_manpath} -ne 0 ] 343 343 then 344 MANPATH=${suppath}:${MANPATH}345 export MANPATH344 MANPATH=${suppath}:${MANPATH} 345 export MANPATH 346 346 else 347 347 # option bavarde oui/non pas encore implantée ++ 348 echo "${command} : iii : ${suppath} already in \${MANPATH}"348 echo "${command} : iii : ${suppath} already in \${MANPATH}" 349 349 fi 350 350 set -u … … 357 357 if [ ! -d ${VARAMMA_LOG} ] 358 358 then 359 mkdir -p ${VARAMMA_LOG}360 status=${?}361 if [ ${status} -ne 0 ]362 then359 mkdir -p ${VARAMMA_LOG} 360 status=${?} 361 if [ ${status} -ne 0 ] 362 then 363 363 echo "${command} : eee : can not create \${VARAMMA_LOG}" 364 364 # nb : no exit because this file should be launched by login process 365 else365 else 366 366 echo "${command} : iii : creation of \${VARAMMA_LOG}" 367 fi368 unset status367 fi 368 unset status 369 369 fi 370 370 # check for permission on VARAMMA_LOG 371 371 if [ ! -x ${VARAMMA_LOG} ] 372 372 then 373 echo " eee : ${VARAMMA_LOG} not reachable"373 echo " eee : ${VARAMMA_LOG} not reachable" 374 374 # nb : no exit because this file should be launched by login process 375 375 fi … … 378 378 if [ ! -w ${VARAMMA_LOG} ] 379 379 then 380 echo " eee : ${VARAMMA_LOG} not writable"380 echo " eee : ${VARAMMA_LOG} not writable" 381 381 # nb : no exit because this file shouldreachable be launched by login process 382 382 fi … … 391 391 if [ ! -d ${VARAMMA_ID} ] 392 392 then 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}" 395 395 fi 396 396 # check for permission on VARAMMA_ID 397 397 if [ ! -x ${VARAMMA_ID} ] 398 398 then 399 echo " eee : ${VARAMMA_ID} not reachable"399 echo " eee : ${VARAMMA_ID} not reachable" 400 400 # nb : no exit because this file should be launched by login process 401 401 fi … … 412 412 if [ ! -x ${VARAMMA_OD} ] 413 413 then 414 echo " eee : ${VARAMMA_OD} not reachable"414 echo " eee : ${VARAMMA_OD} not reachable" 415 415 # nb : no exit because this file should be launched by login process 416 416 fi 417 417 if [ ! -w ${VARAMMA_OD} ] 418 418 then 419 echo " eee : ${VARAMMA_OD} not writable"419 echo " eee : ${VARAMMA_OD} not writable" 420 420 # nb : no exit because this file should be launched by login process 421 421 fi
Note: See TracChangeset
for help on using the changeset viewer.