Changeset 158


Ignore:
Timestamp:
06/04/13 12:28:01 (11 years ago)
Author:
dubos
Message:

removed LeapFrog? & Adams-Bashforth from timeloop_gcm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/timeloop_gcm.f90

    r157 r158  
    243243       CASE (mlf) 
    244244          CALL  leapfrog_matsuno_scheme(stage) 
    245            
    246           !      CASE ('leapfrog') 
    247           !        CALL leapfrog_scheme 
    248           ! 
    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_scheme 
    252245       CASE DEFAULT 
    253246          STOP 
     
    432425    END SUBROUTINE RK_scheme 
    433426 
    434     SUBROUTINE leapfrog_scheme 
    435     IMPLICIT NONE 
    436       INTEGER :: ind 
    437  
    438       CALL trace_start("leapfrog_scheme") 
    439          
    440       DO ind=1,ndomain 
    441         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) THEN 
    449           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         ELSE 
    457          
    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         ENDIF 
    465            
    466       ENDDO 
    467  
    468       CALL trace_end("leapfrog_scheme") 
    469  
    470     END SUBROUTINE leapfrog_scheme   
    471   
    472427    SUBROUTINE leapfrog_matsuno_scheme(stage) 
    473428    IMPLICIT NONE 
     
    519474    END SUBROUTINE leapfrog_matsuno_scheme   
    520475          
    521     SUBROUTINE adam_bashforth_scheme 
    522     IMPLICIT NONE 
    523       INTEGER :: ind 
    524  
    525       CALL trace_start("adam_bashforth_scheme") 
    526  
    527       DO ind=1,ndomain 
    528         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) THEN 
    536           dpsm1(:)=dps(:) ; dum1(:,:)=du(:,:) ; dtheta_rhodzm1(:,:)=dtheta_rhodz(:,:) 
    537           dpsm2(:)=dpsm1(:) ; dum2(:,:)=dum1(:,:) ; dtheta_rhodzm2(:,:)=dtheta_rhodzm1(:,:) 
    538         ENDIF 
    539                
    540         ps(:)=ps(:)+dt*(23*dps(:)-16*dpsm1(:)+5*dpsm2(:))/12 
    541         u(:,:)=u(:,:)+dt*(23*du(:,:)-16*dum1(:,:)+5*dum2(:,:))/12 
    542         theta_rhodz(:,:)=theta_rhodz(:,:)+dt*(23*dtheta_rhodz(:,:)-16*dtheta_rhodzm1(:,:)+5*dtheta_rhodzm2(:,:))/12 
    543  
    544         dpsm2(:)=dpsm1(:) ; dum2(:,:)=dum1(:,:) ; dtheta_rhodzm2(:,:)=dtheta_rhodzm1(:,:) 
    545         dpsm1(:)=dps(:) ; dum1(:,:)=du(:,:) ; dtheta_rhodzm1(:,:)=dtheta_rhodz(:,:) 
    546  
    547       ENDDO      
    548  
    549       CALL trace_end("adam_bashforth_scheme") 
    550        
    551     END SUBROUTINE adam_bashforth_scheme 
    552  
    553476  END SUBROUTINE timeloop     
    554477 
Note: See TracChangeset for help on using the changeset viewer.