- Timestamp:
- Dec 20, 2024, 8:16:04 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup/setup.sh
r5438 r5439 314 314 # Choix du fichier tracer.def coherent avec l'option "aerosols" 315 315 # NOTE : Le nouveau tracer.def_nospla par defaut n'inclut pas Rn-Pb; 316 # 316 # si on les veut, il faut utiliser ci-dessous; a la place, tracer_RN_PB.def 317 317 #--------------------------------------------------------------------- 318 318 # NB : Les traceurs absents de start* files sont initialises=0 dans le code … … 515 515 516 516 #---------------------------------------------------------------------- 517 function list_yrmth() { 518 #---------------------------------------------------------------------- 519 local liste="" 520 local mthini=$1 521 local mthend=$2 522 local mo_=$mthini 523 while [[ $mo_ != $mthend ]] ; do 524 liste="$liste $mo_" 525 yr__=$( echo $mo_ | cut -c 1-4 ) 526 mo__=$( echo $mo_ | cut -c 5-6 ) 527 echo YM $yr__ $mo__ 528 if [ $(( $mo__ +1 )) == 12 ] ; then 529 yr__=$(( $yr__ + 1 )) ; mo_=$yr__$mo__ 530 else 531 mo_=$(( $mo_ + 1 )) 532 fi 533 done 534 echo $liste 535 536 } 537 538 #---------------------------------------------------------------------- 539 increment_month() { 540 #---------------------------------------------------------------------- 541 local year=$( echo $1 | cut -c 1-4 ) 542 local month=$(( $1 - ${year}00 )) 543 if [ $(( $month - 12 )) -eq 0 ]; then 544 year=$((year + 1)) 545 month=1 546 else 547 month=$((month + 1)) 548 fi 549 if [[ $month -le 9 ]] ; then month=0$month ; fi 550 echo $year$month 551 } 552 553 #---------------------------------------------------------------------- 517 554 function fetch_simu_init_files() { 518 555 #---------------------------------------------------------------------- … … 531 568 if [[ $aerosols = "spla" ]]; then 532 569 get_input_files wget_pub SPLA_WA/emissions 533 for mo_ in $( seq $mthini $mthend ) ; do 570 mo_=$mthini 571 while [[ $mo_ != $mthend ]] ; do 572 # Code horrible duplique a cause de 08 (FH) 573 local yr__=$( echo $mo_ | cut -c 1-4 ) 574 local mo__=$(( $mo_ - ${yr__}00 )) 575 if [[ $mo__ -le 9 ]] ; then mo__=0$mo__ ; fi 534 576 for var in u10m v10m u v ; do 535 yr__=$( echo $mo_ | cut -c 1-4 )536 mo__=$( echo $mo_ | cut -c 5-6 )537 577 echo wget_pub 3DInputData/SPLA_WA/ERA5/$yr__/$mo__ $var.nc 538 578 wget_pub 3DInputData/SPLA_WA/ERA5/$yr__/$mo__ $var.nc 539 579 done 580 mo_=$( increment_month $mo_ ) 540 581 done 541 582 fi
Note: See TracChangeset
for help on using the changeset viewer.