- Timestamp:
- Jun 11, 2020, 11:09:39 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cva_driver.F90
r3496 r3707 41 41 USE print_control_mod, ONLY: prt_level, lunout 42 42 USE add_phys_tend_mod, ONLY: fl_cor_ebil 43 USE cv3a_compress_mod 43 44 IMPLICIT NONE 44 45 … … 542 543 !$OMP THREADPRIVATE(igout) 543 544 545 type(compress_data_t) :: compress_data 546 type(array_list) :: cv3a_compress_list, cv3a_uncompress_list 544 547 545 548 ! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,nd) … … 843 846 ! If the fraction of convective points is larger than comp_threshold, then compression 844 847 ! is assumed useless. 845 ! 846 compress = ncum .lt. len*comp_threshold 847 ! 848 IF (.not. compress) THEN 849 DO i = 1,len 850 idcum(i) = i 851 ENDDO 852 ENDIF 853 ! 854 !>jyg 855 if (prt_level >= 9) & 856 PRINT *, 'cva_driver -> cv3a_compress' 857 CALL cv3a_compress(len, nloc, ncum, nd, ntra, compress, & 858 iflag1, nk1, icb1, icbs1, & 859 plcl1, tnk1, qnk1, gznk1, hnk1, unk1, vnk1, & 860 wghti1, pbase1, buoybase1, & 861 t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, & 862 u1, v1, gz1, th1, th1_wake, & 863 tra1, & 864 h1, lv1, lf1, cpn1, p1, ph1, tv1, tp1, tvp1, clw1, & 865 h1_wake, lv1_wake, lf1_wake, cpn1_wake, tv1_wake, & 866 sig1, w01, ptop21, & 867 Ale1, Alp1, omega1, & 868 iflag, nk, icb, icbs, & 869 plcl, tnk, qnk, gznk, hnk, unk, vnk, & 870 wghti, pbase, buoybase, & 871 t, q, qs, t_wake, q_wake, qs_wake, s_wake, & 872 u, v, gz, th, th_wake, & 873 tra, & 874 h, lv, lf, cpn, p, ph, tv, tp, tvp, clw, & 875 h_wake, lv_wake, lf_wake, cpn_wake, tv_wake, & 876 sig, w0, ptop2, & 877 Ale, Alp, omega) 848 compress = ncum <= len*comp_threshold 849 850 if( compress ) then 851 compress_mode = COMPRESS_MODE_COMPRESS 852 else 853 compress_mode = COMPRESS_MODE_COPY 854 endif 855 856 if (prt_level >= 9) & 857 PRINT *, 'cva_driver -> cv3a_compress' 858 859 call add_array_i1(cv3a_compress_list, iflag1, iflag) 860 call add_array_i1(cv3a_compress_list, nk1, nk) 861 call add_array_i1(cv3a_compress_list, icb1, icb) 862 call add_array_i1(cv3a_compress_list, icbs1, icbs) 863 call add_array_r1(cv3a_compress_list, plcl1, plcl) 864 call add_array_r1(cv3a_compress_list, tnk1, tnk) 865 call add_array_r1(cv3a_compress_list, qnk1, qnk) 866 call add_array_r1(cv3a_compress_list, gznk1, gznk) 867 call add_array_r1(cv3a_compress_list, hnk1, hnk) 868 call add_array_r1(cv3a_compress_list, unk1, unk) 869 call add_array_r1(cv3a_compress_list, vnk1, vnk) 870 call add_array_r2(cv3a_compress_list, wghti1, wghti) 871 call add_array_r1(cv3a_compress_list, pbase1, pbase) 872 call add_array_r1(cv3a_compress_list, buoybase1, buoybase) 873 call add_array_r2(cv3a_compress_list, th1, th) 874 call add_array_r2(cv3a_compress_list, t1, t) 875 call add_array_r2(cv3a_compress_list, q1, q) 876 call add_array_r2(cv3a_compress_list, qs1, qs) 877 call add_array_r2(cv3a_compress_list, t1_wake, t_wake) 878 call add_array_r2(cv3a_compress_list, q1_wake, q_wake) 879 call add_array_r2(cv3a_compress_list, qs1_wake, qs_wake) 880 call add_array_r1(cv3a_compress_list, s1_wake, s_wake) 881 call add_array_r2(cv3a_compress_list, u1, u) 882 call add_array_r2(cv3a_compress_list, v1, v) 883 call add_array_r2(cv3a_compress_list, gz1, gz) 884 call add_array_r2(cv3a_compress_list, h1, h) 885 call add_array_r2(cv3a_compress_list, th1_wake, th_wake) 886 !call add_array_r3(cv3a_compress_list, tra1, tra) ! 887 call add_array_r2(cv3a_compress_list, lv1, lv) 888 call add_array_r2(cv3a_compress_list, lf1, lf) 889 call add_array_r2(cv3a_compress_list, cpn1, cpn) 890 call add_array_r2(cv3a_compress_list, p1, p) 891 call add_array_r2(cv3a_compress_list, ph1, ph) 892 call add_array_r2(cv3a_compress_list, tv1, tv) 893 call add_array_r2(cv3a_compress_list, tp1, tp) 894 call add_array_r2(cv3a_compress_list, tvp1, tvp) 895 call add_array_r2(cv3a_compress_list, clw1, clw) 896 call add_array_r2(cv3a_compress_list, h1_wake, h_wake) 897 call add_array_r2(cv3a_compress_list, lv1_wake, lv_wake) 898 call add_array_r2(cv3a_compress_list, lf1_wake, lf_wake) 899 call add_array_r2(cv3a_compress_list, cpn1_wake, cpn_wake) 900 call add_array_r2(cv3a_compress_list, tv1_wake, tv_wake) 901 call add_array_r2(cv3a_compress_list, sig1, sig) 902 call add_array_r1(cv3a_compress_list, sig1(:,nd), sig(:,nd)) 903 call add_array_r2(cv3a_compress_list, w01, w0) 904 call add_array_r1(cv3a_compress_list, ptop21, ptop2) 905 call add_array_r1(cv3a_compress_list, Ale1, Ale) 906 call add_array_r1(cv3a_compress_list, Alp1, Alp) 907 call add_array_r2(cv3a_compress_list, omega1, omega) 908 909 call cv3a_compress(len, (iflag1 == 0), cv3a_compress_list, compress_data) 910 ncum = compress_data%ncum 911 ! IF (.not. compress) THEN 912 ! DO i = 1,len 913 ! idcum(i) = i 914 ! ENDDO 915 ! ENDIF 916 ! CALL cv3a_compress_old(len, nloc, ncum, nd, ntra, compress, & 917 ! iflag1, nk1, icb1, icbs1, & 918 ! plcl1, tnk1, qnk1, gznk1, hnk1, unk1, vnk1, & 919 ! wghti1, pbase1, buoybase1, & 920 ! t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, & 921 ! u1, v1, gz1, th1, th1_wake, & 922 ! tra1, & 923 ! h1, lv1, lf1, cpn1, p1, ph1, tv1, tp1, tvp1, clw1, & 924 ! h1_wake, lv1_wake, lf1_wake, cpn1_wake, tv1_wake, & 925 ! sig1, w01, ptop21, & 926 ! Ale1, Alp1, omega1, & 927 ! iflag, nk, icb, icbs, & 928 ! plcl, tnk, qnk, gznk, hnk, unk, vnk, & 929 ! wghti, pbase, buoybase, & 930 ! t, q, qs, t_wake, q_wake, qs_wake, s_wake, & 931 ! u, v, gz, th, th_wake, & 932 ! tra, & 933 ! h, lv, lf, cpn, p, ph, tv, tp, tvp, clw, & 934 ! h_wake, lv_wake, lf_wake, cpn_wake, tv_wake, & 935 ! sig, w0, ptop2, & 936 ! Ale, Alp, omega) 878 937 879 938 ! print*,'tv ',tv … … 885 944 if (prt_level >= 9) & 886 945 PRINT *, 'cva_driver -> cv_compress' 946 ! TODO : new compress interface could be used here too 887 947 CALL cv_compress(len, nloc, ncum, nd, & 888 948 iflag1, nk1, icb1, & … … 1192 1252 1193 1253 IF (iflag_con==3) THEN 1194 if (prt_level >= 9) & 1195 PRINT *, 'cva_driver -> cv3a_uncompress' 1196 CALL cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, compress, & 1197 iflag, icb, inb, & 1198 precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & 1199 ft, fq, fu, fv, ftra, & 1200 sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & 1201 qcondc, wd, cape, cin, & 1202 tvp, & 1203 ftd, fqd, & 1204 Plim1, plim2, asupmax, supmax0, & 1205 asupmaxmin, & 1206 da, phi, mp, phi2, d1a, dam, sigij, & ! RomP 1207 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP 1208 wdtrainA, wdtrainS, wdtrainM, & ! RomP 1209 qtc, sigt, epmax_diag, & ! epmax_cape 1210 iflag1, kbas1, ktop1, & 1211 precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & 1212 ft1, fq1, fu1, fv1, ftra1, & 1213 sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & 1214 qcondc1, wd1, cape1, cin1, & 1215 tvp1, & 1216 ftd1, fqd1, & 1217 Plim11, plim21, asupmax1, supmax01, & 1218 asupmaxmin1, & 1219 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP 1220 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP 1221 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 1222 qtc1, sigt1, epmax_diag1) ! epmax_cape 1254 if (prt_level >= 9) & 1255 PRINT *, 'cva_driver -> cv3a_uncompress' 1256 call add_array_i1(cv3a_uncompress_list, iflag, iflag1) 1257 call add_array_i1(cv3a_uncompress_list, icb, icb1) 1258 call add_array_i1(cv3a_uncompress_list, inb, ktop1) 1259 call add_array_r1(cv3a_uncompress_list, precip, precip1) 1260 call add_array_r1(cv3a_uncompress_list, cbmf, cbmf1) 1261 call add_array_r1(cv3a_uncompress_list, plcl, plcl1) 1262 call add_array_r1(cv3a_uncompress_list, plfc, plfc1) 1263 call add_array_r1(cv3a_uncompress_list, wbeff, wbeff1) 1264 call add_array_r2(cv3a_uncompress_list, sig, sig1) 1265 call add_array_r2(cv3a_uncompress_list, w0, w01) 1266 call add_array_r1(cv3a_uncompress_list, ptop2, ptop21) 1267 call add_array_r2(cv3a_uncompress_list, ft, ft1) 1268 call add_array_r2(cv3a_uncompress_list, fq, fq1) 1269 call add_array_r2(cv3a_uncompress_list, fu, fu1) 1270 call add_array_r2(cv3a_uncompress_list, fv, fv1) 1271 !call add_array_r3(cv3a_uncompress_list, ftra, ftra1) 1272 call add_array_r1(cv3a_uncompress_list, sigd, sigd1) 1273 call add_array_r2(cv3a_uncompress_list, ma, ma1) 1274 call add_array_r2(cv3a_uncompress_list, mip, mip1) 1275 call add_array_r2(cv3a_uncompress_list, vprecip, vprecip1) 1276 call add_array_r2(cv3a_uncompress_list, vprecipi, vprecipi1) 1277 call add_array_r2(cv3a_uncompress_list, upwd, upwd1) 1278 call add_array_r2(cv3a_uncompress_list, dnwd, dnwd1) 1279 call add_array_r2(cv3a_uncompress_list, dnwd0, dnwd01) 1280 call add_array_r2(cv3a_uncompress_list, qcondc, qcondc1) 1281 call add_array_r1(cv3a_uncompress_list, wd, wd1) 1282 call add_array_r1(cv3a_uncompress_list, cape, cape1) 1283 call add_array_r1(cv3a_uncompress_list, cin, cin1) 1284 call add_array_r2(cv3a_uncompress_list, tvp, tvp1) 1285 call add_array_r2(cv3a_uncompress_list, ftd, ftd1) 1286 call add_array_r2(cv3a_uncompress_list, fqd, fqd1) 1287 call add_array_r1(cv3a_uncompress_list, Plim1, Plim11) 1288 call add_array_r1(cv3a_uncompress_list, plim2, plim21) 1289 call add_array_r2(cv3a_uncompress_list, asupmax, asupmax1) 1290 call add_array_r1(cv3a_uncompress_list, supmax0, supmax01) 1291 call add_array_r1(cv3a_uncompress_list, asupmaxmin, asupmaxmin1) 1292 call add_array_r2(cv3a_uncompress_list, da, da1) 1293 call add_array_r3(cv3a_uncompress_list, phi, phi1) 1294 call add_array_r2(cv3a_uncompress_list, mp, mp1) 1295 call add_array_r3(cv3a_uncompress_list, phi2, phi21) 1296 call add_array_r2(cv3a_uncompress_list, d1a, d1a1) 1297 call add_array_r2(cv3a_uncompress_list, dam, dam1) 1298 call add_array_r3(cv3a_uncompress_list, sigij, sigij1) 1299 call add_array_r2(cv3a_uncompress_list, qta, qta1) 1300 call add_array_r2(cv3a_uncompress_list, clw, clw1) 1301 call add_array_r3(cv3a_uncompress_list, elij, elij1) 1302 call add_array_r2(cv3a_uncompress_list, evap, evap1) 1303 call add_array_r2(cv3a_uncompress_list, ep, ep1) 1304 call add_array_r3(cv3a_uncompress_list, epmlmMm, epmlmMm1) 1305 call add_array_r2(cv3a_uncompress_list, eplaMm, eplaMm1) 1306 call add_array_r2(cv3a_uncompress_list, wdtrainA, wdtrainA1) 1307 call add_array_r2(cv3a_uncompress_list, wdtrainS, wdtrainS1) 1308 call add_array_r2(cv3a_uncompress_list, wdtrainM, wdtrainM1) 1309 call add_array_r2(cv3a_uncompress_list, qtc, qtc1) 1310 call add_array_r2(cv3a_uncompress_list, sigt, sigt1) 1311 call add_array_r1(cv3a_uncompress_list, epmax_diag, epmax_diag1) 1312 call add_array_r1(cv3a_uncompress_list, sig(:,nd), sig1(:,nd)) 1313 call cv3a_uncompress(len, compress_data, cv3a_uncompress_list) 1314 ! CALL cv3a_uncompress_old(nloc, len, ncum, nd, ntra, idcum, compress, & 1315 ! iflag, icb, inb, & 1316 ! precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & 1317 ! ft, fq, fu, fv, ftra, & 1318 ! sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & 1319 ! qcondc, wd, cape, cin, & 1320 ! tvp, & 1321 ! ftd, fqd, & 1322 ! Plim1, plim2, asupmax, supmax0, & 1323 ! asupmaxmin, & 1324 ! da, phi, mp, phi2, d1a, dam, sigij, & ! RomP 1325 ! qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP 1326 ! wdtrainA, wdtrainS, wdtrainM, & ! RomP 1327 ! qtc, sigt, epmax_diag, & ! epmax_cape 1328 ! iflag1, kbas1, ktop1, & 1329 ! precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & 1330 ! ft1, fq1, fu1, fv1, ftra1, & 1331 ! sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & 1332 ! qcondc1, wd1, cape1, cin1, & 1333 ! tvp1, & 1334 ! ftd1, fqd1, & 1335 ! Plim11, plim21, asupmax1, supmax01, & 1336 ! asupmaxmin1, & 1337 ! da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP 1338 ! qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP 1339 ! wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 1340 ! qtc1, sigt1, epmax_diag1) ! epmax_cape 1223 1341 ! 1224 1342 IF (prt_level >= 10) THEN
Note: See TracChangeset
for help on using the changeset viewer.