Ignore:
Timestamp:
05/28/16 00:32:21 (8 years ago)
Author:
dubos
Message:

Infrastructure for multiple dynamical tracers - tested with JW06 and moist baroclinic wave

File:
1 edited

Legend:

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

    r371 r387  
    8080             CALL update_2D(bjl(l,j), f_ps, f_dps_slow(:,l)) 
    8181          ELSE 
    82              CALL update(bjl(l,j), f_mass, f_dmass_slow(:,l)) 
     82             CALL update_3D(bjl(l,j), f_mass, f_dmass_slow(:,l)) 
    8383          END IF 
    84           CALL update(bjl(l,j), f_theta_rhodz, f_dtheta_rhodz_slow(:,l)) 
    85           CALL update(bjl(l,j), f_u, f_du_slow(:,l)) 
    86           CALL update(cjl(l,j), f_u, f_du_fast(:,l)) 
     84          CALL update_4D(bjl(l,j), f_theta_rhodz, f_dtheta_rhodz_slow(:,l)) 
     85          CALL update_3D(bjl(l,j), f_u, f_du_slow(:,l)) 
     86          CALL update_3D(cjl(l,j), f_u, f_du_fast(:,l)) 
    8787          IF(.NOT. hydrostatic) THEN 
    88              CALL update(bjl(l,j), f_W, f_dW_slow(:,l)) 
    89              CALL update(cjl(l,j), f_W, f_dW_fast(:,l)) 
    90              CALL update(bjl(l,j), f_geopot, f_dPhi_slow(:,l)) 
    91              CALL update(cjl(l,j), f_geopot, f_dPhi_fast(:,l)) 
     88             CALL update_3D(bjl(l,j), f_W, f_dW_slow(:,l)) 
     89             CALL update_3D(cjl(l,j), f_W, f_dW_fast(:,l)) 
     90             CALL update_3D(bjl(l,j), f_geopot, f_dPhi_slow(:,l)) 
     91             CALL update_3D(cjl(l,j), f_geopot, f_dPhi_fast(:,l)) 
    9292          END IF 
    9393       END DO 
     
    9696  END SUBROUTINE HEVI_scheme 
    9797   
    98   SUBROUTINE update(w, f_y, f_dy) 
     98  SUBROUTINE update_4D(w, f_y, f_dy) 
     99    USE dimensions 
     100    USE grid_param, ONLY : nqdyn 
     101    REAL(rstd) :: w 
     102    TYPE(t_field) :: f_y(:), f_dy(:) 
     103    REAL(rstd), POINTER :: y(:,:,:), dy(:,:,:) 
     104    INTEGER :: ind, iq 
     105    IF(w /= 0.) THEN 
     106       DO ind=1,ndomain 
     107          IF (.NOT. assigned_domain(ind)) CYCLE 
     108          CALL swap_dimensions(ind) 
     109          dy=f_dy(ind); y=f_y(ind) 
     110          DO iq=1,nqdyn 
     111             CALL compute_update_3D(w,y(:,:,iq),dy(:,:,iq)) 
     112          END DO 
     113       ENDDO 
     114    END IF 
     115  END SUBROUTINE update_4D 
     116     
     117  SUBROUTINE update_3D(w, f_y, f_dy) 
    99118    USE dimensions 
    100119    REAL(rstd) :: w 
     
    107126          CALL swap_dimensions(ind) 
    108127          dy=f_dy(ind); y=f_y(ind) 
    109           CALL compute_update(w,y,dy) 
     128          CALL compute_update_3D(w,y,dy) 
    110129       ENDDO 
    111130    END IF 
    112   END SUBROUTINE update 
     131  END SUBROUTINE update_3D 
    113132     
    114   SUBROUTINE compute_update(w, y, dy) 
     133  SUBROUTINE compute_update_3D(w, y, dy) 
    115134    USE omp_para 
    116135    USE disvert_mod 
     
    123142       y(:,l)=y(:,l)+w*dy(:,l) 
    124143    ENDDO 
    125   END SUBROUTINE compute_update 
     144  END SUBROUTINE compute_update_3D 
    126145   
    127146  SUBROUTINE update_2D(w, f_y, f_dy) 
Note: See TracChangeset for help on using the changeset viewer.