Changeset 565
- Timestamp:
- 05/29/12 17:39:32 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/concat-files.sh
- Property svn:keywords changed from Id to Id URL
r526 r565 57 57 # 58 58 # {msg_t5} -> {concat_files} -> {log msg_t6} 59 # } 59 # } 60 60 # 61 61 # EXAMPLES 62 62 # ======== 63 63 # 64 # You already used :ref:`traite_msg-prod.sh` to create MSG NetCDF files 64 # You already used :ref:`traite_msg-prod.sh` to create MSG NetCDF files 65 65 # during [20060801, 20060802[ and you want to produce daily files:: 66 66 # … … 70 70 # 71 71 # $ tlogd.sh concat-files 72 # 72 # 73 73 # and of course on files in ${PROJECT_ID}. 74 74 # … … 103 103 # $Id$ 104 104 # 105 # $URL$ 106 # 107 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 108 # 109 # * bug fix to handle correctly dates if translation in second on 9 digits 110 # (trailing 0 is automaticaly interpreted as an octal number). 111 # ex = 20010801 112 # * bug fix to handle correctly dates if translation in second of begin 113 # and end is not on the same number of digit 114 # ex : -b 20010801 -e 20010931 115 # 105 116 # - pinsard 2011-06-01T09:18:41Z loholt1.ipsl.polytechnique.fr (Linux) 106 117 # … … 115 126 # 116 127 # * suppress cd, input files are search in ${PROJECT_ID}/MSG/yyyy/mm/ 117 # 128 # 118 129 # - fplod 20100608T143812Z aedon.locean-ipsl.upmc.fr (Darwin) 119 130 # … … 341 352 # 342 353 # loop over all dates 343 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 344 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 345 delta=86400 346 while [[ "${current}" < "${end}" ]] 354 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 355 declare -i current 356 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 357 declare -i end 358 declare -i delta=86400 359 while [ ${current} -lt ${end} ] 347 360 do 348 361 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%d)" 1>> ${log} … … 353 366 list=$(find ${PROJECT_ID}/MSG/${yyyy}/${mm}/${dd}/ -name "${yyyymmdd}????_msg-${product}_map_15min.nc" | sort) 354 367 if [ "${list}" = "" ] 355 then 368 then 356 369 echo "iii : no files found" 1>> ${log} 357 370 else -
trunk/src/file_amsu_t2_to_mem.pro
r540 r565 26 26 ; :file:`${PROJECT_ID}/AMSU/2006/08/a5_20060813_025w05s_025e20n.dat`:: 27 27 ; 28 ; numch ='a5'29 ; yyyy =2006L30 ; mm =831 ; dd =1332 ; lonmin =-25.33 ; lonmax =25.34 ; latmin =-5.35 ; latmax =20.36 ; testfilename =''28 ; numch = 'a5' 29 ; yyyy = 2006L 30 ; mm = 8 31 ; dd = 13 32 ; lonmin = -25. 33 ; lonmax = 25. 34 ; latmin = -5. 35 ; latmax = 20. 36 ; testfilename = '' 37 37 ; result = file_amsu_t2_to_mem(yyyy, mm, dd, numch, lonmin, lonmax, latmin, latmax, testfilename) 38 38 ; -
trunk/src/get_amsu.sh
- Property svn:keywords set to Id URL
r526 r565 101 101 # check if NSS.AM?X.??.D?????.S????.E????.B???????.??.L1C ok 102 102 # 103 # what about 103 # what about 104 104 # lire_amsuab_new.pro:if (ambfile eq '/bdd/AMSU-1C/AMSUBN15/L1C/2006/2006_03_14/NSS.AMBX.NK.D06073.S1701.E1846.B4072728.GC.L1C') then goto,labett ;exception fichier erronne 105 105 # lire_amsuab_new.pro:if (ambfile eq '/bdd/AMSU-1C/AMSUBN15/L1C/2004/2004_06_25/NSS.AMBX.NK.D04177.S1824.E1950.B3180102.WI.L1C') then goto,labett ;exception fichier erronne 106 # build/complete catalog 106 # build/complete catalog 107 107 # 108 108 # handle -f option … … 114 114 # 115 115 # $Id$ 116 # 117 # $URL$ 118 # 119 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 120 # 121 # * bug fix to handle correctly dates if translation in second on 9 digits 122 # (trailing 0 is automaticaly interpreted as an octal number). 123 # ex = 20010801 124 # * bug fix to handle correctly dates if translation in second of begin 125 # and end is not on the same number of digit 126 # ex : -b 20010801 -e 20010931 116 127 # 117 128 # - pinsard 2011-05-05T09:05:55Z loholt1.ipsl.polytechnique.fr (Linux) … … 205 216 ${date_cmd} -u -d "${yyyymmddb}" > /dev/null 206 217 status_date=${?} 207 if [ ${status_date} -ne 0 ] 218 if [ ${status_date} -ne 0 ] 208 219 then 209 220 echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" … … 220 231 ${date_cmd} -u -d "${yyyymmdde}" > /dev/null 221 232 status_date=${?} 222 if [ ${status_date} -ne 0 ] 233 if [ ${status_date} -ne 0 ] 223 234 then 224 235 echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" … … 292 303 dirref_base=/bdd/AMSU-1C/ 293 304 # 294 # loop over all dates to build URL lists 295 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 296 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 297 delta=86400 298 while [[ "${current}" < "${end}" ]] 305 # loop over all dates to build URL lists 306 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 307 declare -i current 308 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 309 declare -i end 310 declare -i delta=86400 311 while [ ${current} -lt ${end} ] 299 312 do 300 313 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%dT%H%M)" 1>> ${log} -
trunk/src/get_epsat.sh
- Property svn:keywords set to Id URL
r526 r565 92 92 # exit on error if some correction files do not exist ? 93 93 # 94 # build/complete catalog 94 # build/complete catalog 95 95 # 96 96 # handle -f option … … 107 107 # 108 108 # $Id$ 109 # 110 # $URL$ 111 # 112 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 113 # 114 # * bug fix to handle correctly dates if translation in second on 9 digits 115 # (trailing 0 is automaticaly interpreted as an octal number). 116 # ex = 20010801 117 # * bug fix to handle correctly dates if translation in second of begin 118 # and end is not on the same number of digit 119 # ex : -b 20010801 -e 20010931 109 120 # 110 121 # - pinsard 2011-05-20T07:30:51Z loholt1.ipsl.polytechnique.fr (Linux) … … 198 209 ${date_cmd} -u -d "${yyyymmddb}" > /dev/null 199 210 status_date=${?} 200 if [ ${status_date} -ne 0 ] 211 if [ ${status_date} -ne 0 ] 201 212 then 202 213 echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" … … 213 224 ${date_cmd} -u -d "${yyyymmdde}" > /dev/null 214 225 status_date=${?} 215 if [ ${status_date} -ne 0 ] 226 if [ ${status_date} -ne 0 ] 216 227 then 217 228 echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" … … 284 295 dirref_base=/bdd/AMMASAT/CDF/priv/west_africa/surf-rr/epsat-sg 285 296 # 286 # loop over all dates to build URL lists 287 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 288 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 289 delta=86400 290 while [[ "${current}" < "${end}" ]] 297 # loop over all dates to build URL lists 298 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 299 declare -i current 300 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 301 declare -i end 302 declare -i delta=86400 303 while [ ${current} -lt ${end} ] 291 304 do 292 305 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%d)" 1>> ${log} -
trunk/src/get_msg.sh
- Property svn:keywords changed from Id to Id URL
r526 r565 96 96 # make it work outside climserv 97 97 # 98 # build/complete catalog 98 # build/complete catalog 99 99 # 100 100 # handle -f option … … 109 109 # $ date -d '20060622T0645' +%Y%m%dT%H%M 110 110 # 20060622T0145 111 # 111 # 112 112 # while 20060622T0645 expected !! 113 113 # … … 117 117 # $Id$ 118 118 # 119 # $URL$ 120 # 121 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 122 # 123 # * bug fix to handle correctly dates if translation in second on 9 digits 124 # (trailing 0 is automaticaly interpreted as an octal number). 125 # ex = 20010801 126 # * bug fix to handle correctly dates if translation in second of begin 127 # and end is not on the same number of digit 128 # ex : -b 20010801 -e 20010931 129 # 119 130 # - pinsard 2011-05-02T13:39:47Z loholt1.ipsl.polytechnique.fr 120 131 # … … 125 136 # * improve time loop. tricky TZ pb ! 126 137 # 127 # - fplod 20110428T072435Z 138 # - fplod 20110428T072435Z 128 139 # 129 140 # * better handling of missing directories ans files … … 134 145 # 135 146 # * creation from traite_msg-prod.sh 136 # thanks to http://stackoverflow.com/questions/1629015/bash-loop-between-two-given-dates 147 # thanks to http://stackoverflow.com/questions/1629015/bash-loop-between-two-given-dates 137 148 # for loop on dates 138 149 # … … 265 276 ${date_cmd} -u -d "${yyyymmddb}" > /dev/null 266 277 status_date=${?} 267 if [ ${status_date} -ne 0 ] 278 if [ ${status_date} -ne 0 ] 268 279 then 269 280 echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" … … 280 291 ${date_cmd} -u -d "${yyyymmdde}" > /dev/null 281 292 status_date=${?} 282 if [ ${status_date} -ne 0 ] 293 if [ ${status_date} -ne 0 ] 283 294 then 284 295 echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" … … 352 363 # loop over all dates to build URL lists 353 364 list_url="" 354 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 355 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 356 delta=900 357 while [[ "${current}" < "${end}" ]] 365 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 366 declare -i current 367 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 368 declare -i end 369 declare -i delta=900 370 while [ ${current} -lt ${end} ] 358 371 do 359 372 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%dT%H%M)" 1>> ${log} … … 385 398 exist=$(( ${exist} + 1)) 386 399 fi 387 if [ ${exist} -eq 0 ] 400 if [ ${exist} -eq 0 ] 388 401 then 389 echo "iii : missing both of ${file_raw_gz} or ${file_def_gz}" >> ${log} 2>&1 402 echo "iii : missing both of ${file_raw_gz} or ${file_def_gz}" >> ${log} 2>&1 390 403 fi 391 404 if [ ${exist} -eq 1 ] 392 405 then 393 echo "iii : missing one of ${file_raw_gz} or ${file_def_gz}" >> ${log} 2>&1 406 echo "iii : missing one of ${file_raw_gz} or ${file_def_gz}" >> ${log} 2>&1 394 407 fi 395 if [ ${exist} -eq 2 ] 408 if [ ${exist} -eq 2 ] 396 409 then 397 410 list_url="${list_url} ${file_def_gz} ${file_raw_gz}" -
trunk/src/get_trmm.sh
- Property svn:keywords set to Id URL
r526 r565 91 91 # make it work outside climserv 92 92 # 93 # build/complete catalog 93 # build/complete catalog 94 94 # 95 95 # handle -f option … … 103 103 # 104 104 # $Id$ 105 # 106 # $URL$ 107 # 108 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 109 # 110 # * bug fix to handle correctly dates if translation in second on 9 digits 111 # (trailing 0 is automaticaly interpreted as an octal number). 112 # ex = 20010801 113 # * bug fix to handle correctly dates if translation in second of begin 114 # and end is not on the same number of digit 115 # ex : -b 20010801 -e 20010931 105 116 # 106 117 # - fplod 20110606T132229Z cratos.locean-ipsl.upmc.fr (Linux) … … 210 221 ${date_cmd} -u -d "${yyyymmddb}" > /dev/null 211 222 status_date=${?} 212 if [ ${status_date} -ne 0 ] 223 if [ ${status_date} -ne 0 ] 213 224 then 214 225 echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" … … 225 236 ${date_cmd} -u -d "${yyyymmdde}" > /dev/null 226 237 status_date=${?} 227 if [ ${status_date} -ne 0 ] 238 if [ ${status_date} -ne 0 ] 228 239 then 229 240 echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" … … 296 307 # loop over all dates to build URL lists 297 308 list_url="" 298 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 299 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 300 delta=10800 301 while [[ "${current}" < "${end}" ]] 309 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 310 declare -i current 311 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 312 declare -i end 313 declare -i delta=10800 314 while [ ${current} -lt ${end} ] 302 315 do 303 316 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%dT%H%M)" 1>> ${log} … … 318 331 exist=$(( ${exist} + 1)) 319 332 fi 320 if [ ${exist} -eq 1 ] 333 if [ ${exist} -eq 1 ] 321 334 then 322 335 list_url="${list_url} ${file_t1}" -
trunk/src/run_traite_amsuab.sh
r537 r565 15 15 # :: 16 16 # 17 # $run_traite_amsuab.sh -b yyyymmdd -e yyyymmdd -lonmin lonmin -lonmax lonmax -latmin latmin -latmax latmax -numch numch17 # run_traite_amsuab.sh -b yyyymmdd -e yyyymmdd -lonmin lonmin -lonmax lonmax -latmin latmin -latmax latmax -numch numch 18 18 # 19 19 # DESCRIPTION -
trunk/src/traite_amsuab.sh
r545 r565 83 83 # tlogd.sh traite_amsuab 84 84 # 85 # A more realistic example: 85 # A more realistic example:: 86 86 # 87 87 # traite_amsuab.sh -b 20060101 -e 20060630 -lonmin -32 -lonmax 32 -latmin -2 -latmax 42 … … 121 121 # usage of profile on parameter true only 122 122 # 123 # get all procedure in profiler report (pb of sequence between 123 # get all procedure in profiler report (pb of sequence between 124 124 # compile statements and call to profiler ?) 125 125 # … … 151 151 # $URL$ 152 152 # 153 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 154 # 155 # * bug fix to handle correctly dates if translation in second on 9 digits 156 # (trailing 0 is automaticaly interpreted as an octal number). 157 # ex = 20010801 158 # * bug fix to handle correctly dates if translation in second of begin 159 # and end is not on the same number of digit 160 # ex : -b 20010801 -e 20010931 161 # 153 162 # - fplod 20120420 154 # 163 # 155 164 # * add some compile to complete profiler report 156 165 # * add a realistic example from laurence … … 386 395 # 387 396 d=$((${yyyymmddb} - ${yyyymmddb_min})) 388 if [ ${d} -lt 0 ] 397 if [ ${d} -lt 0 ] 389 398 then 390 399 echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than yyyymmddb_min ${yyyymmddb_min}" … … 393 402 # 394 403 d=$((${yyyymmddb} - ${yyyymmdde_max})) 395 if [ ${d} -gt 0 ] 404 if [ ${d} -gt 0 ] 396 405 then 397 406 echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or lower than yyyymmdde_max ${yyyymmdde_max}" … … 409 418 # 410 419 d=$((${yyyymmdde} - ${yyyymmdde_max})) 411 if [ ${d} -gt 0 ] 420 if [ ${d} -gt 0 ] 412 421 then 413 422 echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to yyyymmdde_max ${yyyymmdde_max}" … … 495 504 # loop over all dates 496 505 # set current and end date 497 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 498 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 499 delta=86400 500 while [[ "${current}" < "${end}" ]] 506 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 507 declare -i current 508 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 509 declare -i end 510 declare -i delta=86400 511 while [ ${current} -lt ${end} ] 501 512 do 502 513 # get current time at the beginning of the process for one day -
trunk/src/traite_msg-prod.sh
r526 r565 26 26 # 27 27 # With these two files ``traite_msg-prod.sh`` produces 28 # a NetCDF file :file:`${PROJECT_ID}/MSG/{yyyy}/{mm}/{dd}/{yyyymmddmmmn}"_msg-{product}_map_15min.nc` and 28 # a NetCDF file :file:`${PROJECT_ID}/MSG/{yyyy}/{mm}/{dd}/{yyyymmddmmmn}"_msg-{product}_map_15min.nc` and 29 29 # a GIF file :file:`${PROJECT_ID}/MSG/{yyyy}/{mm}/{dd}/{yyyymmddmmmn}"_msg-{product}_map_15min.gif`. 30 30 # 31 31 # ++ box reduction 32 32 # 33 # .. option:: -f 33 # .. option:: -f 34 34 # 35 35 # If :option:`-f` option is set, previously output files will be overwritten. … … 73 73 # ======== 74 74 # 75 # You already used :ref:`get_msg.sh` to get MSG reference data 76 # during [20060801, 20060802[ and you want to produce NetCDF files and 75 # You already used :ref:`get_msg.sh` to get MSG reference data 76 # during [20060801, 20060802[ and you want to produce NetCDF files and 77 77 # GIF files:: 78 78 # … … 117 117 # 118 118 # $Id$ 119 # 120 # $URL$ 121 # 122 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 123 # 124 # * bug fix to handle correctly dates if translation in second on 9 digits 125 # (trailing 0 is automaticaly interpreted as an octal number). 126 # ex = 20010801 127 # * bug fix to handle correctly dates if translation in second of begin 128 # and end is not on the same number of digit 129 # ex : -b 20010801 -e 20010931 119 130 # 120 131 # - pinsard 2011-06-01T09:18:41Z loholt1.ipsl.polytechnique.fr (Linux) … … 460 471 # set current and end date 461 472 list_url="" 462 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 463 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 464 delta=900 465 while [[ "${current}" < "${end}" ]] 473 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 474 declare -i current 475 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 476 declare -i end 477 declare -i delta=900 478 while [ ${current} -lt ${end} ] 466 479 do 467 480 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%dT%H%M)" 1>> ${log} -
trunk/src/traite_trmm.sh
- Property svn:keywords set to Id URL
r526 r565 117 117 # $URL$ 118 118 # 119 # - pinsard 20120529T150524Z loholt1.ipsl.polytechnique.fr (Linux) 120 # 121 # * bug fix to handle correctly dates if translation in second on 9 digits 122 # (trailing 0 is automaticaly interpreted as an octal number). 123 # ex = 20010801 124 # * bug fix to handle correctly dates if translation in second of begin 125 # and end is not on the same number of digit 126 # ex : -b 20010801 -e 20010931 127 # 119 128 # - pinsard 2011-08-18T07:27:26Z loholt1.ipsl.polytechnique.fr (Linux) 120 129 # 121 130 # * replace filelatlon.sh by geolocation_to_string_sh.sh 122 131 # 123 # .. warning:: 132 # .. warning:: 124 133 # filenames will be modified 125 134 # … … 339 348 # loop over all dates 340 349 # set current and end date 341 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%10.10d",$1}') 342 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%10.10d",$1}') 343 delta=86400 344 while [[ "${current}" < "${end}" ]] 350 current=$(${date_cmd} -u -d "${yyyymmddb}" +%s | awk '{printf "%d",$1}') 351 declare -i current 352 end=$(${date_cmd} -u -d "${yyyymmdde}" +%s | awk '{printf "%d",$1}') 353 declare -i end 354 declare -i delta=86400 355 while [ ${current} -lt ${end} ] 345 356 do 346 357 echo "iii : looking for files of $(${date_cmd} -u -d "1970-01-01 ${current} sec" +%Y%m%dT%H%M)" 1>> ${log}
Note: See TracChangeset
for help on using the changeset viewer.