Changeset 4166
- Timestamp:
- May 27, 2022, 5:45:46 PM (2 years ago)
- Location:
- LMDZ6/branches/Portage_acc/libf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Portage_acc/libf/dyn3d/driver.F90
r4152 r4166 24 24 25 25 INTEGER :: ngrid ! # of grid points on physics grid = 2+(jjm-1)*iim-1/jjm 26 INTEGER :: ig,l 26 27 27 28 ! REAL, PARAMETER :: unjours=86400., & ! solar day in seconds … … 169 170 ALLOCATE(pq(ngrid,llm,nqtot)) ! tracers 170 171 171 !$acc data create(pplev, pplay, pphi, pphis, pt, pu, pv, pq, pr)172 173 172 CALL init_temperature_pressure_geopot(ps,masse,teta,phis, & 174 173 ngrid,pplev,pplay,pphi,pphis,pt) … … 178 177 ! 3. Temporal loop 179 178 179 ! First time on GPU 180 !$acc data create(pplev, pplay, pphi, pphis, pt, pu, pv, pq, pr) 181 180 182 CALL timeloop(ngrid,llm,nqtot,nday,day_step/iphysiq,dtphys,& 181 183 pplev,pplay,pphi,pphis,& … … 183 185 184 186 !$acc end data 187 188 ! output final state as plain text file 189 open(10,file="driver.dat") 190 do ig=1,ngrid 191 do l=1,llm 192 write(10,"(I5,I3,X,20(1PE15.8,X))") & 193 ig,l,pu(ig,l),pv(ig,l),pt(ig,l)!,pq(ig,l,1:nqtot) 194 enddo 195 enddo 196 close(10) 185 197 186 198 write(*,*)"driver: Everything is cool :-)" -
LMDZ6/branches/Portage_acc/libf/phylmd/ajsec.F90
r4132 r4166 15 15 ! ====================================================================== 16 16 include "YOMCST.h" 17 REAL paprs(klon, klev+1), pplay(klon, klev) 18 REAL t(klon, klev), q(klon, klev) 19 REAL d_t(klon, klev), d_q(klon, klev) 20 21 INTEGER limbas(klon), limhau ! les couches a ajuster 17 REAL,INTENT(IN) :: paprs(klon, klev+1), pplay(klon, klev) 18 REAL,INTENT(IN) :: t(klon, klev), q(klon, klev) 19 REAL,INTENT(OUT) :: d_t(klon, klev), d_q(klon, klev) 20 21 INTEGER,INTENT(IN) :: limbas(klon) 22 INTEGER :: limhau ! les couches a ajuster 22 23 23 24 LOGICAL mixq -
LMDZ6/branches/Portage_acc/libf/phylmd/physiq_mod.F90
r4150 r4166 519 519 ! NB: pdtphys to be used in physics is in time_phylmdz_mod 520 520 LOGICAL debut, lafin 521 REAL paprs(klon,klev+1)522 REAL pplay(klon,klev)523 REAL pphi(klon,klev)524 REAL pphis(klon)525 REAL presnivs(klev)521 REAL,INTENT(IN) :: paprs(klon,klev+1) 522 REAL,INTENT(IN) :: pplay(klon,klev) 523 REAL,INTENT(IN) :: pphi(klon,klev) 524 REAL,INTENT(IN) :: pphis(klon) 525 REAL,INTENT(IN) :: presnivs(klev) 526 526 !JLD REAL znivsig(klev) 527 527 !JLD real pir 528 528 529 REAL u(klon,klev) 530 REAL v(klon,klev) 531 529 REAL,INTENT(IN) :: u(klon,klev) 530 REAL,INTENT(IN) :: v(klon,klev) 532 531 REAL, intent(in):: rot(klon, klev) 533 532 ! relative vorticity, in s-1, needed for frontal waves 534 535 REAL t(klon,klev),thetal(klon,klev) 533 REAL t(klon,klev) 534 535 REAL thetal(klon,klev) 536 536 ! thetal: ligne suivante a decommenter si vous avez les fichiers 537 537 ! MPL 20130625 … … 539 539 ! sinon thetal=theta 540 540 ! REAL fth_thetae,fth_thetav,fth_thetal 541 REAL qx(klon,klev,nqtot) 542 REAL flxmass_w(klon,klev) 543 REAL d_u(klon,klev) 544 REAL d_v(klon,klev) 545 REAL d_t(klon,klev) 546 REAL d_qx(klon,klev,nqtot) 547 REAL d_ps(klon) 541 REAL,INTENT(IN) :: qx(klon,klev,nqtot) 542 REAL,INTENT(IN) :: flxmass_w(klon,klev) 543 544 REAL,INTENT(OUT) :: d_u(klon,klev) 545 REAL,INTENT(OUT) :: d_v(klon,klev) 546 REAL,INTENT(OUT) :: d_t(klon,klev) 547 REAL,INTENT(OUT) :: d_qx(klon,klev,nqtot) 548 REAL,INTENT(OUT) :: d_ps(klon) 548 549 ! variables pour tend_to_tke 549 550 REAL duadd(klon,klev) … … 1264 1265 REAL pi 1265 1266 1266 !$acc data copyin (paprs, pplay) & 1267 !$acc data copyin(paprs,pplay,pphi,pphis,presnivs) & 1268 !$acc & copyin(u,v) & 1269 !$acc & copyin(rot,t) & 1270 !$acc & copyin(qx,flxmass_w) & 1271 !$acc & copyout(d_u,d_v,d_t,d_qx,d_ps) & 1267 1272 !$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 & 1273 !$acc & create(t_x, q_x) 1274 ! !$acc & present(wake_s, wake_deltat, wake_deltaq) & 1275 ! !$acc & present(t_seri,q_seri) 1271 1276 1272 1277 … … 2319 2324 ! Ne pas affecter les valeurs entrees de u, v, h, et q 2320 2325 ! 2326 !$acc kernels default(none) 2321 2327 DO k = 1, klev 2322 2328 DO i = 1, klon … … 2339 2345 ENDDO 2340 2346 ENDDO 2347 !$acc end kernels 2348 !temporary, update CPU 2349 !$acc update self (t_seri,u_seri,v_seri,q_seri,ql_seri,qs_seri,rneb_seri) 2341 2350 ! 2342 2351 !--OB mass fixer … … 2963 2972 !ajout pour la parametrisation des poches froides: calcul de 2964 2973 !t_w et t_x: si pas de poches froides, t_w=t_x=t_seri 2974 ! temporary , update on device 2975 !$acc update device (t_seri, q_seri, wake_s, wake_deltat, wake_deltaq) 2965 2976 IF (iflag_wake>=1) THEN 2966 2977 !$acc kernels default(none) async … … 2994 3005 IF (iflag_adjwk >= 1) THEN 2995 3006 limbas(:) = 1 2996 !$acc update device(limbas )3007 !$acc update device(limbas,wake_s) 2997 3008 CALL ajsec(paprs, pplay, t_w, q_w, limbas, & 2998 3009 d_t_adjwk, d_q_adjwk) … … 3070 3081 !jyg iflag_con est dans clesphys 3071 3082 !c CALL concvl (iflag_con,iflag_clos, 3072 !$acc update host(t_w, q_w) 3083 ! temporary, put data on CPU 3084 !$acc update self(t_w, q_w, t_x, q_x) 3073 3085 CALL concvl (iflag_clos, & 3074 3086 phys_tstep, paprs, pplay, k_upper_cv, t_x,q_x, & … … 3616 3628 ELSE IF (iflag_thermals>0) THEN 3617 3629 ! Calling adjustment above the top of thermal plumes 3618 !$acc update device( limbas)3630 !$acc update device(t_seri,q_seri,limbas) 3619 3631 CALL ajsec(paprs, pplay, t_seri,q_seri,limbas & 3620 3632 , d_t_ajsb, d_q_ajsb) … … 3623 3635 !-------------------------------------------------------------------- 3624 3636 ! ajout des tendances de l'ajustement sec ou des thermiques 3637 ! temporary, update CPU 3625 3638 !$acc update host (d_t_ajsb, d_q_ajsb) 3626 3639 CALL add_phys_tend(du0,dv0,d_t_ajsb,d_q_ajsb,dql0,dqi0,paprs, &
Note: See TracChangeset
for help on using the changeset viewer.