Changeset 4141
- Timestamp:
- May 2, 2022, 11:26:48 AM (3 years ago)
- Location:
- LMDZ6/branches/Portage_acc/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Portage_acc/libf/phylmd/phys_state_var_mod.F90
r4088 r4141 274 274 REAL,ALLOCATABLE,SAVE :: wake_deltaq(:,:) 275 275 !$OMP THREADPRIVATE(wake_deltaq) 276 !$acc declare create( wake_deltat, wake_deltaq) 276 277 #ifdef ISO 277 278 REAL, ALLOCATABLE, SAVE :: wake_deltaxt(:,:,:) … … 280 281 REAL,ALLOCATABLE,SAVE :: wake_s(:) 281 282 !$OMP THREADPRIVATE(wake_s) 283 !$acc declare create(wake_s) 282 284 REAL,ALLOCATABLE,SAVE :: awake_dens(:), wake_dens(:) 283 285 !$OMP THREADPRIVATE(awake_dens, wake_dens) -
LMDZ6/branches/Portage_acc/libf/phylmd/physiq_mod.F90
r4137 r4141 37 37 boundslon,boundslat, dx, dy, ind_cell_glo 38 38 USE indice_sol_mod, ONLY: nbsrf,is_ave, is_ter, is_oce, is_lic, is_sic 39 USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, & 40 histwrite, ju2ymds, ymds2ju 39 ! USE ioipsl, ONLY : histbeg, histvert, histdef, histend, histsync 40 ! USE ioipsl, ONLY : histwrite, ju2ymds, ymds2ju 41 USE ioipsl, ONLY : ymds2ju 41 42 USE ioipsl_getin_p_mod, ONLY : getin_p 42 43 ! USE indice_sol_mod … … 525 526 !JLD REAL znivsig(klev) 526 527 !JLD real pir 527 528 528 529 REAL u(klon,klev) 529 530 REAL v(klon,klev) … … 1263 1264 REAL pi 1264 1265 1266 !$acc data copyin (paprs, pplay) & 1267 !$acc & create(t_w, q_w, limbas, d_t_adjwk, d_q_adjwk) & 1268 !$acc & create(t_x, q_x) & 1269 !$acc & present(wake_s, wake_deltat, wake_deltaq, t_seri,q_seri) & 1270 !$acc & 1271 1272 1265 1273 pi = 4. * ATAN(1.) 1266 1274 … … 1939 1947 d_deltat_the(:,:) = 0. 1940 1948 d_deltaq_the(:,:) = 0. 1949 !$acc kernels default(none) 1941 1950 d_deltat_ajs_cv(:,:) = 0. 1942 1951 d_deltaq_ajs_cv(:,:) = 0. 1952 !$acc end kernels 1943 1953 d_s_wk(:) = 0. 1944 1954 d_dens_wk(:) = 0. … … 2954 2964 !t_w et t_x: si pas de poches froides, t_w=t_x=t_seri 2955 2965 IF (iflag_wake>=1) THEN 2956 DO k=1,klev 2966 !$acc kernels default(none) async 2967 DO k=1,klev 2957 2968 DO i=1,klon 2958 2969 t_w(i,k) = t_seri(i,k) + (1-wake_s(i))*wake_deltat(i,k) … … 2962 2973 ENDDO 2963 2974 ENDDO 2964 ELSE 2965 t_w(:,:) = t_seri(:,:) 2966 q_w(:,:) = q_seri(:,:) 2967 t_x(:,:) = t_seri(:,:) 2968 q_x(:,:) = q_seri(:,:) 2975 !$acc end kernels 2976 ELSE 2977 !$acc kernels default(none) async 2978 DO k=1,klev 2979 DO i=1,klon 2980 t_w(i,k) = t_seri(i,k) 2981 q_w(i,k) = q_seri(i,k) 2982 t_x(i,k) = t_seri(i,k) 2983 q_x(i,k) = q_seri(i,k) 2984 ENDDO 2985 ENDDO 2986 !$acc end kernels 2969 2987 ENDIF 2970 2988 ! … … 2976 2994 IF (iflag_adjwk >= 1) THEN 2977 2995 limbas(:) = 1 2996 !$acc update device(limbas) 2978 2997 CALL ajsec(paprs, pplay, t_w, q_w, limbas, & 2979 2998 d_t_adjwk, d_q_adjwk) 2999 !$acc update self(d_t_adjwk, d_q_adjwk) 2980 3000 ! 2981 DO k=1,klev 2982 DO i=1,klon 2983 IF (wake_s(i) .GT. 1.e-3) THEN 3001 IF (wake_s(i) .GT. 1.e-3) THEN 3002 !$acc kernels default(none) async 3003 DO k=1,klev 3004 DO i=1,klon 2984 3005 t_w(i,k) = t_w(i,k) + d_t_adjwk(i,k) 2985 3006 q_w(i,k) = q_w(i,k) + d_q_adjwk(i,k) 2986 3007 d_deltat_ajs_cv(i,k) = d_t_adjwk(i,k) 2987 3008 d_deltaq_ajs_cv(i,k) = d_q_adjwk(i,k) 2988 ELSE 2989 d_deltat_ajs_cv(i,k) = 0. 2990 d_deltaq_ajs_cv(i,k) = 0. 2991 ENDIF 3009 ENDDO 2992 3010 ENDDO 2993 ENDDO 3011 !$acc end kernels 3012 ELSE 3013 !$acc kernels default(none) 3014 d_deltat_ajs_cv(i,k) = 0. 3015 d_deltaq_ajs_cv(i,k) = 0. 3016 !$acc end kernels 3017 ENDIF 3018 !$acc update self(d_deltat_ajs_cv,d_deltaq_ajs_cv) 2994 3019 IF (iflag_adjwk == 2) THEN 2995 3020 CALL add_wake_tend & … … 3046 3071 !jyg iflag_con est dans clesphys 3047 3072 !c CALL concvl (iflag_con,iflag_clos, 3073 !$acc update host(t_w, q_w) 3048 3074 CALL concvl (iflag_clos, & 3049 3075 phys_tstep, paprs, pplay, k_upper_cv, t_x,q_x, & … … 3591 3617 ELSE IF (iflag_thermals>0) THEN 3592 3618 ! Calling adjustment above the top of thermal plumes 3619 !$acc update device(limbas) 3593 3620 CALL ajsec(paprs, pplay, t_seri,q_seri,limbas & 3594 3621 , d_t_ajsb, d_q_ajsb) … … 3597 3624 !-------------------------------------------------------------------- 3598 3625 ! ajout des tendances de l'ajustement sec ou des thermiques 3626 !$acc update host (d_t_ajsb, d_q_ajsb) 3599 3627 CALL add_phys_tend(du0,dv0,d_t_ajsb,d_q_ajsb,dql0,dqi0,paprs, & 3600 3628 'ajsb',abortphy,flag_inhib_tend,itap,0) … … 5424 5452 5425 5453 ! first=.false. 5426 5454 5455 !$acc end data 5427 5456 END SUBROUTINE physiq 5428 5457
Note: See TracChangeset
for help on using the changeset viewer.