Ignore:
Timestamp:
06/09/17 16:13:47 (7 years ago)
Author:
dubos
Message:

devel : macro-generated kernels for caldyn_coriolis, compute_NH_geopot, caldyn_solver, caldyn_vert_NH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/dynamics/caldyn_kernels_base.F90

    r537 r538  
    4949 
    5050#ifdef CPP_DYSL 
     51!#if 0 
    5152#include "../kernels/compute_geopot.k90" 
    5253#else 
     
    303304    REAL(rstd),INTENT(INOUT) :: dW(iim*jjm,llm+1) 
    304305    ! local arrays 
    305     REAL(rstd) :: eta_dot(iim*jjm) ! eta_dot in full layers 
    306     REAL(rstd) :: wcov(iim*jjm) ! covariant vertical momentum in full layers 
     306    REAL(rstd) :: eta_dot(iim*jjm, llm) ! eta_dot in full layers 
     307    REAL(rstd) :: wcov(iim*jjm,llm) ! covariant vertical momentum in full layers 
    307308    REAL(rstd) :: W_etadot(iim*jjm,llm) ! vertical flux of vertical momentum 
    308309    ! indices and temporary values 
     
    312313    CALL trace_start("compute_caldyn_vert_nh") 
    313314 
     315#ifdef CPP_DYSL 
     316!#if 0 
     317#include "../kernels/caldyn_vert_NH.k90" 
     318#else 
     319#define ETA_DOT(ij) eta_dot(ij,1) 
     320#define WCOV(ij) wcov(ij,1) 
     321 
    314322    DO l=ll_begin,ll_end 
    315323       ! compute the local arrays 
     
    319327          w_ij = .5*(W(ij,l)+W(ij,l+1))/mass(ij,l) 
    320328          W_etadot(ij,l) = wflux_ij*w_ij 
    321           eta_dot(ij) = wflux_ij / mass(ij,l) 
    322           wcov(ij) = w_ij*(geopot(ij,l+1)-geopot(ij,l)) 
     329          ETA_DOT(ij) = wflux_ij / mass(ij,l) 
     330          WCOV(ij) = w_ij*(geopot(ij,l+1)-geopot(ij,l)) 
    323331       ENDDO 
    324332       ! add NH term to du 
     
    326334      DO ij=ij_begin,ij_end 
    327335          du(ij+u_right,l) = du(ij+u_right,l) & 
    328                - .5*(wcov(ij+t_right)+wcov(ij)) & 
    329                *ne_right*(eta_dot(ij+t_right)-eta_dot(ij)) 
     336               - .5*(WCOV(ij+t_right)+WCOV(ij)) & 
     337               *ne_right*(ETA_DOT(ij+t_right)-ETA_DOT(ij)) 
    330338          du(ij+u_lup,l) = du(ij+u_lup,l) & 
    331                - .5*(wcov(ij+t_lup)+wcov(ij)) & 
    332                *ne_lup*(eta_dot(ij+t_lup)-eta_dot(ij)) 
     339               - .5*(WCOV(ij+t_lup)+WCOV(ij)) & 
     340               *ne_lup*(ETA_DOT(ij+t_lup)-ETA_DOT(ij)) 
    333341          du(ij+u_ldown,l) = du(ij+u_ldown,l) & 
    334                - .5*(wcov(ij+t_ldown)+wcov(ij)) & 
    335                *ne_ldown*(eta_dot(ij+t_ldown)-eta_dot(ij)) 
     342               - .5*(WCOV(ij+t_ldown)+WCOV(ij)) & 
     343               *ne_ldown*(ETA_DOT(ij+t_ldown)-ETA_DOT(ij)) 
    336344       END DO 
    337345    ENDDO 
     
    352360       END DO 
    353361    END DO 
     362 
     363#undef ETA_DOT 
     364#undef WCOV 
     365#endif 
     366 
    354367    CALL trace_end("compute_caldyn_vert_nh") 
    355368 
Note: See TracChangeset for help on using the changeset viewer.