Ignore:
Timestamp:
12/24/16 02:33:07 (7 years ago)
Author:
dubos
Message:

Fixed RK2.5 - cleanup to follow

File:
1 edited

Legend:

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

    r413 r519  
    22  USE icosa 
    33  USE transfert_mod 
     4  USE caldyn_kernels_hevi_mod 
    45  USE caldyn_kernels_base_mod 
    56  USE caldyn_kernels_mod 
     
    190191 
    191192! temporary shared variable 
    192     REAL(rstd),POINTER  :: theta(:,: 
     193    REAL(rstd),POINTER  :: theta(:,:,: 
    193194    REAL(rstd),POINTER  :: pk(:,:) 
    194195    REAL(rstd),POINTER  :: geopot(:,:) 
     
    225226    IF(caldyn_eta==eta_mass) THEN 
    226227       CALL send_message(f_ps,req_ps) ! COM00 
     228       CALL wait_message(req_ps) ! COM00 
    227229    ELSE 
    228230       CALL send_message(f_mass,req_mass) ! COM00 
     231       CALL wait_message(req_mass) ! COM00 
    229232    END IF 
    230233     
    231234    CALL send_message(f_theta_rhodz,req_theta_rhodz) ! COM01 
     235    CALL wait_message(req_theta_rhodz) ! COM01 Moved from caldyn_pvort 
    232236    CALL send_message(f_u,req_u) ! COM02 
     237    CALL wait_message(req_u) ! COM02 
     238 
     239    IF(.NOT.hydrostatic) THEN 
     240       STOP 'caldyn_gcm may not be used yet when non-hydrostatic' 
     241    END IF 
    233242 
    234243    SELECT CASE(caldyn_conserv) 
     
    245254          qu=f_qu(ind) 
    246255          qv=f_qv(ind) 
     256          pk = f_pk(ind) 
     257          geopot = f_geopot(ind)   
     258          hflux=f_hflux(ind) 
     259          convm = f_dmass(ind) 
     260          dtheta_rhodz=f_dtheta_rhodz(ind) 
     261          du=f_du(ind) 
    247262          CALL compute_pvort(ps,u,theta_rhodz(:,:,1), mass,theta,qu,qv) ! COM00 COM01 COM02 
    248        ENDDO 
    249 !       CALL checksum(f_mass) 
    250 !       CALL checksum(f_theta) 
    251  
    252        CALL send_message(f_qu,req_qu) ! COM03 wait_message in caldyn_horiz 
    253 !       CALL wait_message(req_qu) 
     263!          CALL compute_theta(ps,theta_rhodz, mass,theta) 
     264!          CALL compute_pvort_only(u,mass,qu,qv) 
     265 
     266          CALL compute_geopot(mass,theta, ps,pk,geopot) 
     267!          du(:,:)=0. 
     268!          CALL compute_caldyn_fast(0.,u,mass,theta,pk,geopot,du) 
     269       ENDDO        
     270 
     271       CALL send_message(f_u,req_u) ! COM02 
     272       CALL wait_message(req_u) ! COM02 
     273       CALL send_message(f_qu,req_qu) ! COM03 
     274       CALL wait_message(req_qu) ! COM03 
    254275 
    255276       DO ind=1,ndomain 
     
    259280          ps=f_ps(ind) 
    260281          u=f_u(ind) 
     282          theta_rhodz = f_theta_rhodz(ind) 
    261283          mass=f_mass(ind) 
    262284          theta = f_theta(ind) 
    263285          qu=f_qu(ind) 
     286          qv=f_qv(ind) 
    264287          pk = f_pk(ind) 
    265288          geopot = f_geopot(ind)   
    266           CALL compute_geopot(ps,mass,theta, pk,geopot) 
    267289          hflux=f_hflux(ind) 
    268290          convm = f_dmass(ind) 
    269291          dtheta_rhodz=f_dtheta_rhodz(ind) 
    270292          du=f_du(ind) 
     293 
    271294          CALL compute_caldyn_horiz(u,mass,qu,theta,pk,geopot, hflux,convm,dtheta_rhodz(:,:,1),du) 
     295!          CALL compute_caldyn_slow_hydro(u,mass,hflux,du, .FALSE.) ! FIXME 
     296!          CALL compute_caldyn_Coriolis(hflux,theta,qu, convm,dtheta_rhodz,du)  
    272297          IF(caldyn_eta==eta_mass) THEN 
    273298             wflux=f_wflux(ind) 
     
    278303       ENDDO        
    279304    
    280 !       CALL checksum(f_geopot) 
    281 !       CALL checksum(f_dmass) 
    282 !       CALL checksum(f_pk) 
    283 !       CALL checksum(f_pk) 
    284         
    285305    CASE(enstrophy) ! enstrophy-conserving 
    286306       DO ind=1,ndomain 
Note: See TracChangeset for help on using the changeset viewer.