Changeset 1279 for LMDZ4/trunk/libf/dyn3d/leapfrog.F
- Timestamp:
- Dec 10, 2009, 10:02:56 AM (15 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
/LMDZ4/branches/LMDZ4-dev merged: 1150-1162,1164-1193,1195-1231,1234-1235,1237-1240,1242-1274,1276
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/dyn3d/leapfrog.F
r1146 r1279 1 ! 2 ! $Id$ 1 3 ! 2 4 c … … 11 13 #endif 12 14 USE infotrac 13 15 USE guide_mod, ONLY : guide_main 16 USE write_field 14 17 IMPLICIT NONE 15 18 … … 111 114 c 112 115 INTEGER itau,itaufinp1,iav 113 INTEGER*4iday ! jour julien114 REAL time ! Heure de la journee en fraction d'1 jour116 ! INTEGER iday ! jour julien 117 REAL time 115 118 116 119 REAL SSUM … … 124 127 real time_step, t_wrt, t_ops 125 128 126 REAL rdayvrai,rdaym_ini 129 ! REAL rdayvrai,rdaym_ini 130 ! jD_cur: jour julien courant 131 ! jH_cur: heure julienne courante 132 REAL :: jD_cur, jH_cur 133 INTEGER :: an, mois, jour 134 REAL :: secondes 135 127 136 LOGICAL first,callinigrads 128 137 cIM : pour sortir les param. du modele dans un fis. netcdf 110106 129 138 save first 130 139 data first/.true./ 131 real dt_cum , zjulian140 real dt_cum 132 141 character*10 infile 133 142 integer zan, tau0, thoriid … … 166 175 character*80 abort_message 167 176 168 C Calendrier169 LOGICAL true_calendar170 PARAMETER (true_calendar = .false.)171 172 177 logical dissip_conservative 173 178 save dissip_conservative … … 192 197 193 198 itau = 0 194 iday = day_ini+itau/day_step195 time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0196 IF(time.GT.1.) THEN197 time = time-1.198 iday = iday+1199 ENDIF199 c$$$ iday = day_ini+itau/day_step 200 c$$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 201 c$$$ IF(time.GT.1.) THEN 202 c$$$ time = time-1. 203 c$$$ iday = iday+1 204 c$$$ ENDIF 200 205 201 206 … … 214 219 1 CONTINUE 215 220 221 jD_cur = jD_ref + day_ini - day_ref + int (itau * dtvr / daysec) 222 jH_cur = jH_ref + & 223 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 224 216 225 217 226 #ifdef CPP_IOIPSL 218 if (ok_guide.and.(itaufin-itau-1)*dtvr.gt.21600) then 219 call guide(itau,ucov,vcov,teta,q,masse,ps) 220 else 221 IF(prt_level>9)WRITE(lunout,*)'leapfrog: attention on ne ', 222 . 'guide pas les 6 dernieres heures' 227 if (ok_guide) then 228 call guide_main(itau,ucov,vcov,teta,q,masse,ps) 223 229 endif 224 230 #endif 231 232 225 233 c 226 234 c IF( MOD( itau, 10* day_step ).EQ.0 ) THEN … … 284 292 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 285 293 294 time = jD_cur + jH_cur 286 295 CALL caldyn 287 296 $ ( itau,ucov,vcov,teta,ps,masse,pk,pkf,phis , 288 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time+iday-day_ini ) 297 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time ) 298 289 299 290 300 c----------------------------------------------------------------------- … … 344 354 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 345 355 346 rdaym_ini = itau * dtvr / daysec 347 rdayvrai = rdaym_ini + day_ini 348 356 ! rdaym_ini = itau * dtvr / daysec 357 ! rdayvrai = rdaym_ini + day_ini 358 jD_cur = jD_ref + day_ini - day_ref 359 $ + int (itau * dtvr / daysec) 360 jH_cur = jH_ref + & 361 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 362 ! write(lunout,*)'itau, jD_cur = ', itau, jD_cur, jH_cur 363 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) 364 ! write(lunout,*)'current date = ',an, mois, jour, secondes 349 365 350 366 c rajout debug … … 378 394 #endif 379 395 ! #endif of #ifdef CPP_IOIPSL 380 CALL calfis( lafin , rdayvrai,time,396 CALL calfis( lafin , jD_cur, jH_cur, 381 397 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 382 398 $ du,dv,dteta,dq, … … 385 401 386 402 IF (ok_strato) THEN 387 CALL top_bound( vcov,ucov,teta, 403 CALL top_bound( vcov,ucov,teta,masse,dufi,dvfi,dtetafi) 388 404 ENDIF 389 405 … … 506 522 IF(forward. OR. leapf) THEN 507 523 itau= itau + 1 508 iday= day_ini+itau/day_step509 time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0510 IF(time.GT.1.) THEN511 time = time-1.512 iday = iday+1513 ENDIF524 c$$$ iday= day_ini+itau/day_step 525 c$$$ time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 526 c$$$ IF(time.GT.1.) THEN 527 c$$$ time = time-1. 528 c$$$ iday = iday+1 529 c$$$ ENDIF 514 530 ENDIF 515 531 … … 517 533 IF( itau. EQ. itaufinp1 ) then 518 534 if (flag_verif) then 519 write( 80,*) 'ucov',ucov520 write(8 1,*) 'vcov',vcov521 write(8 2,*) 'teta',teta522 write(8 3,*) 'ps',ps523 write(8 4,*) 'q',q535 write(79,*) 'ucov',ucov 536 write(80,*) 'vcov',vcov 537 write(81,*) 'teta',teta 538 write(82,*) 'ps',ps 539 write(83,*) 'q',q 524 540 WRITE(85,*) 'q1 = ',q(:,:,1) 525 541 WRITE(86,*) 'q3 = ',q(:,:,3) 526 write(90) ucov527 write(91) vcov528 write(92) teta529 write(93) ps530 write(94) q531 542 endif 532 543 … … 548 559 IF (ok_dynzon) THEN 549 560 #ifdef CPP_IOIPSL 550 CALL writedynav(histaveid, itau,vcov ,551 , ucov,teta,pk,phi,q,masse,ps,phis)561 ! CALL writedynav(histaveid, itau,vcov , 562 ! , ucov,teta,pk,phi,q,masse,ps,phis) 552 563 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 553 564 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) … … 586 597 587 598 if (planet_type.eq."earth") then 588 #ifdef CPP_EARTH589 599 ! Write an Earth-format restart file 590 600 CALL dynredem1("restart.nc",0.0, 591 601 & vcov,ucov,teta,q,masse,ps) 592 #endif593 602 endif ! of if (planet_type.eq."earth") 594 603 … … 636 645 637 646 itau = itau + 1 638 iday = day_ini+itau/day_step639 time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0640 641 IF(time.GT.1.) THEN642 time = time-1.643 iday = iday+1644 ENDIF647 c$$$ iday = day_ini+itau/day_step 648 c$$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 649 c$$$ 650 c$$$ IF(time.GT.1.) THEN 651 c$$$ time = time-1. 652 c$$$ iday = iday+1 653 c$$$ ENDIF 645 654 646 655 forward = .FALSE. … … 662 671 IF (ok_dynzon) THEN 663 672 #ifdef CPP_IOIPSL 664 CALL writedynav(histaveid, itau,vcov ,665 , ucov,teta,pk,phi,q,masse,ps,phis)673 ! CALL writedynav(histaveid, itau,vcov , 674 ! , ucov,teta,pk,phi,q,masse,ps,phis) 666 675 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 667 676 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) … … 693 702 IF(itau.EQ.itaufin) THEN 694 703 if (planet_type.eq."earth") then 695 #ifdef CPP_EARTH696 704 CALL dynredem1("restart.nc",0.0, 697 705 & vcov,ucov,teta,q,masse,ps) 698 #endif699 706 endif ! of if (planet_type.eq."earth") 700 707 ENDIF ! of IF(itau.EQ.itaufin)
Note: See TracChangeset
for help on using the changeset viewer.