Changeset 158 for codes/icosagcm/trunk
- Timestamp:
- 06/04/13 12:28:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/timeloop_gcm.f90
r157 r158 243 243 CASE (mlf) 244 244 CALL leapfrog_matsuno_scheme(stage) 245 246 ! CASE ('leapfrog')247 ! CALL leapfrog_scheme248 !249 ! CASE ('adam_bashforth')250 ! CALL dissip(f_u,f_du,f_ps,f_phis, f_theta_rhodz,f_dtheta_rhodz)251 ! CALL adam_bashforth_scheme252 245 CASE DEFAULT 253 246 STOP … … 432 425 END SUBROUTINE RK_scheme 433 426 434 SUBROUTINE leapfrog_scheme435 IMPLICIT NONE436 INTEGER :: ind437 438 CALL trace_start("leapfrog_scheme")439 440 DO ind=1,ndomain441 CALL swap_dimensions(ind)442 CALL swap_geometry(ind)443 ps=f_ps(ind) ; u=f_u(ind) ; theta_rhodz=f_theta_rhodz(ind)444 psm1=f_psm1(ind) ; um1=f_um1(ind) ; theta_rhodzm1=f_theta_rhodzm1(ind)445 psm2=f_psm2(ind) ; um2=f_um2(ind) ; theta_rhodzm2=f_theta_rhodzm2(ind)446 dps=f_dps(ind) ; du=f_du(ind) ; dtheta_rhodz=f_dtheta_rhodz(ind)447 448 IF (it==0) THEN449 psm2(:)=ps(:) ; theta_rhodzm2(:,:)=theta_rhodz(:,:) ; um2(:,:)=u(:,:)450 451 ps(:)=ps(:)+dt*dps(:)452 u(:,:)=u(:,:)+dt*du(:,:)453 theta_rhodz(:,:)=theta_rhodz(:,:)+dt*dtheta_rhodz(:,:)454 455 psm1(:)=ps(:) ; theta_rhodzm1(:,:)=theta_rhodz(:,:) ; um1(:,:)=u(:,:)456 ELSE457 458 ps(:)=psm2(:)+2*dt*dps(:)459 u(:,:)=um2(:,:)+2*dt*du(:,:)460 theta_rhodz(:,:)=theta_rhodzm2(:,:)+2*dt*dtheta_rhodz(:,:)461 462 psm2(:)=psm1(:) ; theta_rhodzm2(:,:)=theta_rhodzm1(:,:) ; um2(:,:)=um1(:,:)463 psm1(:)=ps(:) ; theta_rhodzm1(:,:)=theta_rhodz(:,:) ; um1(:,:)=u(:,:)464 ENDIF465 466 ENDDO467 468 CALL trace_end("leapfrog_scheme")469 470 END SUBROUTINE leapfrog_scheme471 472 427 SUBROUTINE leapfrog_matsuno_scheme(stage) 473 428 IMPLICIT NONE … … 519 474 END SUBROUTINE leapfrog_matsuno_scheme 520 475 521 SUBROUTINE adam_bashforth_scheme522 IMPLICIT NONE523 INTEGER :: ind524 525 CALL trace_start("adam_bashforth_scheme")526 527 DO ind=1,ndomain528 CALL swap_dimensions(ind)529 CALL swap_geometry(ind)530 ps=f_ps(ind) ; u=f_u(ind) ; theta_rhodz=f_theta_rhodz(ind)531 dps=f_dps(ind) ; du=f_du(ind) ; dtheta_rhodz=f_dtheta_rhodz(ind)532 dpsm1=f_dpsm1(ind) ; dum1=f_dum1(ind) ; dtheta_rhodzm1=f_dtheta_rhodzm1(ind)533 dpsm2=f_dpsm2(ind) ; dum2=f_dum2(ind) ; dtheta_rhodzm2=f_dtheta_rhodzm2(ind)534 535 IF (it==0) THEN536 dpsm1(:)=dps(:) ; dum1(:,:)=du(:,:) ; dtheta_rhodzm1(:,:)=dtheta_rhodz(:,:)537 dpsm2(:)=dpsm1(:) ; dum2(:,:)=dum1(:,:) ; dtheta_rhodzm2(:,:)=dtheta_rhodzm1(:,:)538 ENDIF539 540 ps(:)=ps(:)+dt*(23*dps(:)-16*dpsm1(:)+5*dpsm2(:))/12541 u(:,:)=u(:,:)+dt*(23*du(:,:)-16*dum1(:,:)+5*dum2(:,:))/12542 theta_rhodz(:,:)=theta_rhodz(:,:)+dt*(23*dtheta_rhodz(:,:)-16*dtheta_rhodzm1(:,:)+5*dtheta_rhodzm2(:,:))/12543 544 dpsm2(:)=dpsm1(:) ; dum2(:,:)=dum1(:,:) ; dtheta_rhodzm2(:,:)=dtheta_rhodzm1(:,:)545 dpsm1(:)=dps(:) ; dum1(:,:)=du(:,:) ; dtheta_rhodzm1(:,:)=dtheta_rhodz(:,:)546 547 ENDDO548 549 CALL trace_end("adam_bashforth_scheme")550 551 END SUBROUTINE adam_bashforth_scheme552 553 476 END SUBROUTINE timeloop 554 477
Note: See TracChangeset
for help on using the changeset viewer.