Changeset 230
- Timestamp:
- Jun 20, 2001, 3:29:52 PM (24 years ago)
- Location:
- LMDZ.3.3/branches/rel-LF/libf/phylmd
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/phylmd/YOMCST.inc
r112 r230 20 20 REAL :: RALPD,RBETD,RGAMD 21 21 ! 22 COMMON/YOMCST/RPI ,RCLUM ,RHPLA ,RKBOL ,RNAVO & 23 & ,RDAY ,REA ,REPSM ,RSIYEA,RSIDAY,ROMEGA & 24 & ,R_ecc, R_peri, R_incl & 25 & ,RA ,RG ,R1SA & 26 & ,RSIGMA,RI0 & 27 & ,R ,RMD ,RMV ,RD ,RV ,RCPD & 28 & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV & 29 & ,RCW ,RCS & 30 & ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM & 31 & ,RESTT ,RALPW ,RBETW ,RGAMW ,RALPS ,RBETS ,RGAMS & 32 & ,RALPD ,RBETD ,RGAMD 22 COMMON/YOMCST/RPI ,RCLUM, RHPLA, RKBOL, RNAVO ,RDAY ,REA & 23 & ,REPSM ,RSIYEA,RSIDAY,ROMEGA ,R_ecc, R_peri, R_incl, RA ,RG & 24 & ,R1SA ,RSIGMA,RI0,R ,RMD ,RMV ,RD ,RV ,RCPD ,RCPV,RCVD & 25 & ,RCVV ,RKAPPA,RETV ,RCW ,RCS ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM & 26 & ,RESTT ,RALPW ,RBETW ,RGAMW ,RALPS ,RBETS ,RGAMS ,RALPD ,RBETD ,RGAMD -
LMDZ.3.3/branches/rel-LF/libf/phylmd/clmain.F
r223 r230 1 c 2 c $Header$ 3 c 4 1 5 SUBROUTINE clmain(dtime,itap,date0,pctsrf, 2 6 . t,q,u,v, … … 728 732 ENDDO 729 733 ENDDO 730 731 734 DO i = 1, knon 732 735 zx_buf1(i) = zx_coef(i,klev) + delp(i,klev) -
LMDZ.3.3/branches/rel-LF/libf/phylmd/condsurf.F
r98 r230 1 c $Header$ 2 c 1 3 SUBROUTINE condsurf( jour, jourvrai, pctsrf, 2 4 s lmt_sst,lmt_alb,lmt_rug,lmt_bils ) -
LMDZ.3.3/branches/rel-LF/libf/phylmd/conflx.F
r79 r230 103 103 DO k = 1, klev+1 104 104 DO i = 1, klon 105 pmflxr(i,k) = 0.0106 pmflxs(i,k) = 0.0105 zmflxr(i,k) = 0.0 106 zmflxs(i,k) = 0.0 107 107 ENDDO 108 108 ENDDO … … 981 981 ENDDO 982 982 c 983 ldcum(1)=ldcum(1) 984 c 983 985 is = 0 984 986 DO i = 1, klon … … 1039 1041 REAL plude(klon,klev) 1040 1042 REAL pdmfup(klon,klev), pdpmel(klon,klev) 1041 REAL pdmfdp(klon,klev) 1043 cjq The variable maxpdmfdp(klon) has been introduced by Olivier Boucher 1044 cjq 14/11/00 to fix the problem with the negative precipitation. 1045 REAL pdmfdp(klon,klev), maxpdmfdp(klon,klev) 1042 1046 REAL prfl(klon), psfl(klon) 1043 1047 REAL pmflxr(klon,klev+1), pmflxs(klon,klev+1) 1044 1048 INTEGER kcbot(klon), kctop(klon), ktype(klon) 1045 1049 LOGICAL ldland(klon), ldcum(klon) 1046 INTEGER k, i1050 INTEGER k, kp, i 1047 1051 REAL zcons1, zcons2, zcucov, ztmelp2 1048 1052 REAL pdtime, zdp, zzp, zfac, zsnmlt, zrfl, zrnew … … 1160 1164 ENDIF 1161 1165 IF (pten(i,k).GT.RTT) THEN 1162 pmflxr(i,k+1)=pmflxr(i,k)+pdmfup(i,k)+pdmfdp(i,k)+pdpmel(i,k) 1166 pmflxr(i,k+1)=pmflxr(i,k)+pdmfup(i,k)+pdmfdp(i,k)+pdpmel(i,k) 1167 pmflxs(i,k+1)=pmflxs(i,k)-pdpmel(i,k) 1163 1168 ELSE 1164 pmflxs(i,k+1)=pmflxs(i,k)+pdmfup(i,k)+pdmfdp(i,k)-pdpmel(i,k) 1169 pmflxs(i,k+1)=pmflxs(i,k)+pdmfup(i,k)+pdmfdp(i,k) 1170 pmflxr(i,k+1)=pmflxr(i,k) 1165 1171 ENDIF 1166 1172 c si la precipitation est negative, on ajuste le plux du … … 1176 1182 ENDDO 1177 1183 c 1184 cjq The new variable is initialized here. 1185 cjq It contains the humidity which is fed to the downdraft 1186 cjq by evaporation of precipitation in the column below the base 1187 cjq of convection. 1188 cjq 1189 cjq In the former version, this term has been subtracted from precip 1190 cjq as well as the evaporation. 1191 cjq 1192 DO k = 1, klev 1193 DO i = 1, klon 1194 maxpdmfdp(i,k)=0.0 1195 ENDDO 1196 ENDDO 1197 DO k = 1, klev 1198 DO kp = k, klev 1199 DO i = 1, klon 1200 maxpdmfdp(i,k)=maxpdmfdp(i,k)+pdmfdp(i,kp) 1201 ENDDO 1202 ENDDO 1203 ENDDO 1204 cjq End of initialization 1205 c 1178 1206 DO k = ktopm2, klev 1179 1207 DO i = 1, klon … … 1189 1217 zrfln=MAX(zrnew,0.) 1190 1218 zdrfl=MIN(0.,zrfln-zrfl) 1219 cjq At least the amount of precipiation needed to feed the downdraft 1220 cjq with humidity below the base of convection has to be left and can't 1221 cjq be evaporated (surely the evaporation can't be positive): 1222 zdrfl=MAX(zdrfl, 1223 . MIN(-pmflxr(i,k)-pmflxs(i,k)-maxpdmfdp(i,k),0.0)) 1224 cjq End of insertion 1225 c 1191 1226 zdenom=1.0/MAX(1.0E-20,pmflxr(i,k)+pmflxs(i,k)) 1192 1227 IF (pten(i,k).GT.RTT) THEN … … 1207 1242 pdmfdp(i,k) = 0.0 1208 1243 pdpmel(i,k) = 0.0 1209 ENDIF 1244 ENDIF 1245 if (pmflxr(i,k) + pmflxs(i,k).lt.-1.e-26) 1246 . write(*,*) 'precip. < 1e-16 ',pmflxr(i,k) + pmflxs(i,k) 1210 1247 ENDIF 1211 1248 ENDDO -
LMDZ.3.3/branches/rel-LF/libf/phylmd/fisrtilp_tr.F
r79 r230 1 SUBROUTINE fisrtilp_tr(dtime,paprs,pplay,t,q, 1 c $Header$ 2 c 3 SUBROUTINE fisrtilp_tr(dtime,paprs,pplay,t,q,ratqs, 2 4 s d_t, d_q, d_ql, rneb, radliq, rain, snow, 3 5 s pfrac_impa, pfrac_nucl, pfrac_1nucl, … … 66 68 PARAMETER (coef_eva=2.0E-05) 67 69 LOGICAL calcrat ! calculer ratqs au lieu de fixer sa valeur 68 REAL ratqs ! determine la largeur de distribution de vapeur70 REAL ratqs(klon,klev) ! determine la largeur de distribution de vapeur 69 71 PARAMETER (calcrat=.TRUE.) 70 72 REAL zx_min, rat_max … … 281 283 DO i = 1, klon 282 284 c 283 zx = pplay(i,k)/paprs(i,1) 284 zx = (zx_max-zx)/(zx_max-zx_min) 285 zx = MIN(MAX(zx,0.0),1.0) 286 zx = zx * zx * zx 287 ratqs = zx * (rat_max-rat_min) + rat_min 288 IF (.NOT.calcrat) ratqs=0.05 289 c 290 zdelq = ratqs * zq(i) 285 zdelq = ratqs(i,k) * zq(i) 291 286 rneb(i,k) = (zq(i)+zdelq-zqs(i)) / (2.0*zdelq) 292 287 zqn(i) = (zq(i)+zdelq+zqs(i))/2.0 -
LMDZ.3.3/branches/rel-LF/libf/phylmd/indicesol.inc
r118 r230 1 INTEGER, parameter :: nbsrf=41 INTEGER, parameter :: nbsrf=4 2 2 INTEGER, parameter :: is_oce=3 !ocean 3 3 INTEGER, parameter :: is_sic = 4 ! glace de mer -
LMDZ.3.3/branches/rel-LF/libf/phylmd/initphysto.F
r79 r230 1 C 2 C $Header$ 3 C 1 4 subroutine initphysto 2 5 . (infile, … … 133 136 . "once", t_ops, t_wrt) 134 137 138 C T 139 C 140 call histdef(fileid, 't', 'Temperature', 'K', 141 . iim, jjm+1, nhoriid, llm, 1, llm, zvertiid, 142 . 32, 'inst(X)', t_ops, t_wrt) 143 write(*,*) 'apres t ds initphysto' 135 144 C mfu 136 145 C … … 234 243 . 32, "inst(X)", t_ops, t_wrt) 235 244 236 245 c 246 c rain 247 c 248 call histdef(fileid, "rain", " ", " ", 249 . iim, jjm+1, nhoriid, 1, 1,1, -99, 250 . 32, "inst(X)", t_ops, t_wrt) 251 237 252 c 238 253 c psrf1 -
LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
r223 r230 281 281 SAVE agesno ! age de la neige 282 282 c 283 REAL alb_neig(klon) 284 SAVE alb_neig ! albedo de la neige 285 cKE43 286 c Variables liees a la convection de K. Emanuel (sb): 287 c 288 REAL ema_workcbmf(klon) ! cloud base mass flux 289 SAVE ema_workcbmf 290 291 REAL ema_cbmf(klon) ! cloud base mass flux 292 SAVE ema_cbmf 293 294 REAL ema_pcb(klon) ! cloud base pressure 295 SAVE ema_pcb 296 297 REAL ema_pct(klon) ! cloud top pressure 298 SAVE ema_pct 299 300 REAL bas, top ! cloud base and top levels 301 SAVE bas 302 SAVE top 303 304 REAL Ma(klon,klev) ! undilute upward mass flux 305 SAVE Ma 306 REAL ema_work1(klon, klev), ema_work2(klon, klev) 307 SAVE ema_work1, ema_work2 308 REAL wdn(klon), tdn(klon), qdn(klon) 309 c Variables locales pour la couche limite (al1): 310 c 311 cAl1 REAL pblh(klon) ! Hauteur de couche limite 312 cAl1 SAVE pblh 313 c34EK 283 314 c 284 315 c Variables locales: … … 346 377 EXTERNAL condsurf ! lire les conditions aux limites 347 378 EXTERNAL conlmd ! convection (schema LMD) 379 cKE43 380 EXTERNAL conema ! convect4.3 348 381 EXTERNAL fisrtilp ! schema de condensation a grande echelle (pluie) 349 382 cAA … … 426 459 c 427 460 REAL zphi(klon,klev) 461 REAL zx_tmp_x(iim), zx_tmp_yjjmp1 462 REAL zx_relief(iim,jjmp1) 463 REAL zx_aire(iim,jjmp1) 464 cKE43 465 c Variables locales pour la convection de K. Emanuel (sb): 466 c 467 REAL upwd(klon,klev) ! saturated updraft mass flux 468 REAL dnwd(klon,klev) ! saturated downdraft mass flux 469 REAL dnwd0(klon,klev) ! unsaturated downdraft mass flux 470 REAL tvp(klon,klev) ! virtual temp of lifted parcel 471 REAL cape(klon) ! CAPE 472 SAVE cape 473 REAL pbase(klon) ! cloud base pressure 474 SAVE pbase 475 REAL bbase(klon) ! cloud base buoyancy 476 SAVE bbase 477 REAL rflag(klon) ! flag fonctionnement de convect 478 c -- convect43: 479 INTEGER ntra ! nb traceurs pour convect4.3 480 REAL pori_con(klon) ! pressure at the origin level of lifted parcel 481 REAL plcl_con(klon),dtma_con(klon),dtlcl_con(klon) 482 REAL dtvpdt1(klon,klev), dtvpdq1(klon,klev) 483 REAL dplcldt(klon), dplcldr(klon) 484 c? . condm_con(klon,klev),conda_con(klon,klev), 485 c? . mr_con(klon,klev),ep_con(klon,klev) 486 c? . ,sadiab(klon,klev),wadiab(klon,klev) 487 c -- 488 c34EK 428 489 c 429 490 c Variables du changement … … 460 521 REAL d_u_lif(klon,klev), d_v_lif(klon,klev) 461 522 REAL d_t_lif(klon,klev) 523 524 REAL ratqs(klon,klev) 525 LOGICAL zpt_conv(klon,klev) 526 462 527 c 463 528 c Variables liees a l'ecriture de la bande histoire physique … … 595 660 PRINT*, "Clef pour la convection, iflag_con=", iflag_con 596 661 c 662 cKE43 663 c Initialisation pour la convection de K.E. (sb): 664 IF (iflag_con.EQ.4) THEN 665 666 PRINT*, "*** Convection de Kerry Emanuel 4.3 " 667 PRINT*, "On va utiliser le melange convectif des traceurs qui" 668 PRINT*, "est calcule dans convect4.3" 669 PRINT*, " !!! penser aux logical flags de phytrac" 670 671 DO i = 1, klon 672 ema_cbmf(i) = 0. 673 ema_pcb(i) = 0. 674 ema_pct(i) = 0. 675 ema_workcbmf(i) = 0. 676 ENDDO 677 ENDIF 678 c34EK 597 679 IF (ok_orodr) THEN 598 680 DO i=1,klon … … 665 747 . 1,iim,1,jjmp1, 0, zjulian, dtime, 666 748 . nhori, nid_day) 667 cCALL histvert(nid_day, "presnivs", "Vertical levels", "mb",668 c. klev, presnivs, nvert)669 670 749 CALL histvert(nid_day, "presnivs", "Vertical levels", "mb", 750 . klev, presnivs, nvert) 751 c call histvert(nid_day, 'sig_s', 'Niveaux sigma','-', 752 c . klev, znivsig, nvert) 671 753 c 672 754 zsto = dtime … … 888 970 . 1,iim,1,jjmp1, 0, zjulian, dtime, 889 971 . nhori, nid_mth) 890 cCALL histvert(nid_mth, "presnivs", "Vertical levels", "mb",891 c. klev, presnivs, nvert)892 893 972 CALL histvert(nid_mth, "presnivs", "Vertical levels", "mb", 973 . klev, presnivs, nvert) 974 c call histvert(nid_mth, 'sig_s', 'Niveaux sigma','-', 975 c . klev, znivsig, nvert) 894 976 c 895 977 zsto = dtime … … 1097 1179 . "ave(X)", zsto,zout) 1098 1180 c 1181 cKE43 1182 IF (iflag_con .EQ. 4) THEN ! sb 1183 c 1184 CALL histdef(nid_mth, "cape", "Conv avlbl pot ener", "J/Kg", 1185 . iim,jjmp1,nhori, 1,1,1, -99, 32, 1186 . "ave(X)", zsto,zout) 1187 c 1188 CALL histdef(nid_mth, "pbase", "Cld base pressure", "hPa", 1189 . iim,jjmp1,nhori, 1,1,1, -99, 32, 1190 . "ave(X)", zsto,zout) 1191 c 1192 CALL histdef(nid_mth, "ptop", "Cld top pressure", "hPa", 1193 . iim,jjmp1,nhori, 1,1,1, -99, 32, 1194 . "ave(X)", zsto,zout) 1195 c 1196 CALL histdef(nid_mth, "fbase", "Cld base mass flux", "Kg/m2/s", 1197 . iim,jjmp1,nhori, 1,1,1, -99, 32, 1198 . "ave(X)", zsto,zout) 1199 c 1200 c 1201 ENDIF 1202 c34EK 1203 c 1099 1204 c Champs 3D: 1100 1205 c … … 1178 1283 . iim,jjmp1,nhori, klev,1,klev,nvert, 32, 1179 1284 . "ave(X)", zsto,zout) 1285 1286 CALL histdef(nid_mth, "ptconv", "POINTS CONVECTIFS"," ", 1287 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 1288 . "ave(X)", zsto,zout) 1289 1290 CALL histdef(nid_mth, "ratqs", "RATQS"," ", 1291 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 1292 . "ave(X)", zsto,zout) 1293 1180 1294 c 1181 1295 CALL histdef(nid_mth, "dtajs", "Dry adjust. dT", "K/s", … … 1250 1364 ENDIF 1251 1365 c 1366 cKE43 1367 IF (iflag_con.EQ.4) THEN ! (sb) 1368 c 1369 CALL histdef(nid_mth, "upwd", "saturated updraft", "Kg/m2/s", 1370 . iim,jjmp1,nhori, klev,1,klev,nvert, 32, 1371 . "ave(X)", zsto,zout) 1372 c 1373 CALL histdef(nid_mth, "dnwd", "saturated downdraft","Kg/m2/s", 1374 . iim,jjmp1,nhori, klev,1,klev,nvert, 32, 1375 . "ave(X)", zsto,zout) 1376 c 1377 CALL histdef(nid_mth, "dnwd0", "unsat. downdraft", "Kg/m2/s", 1378 . iim,jjmp1,nhori, klev,1,klev,nvert, 32, 1379 . "ave(X)", zsto,zout) 1380 c 1381 CALL histdef(nid_mth,"Ma","undilute adiab updraft","Kg/m2/s", 1382 . iim,jjmp1,nhori, klev,1,klev,nvert, 32, 1383 . "ave(X)", zsto,zout) 1384 c 1385 c 1386 ENDIF 1387 c34EK 1252 1388 CALL histend(nid_mth) 1253 1389 c … … 1275 1411 . 1,iim,1,jjmp1, 0, zjulian, dtime, 1276 1412 . nhori, nid_ins) 1277 cCALL histvert(nid_ins, "presnivs", "Vertical levels", "mb",1278 c. klev, presnivs, nvert)1279 1280 1413 CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", 1414 . klev, presnivs, nvert) 1415 c call histvert(nid_ins, 'sig_s', 'Niveaux sigma','-', 1416 c . klev, znivsig, nvert) 1281 1417 c 1282 1418 c … … 1685 1821 c 1686 1822 DO nsrf = 1, nbsrf 1687 DO i = 1, klon1688 IF (pctsrf(i,nsrf).LT.epsfra) ftsol(i,nsrf) = zxtsol(i)1689 ENDDO1823 DO i = 1, klon 1824 IF (pctsrf(i,nsrf) .LT. epsfra) ftsol(i,nsrf) = zxtsol(i) 1825 ENDDO 1690 1826 ENDDO 1691 1827 … … 1750 1886 c s d_t_con, d_q_con, 1751 1887 c s rain_con, snow_con, ibas_con, itop_con) 1888 cKE43 1889 ELSE IF (iflag_con.EQ.4) THEN 1890 c nb of tracers for the KE convection: 1891 if (nqmax .GE. 4) then 1892 ntra = nbtr 1893 else 1894 ntra = 1 1895 endif 1896 cke43 (arguments inutiles enleves => des SAVE dans conema43?) 1897 c$$$ CALL conema43(dtime,paprs,pplay,t_seri,q_seri, 1898 c$$$ $ u_seri,v_seri,tr_seri,nbtr, 1899 c$$$ . ema_workcbmf, 1900 c$$$ . d_t_con,d_q_con,d_u_con,d_v_con,d_tr, 1901 c$$$ . wdn, tdn, qdn, 1902 c$$$ . rain_con, snow_con, ibas_con, itop_con, 1903 c$$$ . upwd,dnwd,dnwd0,bas,top,Ma,cape,tvp,rflag, 1904 c$$$ . pbase 1905 c$$$ . ,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr, 1906 c$$$ . pori_con,plcl_con,dtma_con,dtlcl_con) 1907 CALL conema (dtime,paprs,pplay,t_seri,q_seri, 1908 $ u_seri,v_seri,tr_seri,nbtr, 1909 . ema_work1,ema_work2, 1910 . d_t_con,d_q_con,d_u_con,d_v_con,d_tr, 1911 c$$$ . wdn, tdn, qdn, 1912 . rain_con, snow_con, ibas_con, itop_con, 1913 . upwd,dnwd,dnwd0,bas,top,Ma,cape,tvp,rflag, 1914 . pbase 1915 . ,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr) 1916 c$$$ . pori_con,plcl_con,dtma_con,dtlcl_con) 1917 DO i = 1, klon 1918 ema_pcb(i) = pbase(i) 1919 ENDDO 1920 DO i = 1, klon 1921 ema_pct(i) = paprs(i,itop_con(i)) 1922 ENDDO 1923 DO i = 1, klon 1924 ema_cbmf(i) = ema_workcbmf(i) 1925 ENDDO 1752 1926 ELSE 1753 PRINT*, "iflag_con non-prevu", iflag_con1754 CALL abort1927 PRINT*, "iflag_con non-prevu", iflag_con 1928 CALL abort 1755 1929 ENDIF 1756 1930 … … 1766 1940 ENDDO 1767 1941 IF (check) THEN 1768 za = qcheck(klon,klev,paprs,q_seri,ql_seri,paire)1769 PRINT*, "aprescon=", za1770 zx_t = 0.01771 za = 0.01772 DO i = 1, klon1942 za = qcheck(klon,klev,paprs,q_seri,ql_seri,paire) 1943 PRINT*, "aprescon=", za 1944 zx_t = 0.0 1945 za = 0.0 1946 DO i = 1, klon 1773 1947 za = za + paire(i)/FLOAT(klon) 1774 1948 zx_t = zx_t + (rain_con(i)+snow_con(i))*paire(i)/FLOAT(klon) 1775 ENDDO1776 zx_t = zx_t/za*dtime1777 PRINT*, "Precip=", zx_t1949 ENDDO 1950 zx_t = zx_t/za*dtime 1951 PRINT*, "Precip=", zx_t 1778 1952 ENDIF 1779 1953 IF (zx_ajustq) THEN 1780 DO i = 1, klon1954 DO i = 1, klon 1781 1955 z_apres(i) = 0.0 1782 ENDDO1783 DO k = 1, klev1784 DO i = 1, klon1785 z_apres(i) = z_apres(i) + (q_seri(i,k)+ql_seri(i,k))1786 . 1787 ENDDO1788 ENDDO1789 DO i = 1, klon1790 z_factor(i) = (z_avant(i)-(rain_con(i)+snow_con(i))*dtime)1791 . 1792 ENDDO1793 DO k = 1, klev1794 DO i = 1, klon1795 IF (z_factor(i).GT.(1.0+1.0E-08) .OR.1796 . z_factor(i).LT.(1.0-1.0E-08)) THEN1797 q_seri(i,k) = q_seri(i,k) * z_factor(i)1798 ENDIF1799 ENDDO1800 ENDDO1956 ENDDO 1957 DO k = 1, klev 1958 DO i = 1, klon 1959 z_apres(i) = z_apres(i) + (q_seri(i,k)+ql_seri(i,k)) 1960 . *(paprs(i,k)-paprs(i,k+1))/RG 1961 ENDDO 1962 ENDDO 1963 DO i = 1, klon 1964 z_factor(i) = (z_avant(i)-(rain_con(i)+snow_con(i))*dtime) 1965 . /z_apres(i) 1966 ENDDO 1967 DO k = 1, klev 1968 DO i = 1, klon 1969 IF (z_factor(i).GT.(1.0+1.0E-08) .OR. 1970 . z_factor(i).LT.(1.0-1.0E-08)) THEN 1971 q_seri(i,k) = q_seri(i,k) * z_factor(i) 1972 ENDIF 1973 ENDDO 1974 ENDDO 1801 1975 ENDIF 1802 1976 zx_ajustq=.FALSE. … … 1804 1978 IF (nqmax.GT.2) THEN !--melange convectif de traceurs 1805 1979 c 1806 IF (iflag_con.NE.2) THEN 1807 PRINT*, "Pour l instant, seul conflx fonctionne avec traceurs" 1808 PRINT*,' Mettre iflag_con = 2 dans run.def et repasser !' 1809 CALL abort 1810 ENDIF 1980 IF (iflag_con .NE. 2 .AND. iflag_con .NE. 4 ) THEN 1981 PRINT*, 'Pour l instant, seul conflx fonctionne ', 1982 $ 'avec traceurs', iflag_con 1983 PRINT*,' Mettre iflag_con', 1984 $ ' = 2 ou 4 dans run.def et repasser' 1985 CALL abort 1986 ENDIF 1811 1987 c 1812 1988 ENDIF !--nqmax.GT.2 … … 1821 1997 ENDDO 1822 1998 ENDDO 1999 2000 c RATQS 2001 call calcratqs ( 2002 I paprs,pplay,q_seri,d_t_con,d_t_ajs 2003 O ,ratqs,zpt_conv) 1823 2004 c 1824 2005 c Appeler le processus de condensation a grande echelle … … 1826 2007 c 1827 2008 CALL fisrtilp_tr(dtime,paprs,pplay, 1828 . t_seri, q_seri, 2009 . t_seri, q_seri,ratqs, 1829 2010 . d_t_lsc, d_q_lsc, d_ql_lsc, rneb, cldliq, 1830 2011 . rain_lsc, snow_lsc, … … 2060 2241 c Calcul des tendances traceurs 2061 2242 c==================================================================== 2243 C Pascale : il faut quand meme apeller phytrac car il gere les sorties 2244 cKE43 des traceurs => il faut donc mettre des flags a .false. 2245 IF (iflag_con.EQ.4) THEN 2246 c on ajoute les tendances calculees par KE43 2247 DO iq=1, nqmax-2 ! Sandrine a -3 ??? 2248 DO k = 1, nlev 2249 DO i = 1, klon 2250 tr_seri(i,k,iq) = tr_seri(i,k,iq) + d_tr(i,k,iq) 2251 ENDDO 2252 ENDDO 2253 WRITE(iqn,'(i2.2)') iq 2254 CALL minmaxqfi(tr_seri(1,1,iq),0.,1.e33,'couche lim iq='//iqn) 2255 ENDDO 2062 2256 CMAF modif pour garder info du nombre de traceurs auxquels 2063 2257 C la physique s'applique 2258 ELSE 2259 CMAF modif pour garder info du nombre de traceurs auxquels 2260 C la physique s'applique 2064 2261 C 2065 2262 call phytrac (rnpb, 2066 I debut, 2263 I debut,lafin, 2067 2264 I nqmax-2, 2068 2265 I nlon,nlev,dtime, … … 2073 2270 I rlon,presnivs,paire,pphis, 2074 2271 O tr_seri) 2272 ENDIF 2075 2273 2076 2274 IF (offline) THEN … … 2078 2276 call phystokenc ( 2079 2277 I nlon,nlev,pdtphys,rlon,rlat, 2080 I pmfu, pmfd, pen_u, pde_u, pen_d, pde_d,2278 I t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, 2081 2279 I ycoefh,yu1,yv1,ftsol,pctsrf, 2082 2280 I frac_impa, frac_nucl, 2083 I pphis,paire,dtime,itap ,2084 O physid) 2281 I pphis,paire,dtime,itap) 2282 2085 2283 2086 2284 ENDIF … … 2475 2673 CALL gr_fi_ecrit(1, klon,iim,jjmp1, vq,zx_tmp_2d) 2476 2674 CALL histwrite(nid_mth,"vq",itap,zx_tmp_2d,iim*jjmp1,ndex2d) 2675 cKE43 2676 IF (iflag_con .EQ. 4) THEN ! sb 2677 c 2678 CALL gr_fi_ecrit(1, klon,iim,jjmp1, cape,zx_tmp_2d) 2679 CALL histwrite(nid_mth,"cape",itap,zx_tmp_2d,iim*jjmp1,ndex2d) 2680 c 2681 CALL gr_fi_ecrit(1, klon,iim,jjmp1,pbase,zx_tmp_2d) 2682 CALL histwrite(nid_mth,"pbase",itap,zx_tmp_2d,iim*jjmp1,ndex2d) 2683 c 2684 CALL gr_fi_ecrit(1, klon,iim,jjmp1,ema_pct,zx_tmp_2d) 2685 CALL histwrite(nid_mth,"ptop",itap,zx_tmp_2d,iim*jjmp1,ndex2d) 2686 c 2687 CALL gr_fi_ecrit(1, klon,iim,jjmp1,ema_cbmf,zx_tmp_2d) 2688 CALL histwrite(nid_mth,"fbase",itap,zx_tmp_2d,iim*jjmp1,ndex2d) 2689 c 2690 c 2691 ENDIF 2692 c34EK 2477 2693 c 2478 2694 c Champs 3D: … … 2557 2773 CALL histwrite(nid_mth,"dqeva",itap,zx_tmp_3d, 2558 2774 . iim*jjmp1*klev,ndex3d) 2775 c 2776 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, zpt_conv, zx_tmp_3d) 2777 CALL histwrite(nid_mth,"ptconv",itap,zx_tmp_3d, 2778 . iim*(jjm+1)*klev,ndex3d) 2779 c 2780 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, ratqs, zx_tmp_3d) 2781 CALL histwrite(nid_mth,"ratqs",itap,zx_tmp_3d, 2782 . iim*(jjm+1)*klev,ndex3d) 2559 2783 c 2560 2784 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_ajs, zx_tmp_3d) … … 2628 2852 ENDDO 2629 2853 ENDIF 2854 cKE43 2855 IF (iflag_con.EQ.4) THEN ! (sb) 2856 c 2857 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, upwd, zx_tmp_3d) 2858 CALL histwrite(nid_mth,"upwd",itap,zx_tmp_3d, 2859 . iim*jjmp1*klev,ndex3d) 2860 c 2861 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, dnwd, zx_tmp_3d) 2862 CALL histwrite(nid_mth,"dnwd",itap,zx_tmp_3d, 2863 . iim*jjmp1*klev,ndex3d) 2864 c 2865 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, dnwd0, zx_tmp_3d) 2866 CALL histwrite(nid_mth,"dnwd0",itap,zx_tmp_3d, 2867 . iim*jjmp1*klev,ndex3d) 2868 c 2869 CALL gr_fi_ecrit(klev,klon,iim,jjmp1, Ma, zx_tmp_3d) 2870 CALL histwrite(nid_mth,"Ma",itap,zx_tmp_3d, 2871 . iim*jjmp1*klev,ndex3d) 2872 c 2873 c 2874 ENDIF 2875 c34EK 2630 2876 c 2631 2877 if (ok_sync) then -
LMDZ.3.3/branches/rel-LF/libf/phylmd/phystokenc.F
r177 r230 1 c 2 c $Header$ 3 c 1 4 SUBROUTINE phystokenc ( 2 5 I nlon,nlev,pdtphys,rlon,rlat, 3 I p mfu, pmfd, pen_u, pde_u, pen_d, pde_d,6 I pt,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, 4 7 I pcoefh,yu1,yv1,ftsol,pctsrf, 5 I frac_impa,frac_nucl, 6 I pphis,paire,dtime,itap, 7 O physid) 8 I pfrac_impa,pfrac_nucl, 9 I pphis,paire,dtime,itap) 8 10 USE ioipsl 9 11 USE histcom … … 36 38 real pdtphys ! pas d'integration pour la physique (seconde) 37 39 c 38 integer physid, itap 39 integer ndex2d(iim*(jjm+1)),ndex3d(iim*(jjm+1)*klev) 40 integer physid, itap,ndex(1) 40 41 41 42 c convection: … … 48 49 REAL pen_d(klon,klev) ! flux entraine dans le panache descendant 49 50 REAL pde_d(klon,klev) ! flux detraine dans le panache descendant 51 REAL pt(klon,klev) 50 52 c 51 53 REAL rlon(klon), rlat(klon), dtime … … 62 64 c ---------- 63 65 c 64 REAL frac_impa(klon,klev)65 REAL frac_nucl(klon,klev)66 REAL pfrac_impa(klon,klev) 67 REAL pfrac_nucl(klon,klev) 66 68 c 67 69 c Arguments necessaires pour les sources et puits de traceur … … 80 82 REAL de_d(klon,klev) ! flux detraine dans le panache descendant 81 83 REAL coefh(klon,klev) ! flux detraine dans le panache descendant 84 REAL t(klon,klev) 85 REAL frac_impa(klon,klev) 86 REAL frac_nucl(klon,klev) 87 REAL rain(klon) 82 88 83 89 REAL pyu1(klon),pyv1(klon) … … 90 96 integer iadvtr,irec 91 97 real zmin,zmax 92 logical ok_sync 93 94 save mfu,mfd,en_u,de_u,en_d,de_d,coefh,dtcum 98 99 save t,mfu,mfd,en_u,de_u,en_d,de_d,coefh,dtcum 95 100 save iadvtr,irec 101 save frac_impa,frac_nucl,rain 96 102 save pyu1,pyv1,pftsol,ppsrf 97 103 … … 101 107 c====================================================================== 102 108 103 ok_sync = .true. 104 105 c print*,'iadvtr= ',iadvtr 106 c print*,'istphy= ',istphy 107 c print*,'istdyn= ',istdyn 109 print*,'iadvtr= ',iadvtr 110 print*,'istphy= ',istphy 111 print*,'istdyn= ',istdyn 108 112 109 113 IF (iadvtr.eq.0) THEN … … 112 116 . rlon,rlat,dtime, dtime*istphy,dtime*istphy,nqmx,physid) 113 117 114 c write(*,*) 'apres initphysto ds phystokenc' 115 118 write(*,*) 'apres initphysto ds phystokenc' 119 120 ndex(1) = 0 121 i=itap 122 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pphis,zx_tmp_2d) 123 CALL histwrite(physid,"phis",i,zx_tmp_2d,iim*(jjm+1),ndex) 124 c 125 i=itap 126 CALL gr_fi_ecrit(1,klon,iim,jjm+1,paire,zx_tmp_2d) 127 CALL histwrite(physid,"aire",i,zx_tmp_2d,iim*(jjm+1),ndex) 116 128 117 129 ENDIF 118 130 c 119 ndex2d = 0120 ndex3d = 0121 i=itap122 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pphis,zx_tmp_2d)123 CALL histwrite(physid,"phis",i,zx_tmp_2d,iim*(jjm+1),ndex2d)124 c125 i=itap126 CALL gr_fi_ecrit(1,klon,iim,jjm+1,paire,zx_tmp_2d)127 CALL histwrite(physid,"aire",i,zx_tmp_2d,iim*(jjm+1),ndex2d)128 129 131 iadvtr=iadvtr+1 130 132 c 131 IF(mod(iadvtr,istphy).eq.0) THEN 132 c 133 c normalisation par le temps cumule 133 c 134 c reinitialisation des champs cumules 135 if (mod(iadvtr,istphy).eq.1.or.istphy.eq.1) then 136 print*,'reinitialisation des champs cumules 137 s a iadvtr=',iadvtr 134 138 do k=1,klev 135 139 do i=1,klon 136 mfu(i,k)=mfu(i,k)/dtcum 137 mfd(i,k)=mfd(i,k)/dtcum 138 en_u(i,k)=en_u(i,k)/dtcum 139 de_u(i,k)=de_u(i,k)/dtcum 140 en_d(i,k)=en_d(i,k)/dtcum 141 de_d(i,k)=de_d(i,k)/dtcum 142 coefh(i,k)=coefh(i,k)/dtcum 143 enddo 144 enddo 145 do i=1,klon 146 pyv1(i)=pyv1(i)/dtcum 147 pyu1(i)=pyu1(i)/dtcum 148 end do 149 do k=1,nbsrf 150 do i=1,klon 151 pftsol(i,k)=pftsol(i,k)/dtcum 152 pftsol1(i) = pftsol(i,1) 153 pftsol2(i) = pftsol(i,2) 154 pftsol3(i) = pftsol(i,3) 155 pftsol4(i) = pftsol(i,4) 156 157 ppsrf(i,k)=ppsrf(i,k)/dtcum 158 ppsrf1(i) = ppsrf(i,1) 159 ppsrf2(i) = ppsrf(i,2) 160 ppsrf3(i) = ppsrf(i,3) 161 ppsrf4(i) = ppsrf(i,4) 162 163 enddo 164 enddo 165 c 166 c ecriture des champs 167 c 168 irec=irec+1 169 170 ccccc 171 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, mfu, zx_tmp_3d) 172 CALL histwrite(physid,"mfu",itap,zx_tmp_3d, 173 . iim*(jjm+1)*klev,ndex3d) 174 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, mfd, zx_tmp_3d) 175 CALL histwrite(physid,"mfd",itap,zx_tmp_3d, 176 . iim*(jjm+1)*klev,ndex3d) 177 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, en_u, zx_tmp_3d) 178 CALL histwrite(physid,"en_u",itap,zx_tmp_3d, 179 . iim*(jjm+1)*klev,ndex3d) 180 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, de_u, zx_tmp_3d) 181 CALL histwrite(physid,"de_u",itap,zx_tmp_3d, 182 . iim*(jjm+1)*klev,ndex3d) 183 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, en_d, zx_tmp_3d) 184 CALL histwrite(physid,"en_d",itap,zx_tmp_3d, 185 . iim*(jjm+1)*klev,ndex3d) 186 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, de_d, zx_tmp_3d) 187 CALL histwrite(physid,"de_d",itap,zx_tmp_3d, 188 . iim*(jjm+1)*klev,ndex3d) 189 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, coefh, zx_tmp_3d) 190 CALL histwrite(physid,"coefh",itap,zx_tmp_3d, 191 . iim*(jjm+1)*klev,ndex3d) 192 cccc 193 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,frac_impa,zx_tmp_3d) 194 CALL histwrite(physid,"frac_impa",itap,zx_tmp_3d, 195 . iim*(jjm+1)*klev,ndex3d) 196 197 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,frac_nucl,zx_tmp_3d) 198 CALL histwrite(physid,"frac_nucl",itap,zx_tmp_3d, 199 . iim*(jjm+1)*klev,ndex3d) 200 201 CALL gr_fi_ecrit(1, klon,iim,jjm+1, pyu1,zx_tmp_2d) 202 CALL histwrite(physid,"pyu1",itap,zx_tmp_2d,iim*(jjm+1), 203 . ndex2d) 204 205 CALL gr_fi_ecrit(1, klon,iim,jjm+1, pyv1,zx_tmp_2d) 206 CALL histwrite(physid,"pyv1",itap,zx_tmp_2d,iim*(jjm+1) 207 . ,ndex2d) 208 209 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol1, zx_tmp_2d) 210 CALL histwrite(physid,"ftsol1",itap,zx_tmp_2d, 211 . iim*(jjm+1),ndex2d) 212 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol2, zx_tmp_2d) 213 CALL histwrite(physid,"ftsol2",itap,zx_tmp_2d, 214 . iim*(jjm+1),ndex2d) 215 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol3, zx_tmp_2d) 216 CALL histwrite(physid,"ftsol3",itap,zx_tmp_2d, 217 . iim*(jjm+1),ndex2d) 218 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol4, zx_tmp_2d) 219 CALL histwrite(physid,"ftsol4",itap,zx_tmp_2d, 220 . iim*(jjm+1),ndex2d) 221 222 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf1, zx_tmp_2d) 223 CALL histwrite(physid,"psrf1",itap,zx_tmp_2d, 224 . iim*(jjm+1),ndex2d) 225 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf2, zx_tmp_2d) 226 CALL histwrite(physid,"psrf2",itap,zx_tmp_2d, 227 . iim*(jjm+1),ndex2d) 228 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf3, zx_tmp_2d) 229 CALL histwrite(physid,"psrf3",itap,zx_tmp_2d, 230 . iim*(jjm+1),ndex2d) 231 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf4, zx_tmp_2d) 232 CALL histwrite(physid,"psrf4",itap,zx_tmp_2d, 233 . iim*(jjm+1),ndex2d) 234 235 if (ok_sync) call histsync(physid) 236 237 c 238 cAA Test sur la valeur des coefficients de lessivage 239 c 240 zmin=1e33 241 zmax=-1e33 242 do k=1,klev 243 do i=1,klon 244 zmax=max(zmax,frac_nucl(i,k)) 245 zmin=min(zmin,frac_nucl(i,k)) 246 enddo 247 enddo 248 Print*,'------ coefs de lessivage (min et max) --------' 249 Print*,'facteur de nucleation ',zmin,zmax 250 zmin=1e33 251 zmax=-1e33 252 do k=1,klev 253 do i=1,klon 254 zmax=max(zmax,frac_impa(i,k)) 255 zmin=min(zmin,frac_impa(i,k)) 256 enddo 257 enddo 258 Print*,'facteur d impaction ',zmin,zmax 259 260 ENDIF 261 262 c reinitialisation des champs cumules 263 if (mod(iadvtr,istphy).eq.1) then 264 do k=1,klev 265 do i=1,klon 140 frac_impa(i,k)=1. 141 frac_nucl(i,k)=1. 266 142 mfu(i,k)=0. 267 143 mfd(i,k)=0. … … 271 147 de_d(i,k)=0. 272 148 coefh(i,k)=0. 149 t(i,k)=0. 273 150 enddo 274 151 enddo 275 152 do i=1,klon 153 rain(i)=0. 276 154 pyv1(i)=0. 277 155 pyu1(i)=0. … … 289 167 do k=1,klev 290 168 do i=1,klon 169 frac_impa(i,k)=frac_impa(i,k)*pfrac_impa(i,k) 170 frac_nucl(i,k)=frac_nucl(i,k)*pfrac_nucl(i,k) 291 171 mfu(i,k)=mfu(i,k)+pmfu(i,k)*pdtphys 292 172 mfd(i,k)=mfd(i,k)+pmfd(i,k)*pdtphys … … 296 176 de_d(i,k)=de_d(i,k)+pde_d(i,k)*pdtphys 297 177 coefh(i,k)=coefh(i,k)+pcoefh(i,k)*pdtphys 178 t(i,k)=t(i,k)+pt(i,k)*pdtphys 298 179 enddo 299 180 enddo … … 310 191 311 192 dtcum=dtcum+pdtphys 193 c 194 IF(mod(iadvtr,istphy).eq.0) THEN 195 c 196 c normalisation par le temps cumule 197 do k=1,klev 198 do i=1,klon 199 c frac_impa=frac_impa : c'est la fraction cumulee qu'on stoke 200 c frac_nucl=frac_nucl : c'est la fraction cumulee qu'on stoke 201 mfu(i,k)=mfu(i,k)/dtcum 202 mfd(i,k)=mfd(i,k)/dtcum 203 en_u(i,k)=en_u(i,k)/dtcum 204 de_u(i,k)=de_u(i,k)/dtcum 205 en_d(i,k)=en_d(i,k)/dtcum 206 de_d(i,k)=de_d(i,k)/dtcum 207 coefh(i,k)=coefh(i,k)/dtcum 208 t(i,k)=t(i,k)/dtcum 209 enddo 210 enddo 211 do i=1,klon 212 rain(i)=rain(i)/dtcum 213 pyv1(i)=pyv1(i)/dtcum 214 pyu1(i)=pyu1(i)/dtcum 215 end do 216 c modif abderr 23 11 00 do k=1,nbsrf 217 do i=1,klon 218 do k=1,nbsrf 219 pftsol(i,k)=pftsol(i,k)/dtcum 220 ppsrf(i,k)=ppsrf(i,k)/dtcum 221 enddo 222 pftsol1(i) = pftsol(i,1) 223 pftsol2(i) = pftsol(i,2) 224 pftsol3(i) = pftsol(i,3) 225 pftsol4(i) = pftsol(i,4) 226 227 c ppsrf(i,k)=ppsrf(i,k)/dtcum 228 ppsrf1(i) = ppsrf(i,1) 229 ppsrf2(i) = ppsrf(i,2) 230 ppsrf3(i) = ppsrf(i,3) 231 ppsrf4(i) = ppsrf(i,4) 232 233 enddo 234 c enddo 235 c 236 c ecriture des champs 237 c 238 irec=irec+1 239 240 ccccc 241 print*,'AVANT ECRITURE' 242 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, t, zx_tmp_3d) 243 CALL histwrite(physid,"t",itap,zx_tmp_3d, 244 . iim*(jjm+1)*klev,ndex) 245 print*,'APRES ECRITURE' 246 247 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, mfu, zx_tmp_3d) 248 CALL histwrite(physid,"mfu",itap,zx_tmp_3d, 249 . iim*(jjm+1)*klev,ndex) 250 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, mfd, zx_tmp_3d) 251 CALL histwrite(physid,"mfd",itap,zx_tmp_3d, 252 . iim*(jjm+1)*klev,ndex) 253 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, en_u, zx_tmp_3d) 254 CALL histwrite(physid,"en_u",itap,zx_tmp_3d, 255 . iim*(jjm+1)*klev,ndex) 256 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, de_u, zx_tmp_3d) 257 CALL histwrite(physid,"de_u",itap,zx_tmp_3d, 258 . iim*(jjm+1)*klev,ndex) 259 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, en_d, zx_tmp_3d) 260 CALL histwrite(physid,"en_d",itap,zx_tmp_3d, 261 . iim*(jjm+1)*klev,ndex) 262 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, de_d, zx_tmp_3d) 263 CALL histwrite(physid,"de_d",itap,zx_tmp_3d, 264 . iim*(jjm+1)*klev,ndex) 265 CALL gr_fi_ecrit(klev,klon,iim,jjm+1, coefh, zx_tmp_3d) 266 CALL histwrite(physid,"coefh",itap,zx_tmp_3d, 267 . iim*(jjm+1)*klev,ndex) 268 cccc 269 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,frac_impa,zx_tmp_3d) 270 CALL histwrite(physid,"frac_impa",itap,zx_tmp_3d, 271 . iim*(jjm+1)*klev,ndex) 272 273 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,frac_nucl,zx_tmp_3d) 274 CALL histwrite(physid,"frac_nucl",itap,zx_tmp_3d, 275 . iim*(jjm+1)*klev,ndex) 276 277 CALL gr_fi_ecrit(1, klon,iim,jjm+1, pyu1,zx_tmp_2d) 278 CALL histwrite(physid,"pyu1",itap,zx_tmp_2d,iim*(jjm+1),ndex) 279 280 CALL gr_fi_ecrit(1, klon,iim,jjm+1, pyv1,zx_tmp_2d) 281 CALL histwrite(physid,"pyv1",itap,zx_tmp_2d,iim*(jjm+1),ndex) 282 283 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol1, zx_tmp_2d) 284 CALL histwrite(physid,"ftsol1",itap,zx_tmp_2d, 285 . iim*(jjm+1),ndex) 286 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol2, zx_tmp_2d) 287 CALL histwrite(physid,"ftsol2",itap,zx_tmp_2d, 288 . iim*(jjm+1),ndex) 289 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol3, zx_tmp_2d) 290 CALL histwrite(physid,"ftsol3",itap,zx_tmp_2d, 291 . iim*(jjm+1),ndex) 292 293 c 294 CALL gr_fi_ecrit(1,klon,iim,jjm+1, pftsol4, zx_tmp_2d) 295 CALL histwrite(physid,"ftsol4",itap,zx_tmp_2d, 296 . iim*(jjm+1),ndex) 297 298 CALL gr_fi_ecrit(1,klon,iim,jjm+1, rain, zx_tmp_2d) 299 CALL histwrite(physid,"rain",itap,zx_tmp_2d, 300 . iim*(jjm+1),ndex) 301 302 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf1, zx_tmp_2d) 303 CALL histwrite(physid,"psrf1",itap,zx_tmp_2d, 304 . iim*(jjm+1),ndex) 305 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf2, zx_tmp_2d) 306 CALL histwrite(physid,"psrf2",itap,zx_tmp_2d, 307 . iim*(jjm+1),ndex) 308 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf3, zx_tmp_2d) 309 CALL histwrite(physid,"psrf3",itap,zx_tmp_2d, 310 . iim*(jjm+1),ndex) 311 CALL gr_fi_ecrit(1,klon,iim,jjm+1, ppsrf4, zx_tmp_2d) 312 CALL histwrite(physid,"psrf4",itap,zx_tmp_2d, 313 . iim*(jjm+1),ndex) 314 315 c 316 cAA Test sur la valeur des coefficients de lessivage 317 c 318 zmin=1e33 319 zmax=-1e33 320 do k=1,klev 321 do i=1,klon 322 zmax=max(zmax,frac_nucl(i,k)) 323 zmin=min(zmin,frac_nucl(i,k)) 324 enddo 325 enddo 326 Print*,'------ coefs de lessivage (min et max) --------' 327 Print*,'facteur de nucleation ',zmin,zmax 328 zmin=1e33 329 zmax=-1e33 330 do k=1,klev 331 do i=1,klon 332 zmax=max(zmax,frac_impa(i,k)) 333 zmin=min(zmin,frac_impa(i,k)) 334 enddo 335 enddo 336 Print*,'facteur d impaction ',zmin,zmax 337 338 ENDIF 339 312 340 313 341 RETURN -
LMDZ.3.3/branches/rel-LF/libf/phylmd/phytrac.F
r177 r230 1 c 2 c $Header$ 3 c 1 4 SUBROUTINE phytrac (rnpb, 2 I debutphy, 5 I debutphy,lafin, 3 6 I nqmax, 4 7 I nlon,nlev,pdtphys, … … 29 32 #include "dimphy.h" 30 33 #include "indicesol.h" 34 #include "temps.h" 31 35 #include "control.h" 32 #include "temps.h"33 36 c====================================================================== 34 37 … … 50 53 real pplay(nlon,nlev) ! pression pour le mileu de chaque couche (en Pa) 51 54 real presnivs(klev) ! pressions approximat. des milieux couches ( en PA) 52 real znivsig(klev) ! niveaux sigma53 55 real paire(klon) 54 56 real pphis(klon) 55 57 logical debutphy ! le flag de l'initialisation de la physique 58 logical lafin ! le flag de la fin de la physique 59 56 60 integer ll 57 61 c … … 92 96 real ftsol(nlon,nbsrf) ! Temperature du sol (surf)(Kelvin) 93 97 real pctsrf(nlon,nbsrf) ! Pourcentage de sol f(nature du sol) 94 98 c abder 99 real pftsol1(nlon),pftsol2(nlon),pftsol3(nlon),pftsol4(nlon) 100 real ppsrf1(nlon),ppsrf2(nlon),ppsrf3(nlon),ppsrf4(nlon) 101 c fin 95 102 cAA ---------------------------- 96 103 cAA VARIABLES LOCALES TRACEURS … … 133 140 INTEGER nid_tra 134 141 SAVE nid_tra 135 INTEGER ndex2d(iim*(jjm+1)),ndex3d(iim*(jjm+1)*klev) 142 c REAL x(klon,klev,nbtr+2) ! traceurs 143 INTEGER ndex(1) 136 144 REAL zx_tmp_2d(iim,jjm+1), zx_tmp_3d(iim,jjm+1,klev) 137 145 REAL zx_lon(iim,jjm+1), zx_lat(iim,jjm+1) … … 161 169 c 162 170 c--modif convection tiedtke 163 INTEGER i, k, it 164 171 INTEGER i, k, it,itap 172 save itap 165 173 REAL delp(klon,klev) 166 174 c--end modif … … 208 216 c print*,'DANS PHYTRAC debutphy=',debutphy 209 217 210 ecrit_tra = NINT(86400./pdtphys *ecritphy)211 zsto = pdtphys212 zout = pdtphys * FLOAT(ecrit_tra)213 218 if (debutphy) then 219 220 print*,'dans phytrac ',pdtphys,ecritphy,ecrit_tra 221 ecrit_tra = NINT(86400./pdtphys/2.) ! tous les 12H 222 c ecrit_tra = NINT(86400./pdtphys) ! tous les 24H 214 223 215 224 if(nbtr.lt.nqmax) then … … 223 232 PRINT*, 'La frequence de sortie traceurs est ', ecrit_tra 224 233 itra=0 234 itap=0 225 235 C 226 236 CALL ymds2ju(anne_ini, 1, 1, 0.0, zjulian) … … 239 249 . 1,iim,1,jjm+1, 0, zjulian, pdtphys, 240 250 . nhori, nid_tra) 241 call histvert(nid_tra, 'sig_s', 'Niveaux sigma','-', 242 . klev, znivsig, nvert) 243 C 244 C CALL histvert(nid_tra, "presnivs", "Vertical levels", "mb", 245 C . klev, presnivs, nvert) 251 CALL histvert(nid_tra, "presnivs", "Vertical levels", "mb", 252 . klev, presnivs, nvert) 253 zsto = pdtphys 254 zout = pdtphys * FLOAT(ecrit_tra) 246 255 c 247 256 CALL histdef(nid_tra, "phis", "Surface geop. height", "-", … … 252 261 . iim,jjm+1,nhori, 1,1,1, -99, 32, 253 262 . "once", zsto,zout) 263 264 goto 666 265 CALL histdef(nid_tra, "pyu1", "Vent niv 1", "-", 266 . iim,jjm+1,nhori, 1,1,1, -99, 32, 267 . "inst(X)", zsto,zout) 268 269 CALL histdef(nid_tra, "pyv1", "Vent niv 1", "-", 270 . iim,jjm+1,nhori, 1,1,1, -99, 32, 271 . "inst(X)", zsto,zout) 272 CALL histdef(nid_tra, "psrf1", "nature sol", "-", 273 . iim,jjm+1,nhori, 1,1,1, -99, 32, 274 . "inst(X)", zsto,zout) 275 CALL histdef(nid_tra, "psrf2", "nature sol", "-", 276 . iim,jjm+1,nhori, 1,1,1, -99, 32, 277 . "inst(X)", zsto,zout) 278 CALL histdef(nid_tra, "psrf3", "nature sol", "-", 279 . iim,jjm+1,nhori, 1,1,1, -99, 32, 280 . "inst(X)", zsto,zout) 281 CALL histdef(nid_tra, "psrf4", "nature sol", "-", 282 . iim,jjm+1,nhori, 1,1,1, -99, 32, 283 . "inst(X)", zsto,zout) 284 CALL histdef(nid_tra, "ftsol1", "temper sol", "-", 285 . iim,jjm+1,nhori, 1,1,1, -99, 32, 286 . "inst(X)", zsto,zout) 287 CALL histdef(nid_tra, "ftsol2", "temper sol", "-", 288 . iim,jjm+1,nhori, 1,1,1, -99, 32, 289 . "inst(X)", zsto,zout) 290 CALL histdef(nid_tra, "ftsol3", "temper sol", "-", 291 . iim,jjm+1,nhori, 1,1,1, -99, 32, 292 . "inst", zsto,zout) 293 CALL histdef(nid_tra, "ftsol4", "temper sol", "-", 294 . iim,jjm+1,nhori, 1,1,1, -99, 32, 295 . "inst(X)", zsto,zout) 296 CALL histdef(nid_tra, "pplay", "flux u mont","-", 297 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 298 . "inst(X)", zsto,zout) 299 CALL histdef(nid_tra, "t", "flux u mont","-", 300 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 301 . "inst(X)", zsto,zout) 302 CALL histdef(nid_tra, "mfu", "flux u mont","-", 303 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 304 . "ave(X)", zsto,zout) 305 CALL histdef(nid_tra, "mfd", "flux u decen","-", 306 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 307 . "ave(X)", zsto,zout) 308 CALL histdef(nid_tra, "en_u", "flux u mont","-", 309 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 310 . "ave(X)", zsto,zout) 311 CALL histdef(nid_tra, "en_d", "flux u mont","-", 312 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 313 . "ave(X)", zsto,zout) 314 CALL histdef(nid_tra, "de_u", "flux u mont","-", 315 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 316 . "ave(X)", zsto,zout) 317 CALL histdef(nid_tra, "de_d", "flux u mont","-", 318 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 319 . "ave(X)", zsto,zout) 320 CALL histdef(nid_tra, "coefh", "turbulent coef","-", 321 . iim,jjm+1,nhori, klev,1,klev,nvert, 32, 322 . "ave(X)", zsto,zout) 323 324 666 continue 254 325 c 255 326 DO it=1,nqmax … … 271 342 ENDDO 272 343 CALL histend(nid_tra) 344 ndex(1) = 0 345 c 346 i = NINT(zout/zsto) 347 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pphis,zx_tmp_2d) 348 CALL histwrite(nid_tra,"phis",i,zx_tmp_2d,iim*(jjm+1),ndex) 349 C 350 i = NINT(zout/zsto) 351 CALL gr_fi_ecrit(1,klon,iim,jjm+1,paire,zx_tmp_2d) 352 CALL histwrite(nid_tra,"aire",i,zx_tmp_2d,iim*(jjm+1),ndex) 273 353 274 354 c====================================================================== … … 284 364 enddo 285 365 END DO 366 367 open (99,file='starttrac',status='old', 368 . err=999,form='formatted') 369 read(99,*) (trs(i,1),i=1,klon) 370 999 close(99) 371 print*, 'apres starttrac' 372 286 373 c Initialisation de la fraction d'aerosols lessivee 287 374 c … … 317 404 inirnpb=.false. 318 405 endif 406 if(nqmax.gt.2) aerosol(3)=.true. 407 408 409 c abder 410 goto 777 411 do i=1,nlon 412 pftsol1(i) = ftsol(i,1) 413 pftsol2(i) = ftsol(i,2) 414 pftsol3(i) = ftsol(i,3) 415 pftsol4(i) = ftsol(i,4) 416 417 ppsrf1(i) = pctsrf(i,1) 418 ppsrf2(i) = pctsrf(i,2) 419 ppsrf3(i) = pctsrf(i,3) 420 ppsrf4(i) = pctsrf(i,4) 421 422 enddo 423 ndex(1)=0 424 itap=itap+1 425 CALL gr_fi_ecrit(1,klon,iim,jjm+1,yu1,zx_tmp_2d) 426 CALL histwrite(nid_tra,"pyu1",itap,zx_tmp_2d, 427 s iim*(jjm+1),ndex) 428 429 CALL gr_fi_ecrit(1,klon,iim,jjm+1,yv1,zx_tmp_2d) 430 CALL histwrite(nid_tra,"pyv1",itap,zx_tmp_2d, 431 s iim*(jjm+1),ndex) 432 433 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol1,zx_tmp_2d) 434 CALL histwrite(nid_tra,"ftsol1",itap,zx_tmp_2d, 435 s iim*(jjm+1),ndex) 436 437 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol2,zx_tmp_2d) 438 CALL histwrite(nid_tra,"ftsol2",itap,zx_tmp_2d, 439 s iim*(jjm+1),ndex) 440 441 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol3,zx_tmp_2d) 442 CALL histwrite(nid_tra,"ftsol3",itap,zx_tmp_2d, 443 s iim*(jjm+1),ndex) 444 445 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol4,zx_tmp_2d) 446 CALL histwrite(nid_tra,"ftsol4",itap,zx_tmp_2d, 447 s iim*(jjm+1),ndex) 448 449 CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf1,zx_tmp_2d) 450 CALL histwrite(nid_tra,"psrf1",itap,zx_tmp_2d, 451 s iim*(jjm+1),ndex) 452 453 CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf2,zx_tmp_2d) 454 CALL histwrite(nid_tra,"psrf2",itap,zx_tmp_2d, 455 s iim*(jjm+1),ndex) 456 457 CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf3,zx_tmp_2d) 458 CALL histwrite(nid_tra,"psrf3",itap,zx_tmp_2d, 459 s iim*(jjm+1),ndex) 460 461 CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf4,zx_tmp_2d) 462 CALL histwrite(nid_tra,"psrf4",itap,zx_tmp_2d, 463 s iim*(jjm+1),ndex) 464 777 continue 319 465 c====================================================================== 320 466 c Calcul de l'effet de la convection 321 467 c====================================================================== 468 print*,'Avant convection' 469 do it=1,nqmax 470 WRITE(itn,'(i1)') it 471 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant conv'//itn) 472 enddo 322 473 323 474 if (convection) then 324 475 325 cprint*,'Pas de temps dans phytrac : ',pdtphys476 print*,'Pas de temps dans phytrac : ',pdtphys 326 477 DO it=1, nqmax 327 478 CALL nflxtr(pdtphys, pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, … … 332 483 ENDDO 333 484 ENDDO 334 WRITE(itn,'(i1)') it335 CALL minmaxqfi(tr_seri(1,1,it),0.,1.e33,'convection it='//itn)336 ENDDO 337 c print*,'apres nflxtr'485 c WRITE(itn,'(i1)') it 486 c CALL minmaxqfi(tr_seri(1,1,it),0.,1.e33,'convection it='//itn) 487 ENDDO 488 c print*,'apres nflxtr' 338 489 339 490 340 491 endif ! convection 492 c print*,'Apres convection' 493 c do it=1,nqmax 494 c WRITE(itn,'(i1)') it 495 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant conv'//itn) 496 c enddo 341 497 342 498 c====================================================================== 343 499 c Calcul de l'effet de la couche limite 344 500 c====================================================================== 345 346 c print*,'avant couchelimite' 501 c print *,'Avant couchelimite' 502 c do it=1,nqmax 503 c WRITE(itn,'(i1)') it 504 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant CL '//itn) 505 c enddo 506 347 507 if (couchelimite) then 348 508 … … 403 563 endif ! couche limite 404 564 405 c print*,'apres couchelimite' 565 c print*,'Apres couchelimite' 566 c do it=1,nqmax 567 c WRITE(itn,'(i1)') it 568 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant CL '//itn) 569 c enddo 406 570 407 571 c====================================================================== … … 432 596 c====================================================================== 433 597 598 print*,'LESSIVAGE =',lessivage 434 599 IF (lessivage) THEN 435 600 … … 464 629 c Mise a jour due a l'impaction et a la nucleation 465 630 c 631 c call dump2d(iim,jjm-1,frac_impa(2:klon-1,10),'FRACIMPA') 632 c call dump2d(iim,jjm-1,frac_nucl(2:klon-1,10),'FRACNUCL') 633 c call dump2d(iim,jjm-1,tr_seri(2:klon-1,10,3),'TRACEUR3') 466 634 DO it = 1, nqmax 635 c print*,'IT=',it,aerosol(it) 467 636 IF (aerosol(it)) THEN 637 c print*,'IT=',it,' On lessive' 468 638 DO k = 1, nlev 469 639 DO i = 1, klon 470 tr_seri(i,k,it) = tr_seri(i,k,it) *471 s ( frac_impa(i,k) + frac_nucl(i,k) - 1. )640 tr_seri(i,k,it)=tr_seri(i,k,it) 641 s *frac_impa(i,k)*frac_nucl(i,k) 472 642 ENDDO 473 643 ENDDO 474 644 ENDIF 475 645 ENDDO 646 c call dump2d(iim,jjm-1,tr_seri(2:klon-1,10,3),'TRACEUR3B') 476 647 c 477 648 c Flux lessivage total … … 507 678 ENDDO 508 679 itra=itra+1 509 510 C 511 C Sorties IOIPSL 512 ndex2d = 0 513 ndex3d = 0 514 c 515 c write(*,*)'sorties ioipsl phytrac',zsto,zout 516 CALL gr_fi_ecrit(1,klon,iim,jjm+1,pphis,zx_tmp_2d) 517 CALL histwrite(nid_tra,"phis",itra,zx_tmp_2d,iim*(jjm+1),ndex2d) 518 C 519 CALL gr_fi_ecrit(1,klon,iim,jjm+1,paire,zx_tmp_2d) 520 CALL histwrite(nid_tra,"aire",itra,zx_tmp_2d,iim*(jjm+1),ndex2d) 680 ndex(1) = 0 521 681 DO it=1,nqmax 522 682 IF (it.LE.99) THEN … … 525 685 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,tr_seri(1,1,it),zx_tmp_3d) 526 686 CALL histwrite(nid_tra,"tr"//str2,itra,zx_tmp_3d, 527 . iim*(jjm+1)*klev,ndex 3d)528 529 530 531 . iim*(jjm+1)*klev,ndex3d)532 687 . iim*(jjm+1)*klev,ndex) 688 c IF (lessivage) THEN 689 c CALL gr_fi_ecrit(klev,klon,iim,jjm+1,flestottr(1,1,it),zx_tmp_3d) 690 c CALL histwrite(nid_tra,"fl"//str2,itra,zx_tmp_3d, 691 c . iim*(jjm+1)*klev,ndex) 692 c ENDIF 533 693 ELSE 534 694 PRINT*, "Trop de traceurs" … … 536 696 ENDIF 537 697 ENDDO 538 if (ok_sync) call histsync(nid_tra) 698 699 goto 888 700 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pplay,zx_tmp_3d) 701 CALL histwrite(nid_tra,"pplay",itra,zx_tmp_3d, 702 . iim*(jjm+1)*klev,ndex) 703 704 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,t_seri,zx_tmp_3d) 705 CALL histwrite(nid_tra,"t",itra,zx_tmp_3d, 706 . iim*(jjm+1)*klev,ndex) 707 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pmfu,zx_tmp_3d) 708 CALL histwrite(nid_tra,"mfu",itra,zx_tmp_3d, 709 . iim*(jjm+1)*klev,ndex) 710 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pmfd,zx_tmp_3d) 711 CALL histwrite(nid_tra,"mfd",itra,zx_tmp_3d, 712 . iim*(jjm+1)*klev,ndex) 713 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pen_u,zx_tmp_3d) 714 CALL histwrite(nid_tra,"en_u",itra,zx_tmp_3d, 715 . iim*(jjm+1)*klev,ndex) 716 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pen_d,zx_tmp_3d) 717 CALL histwrite(nid_tra,"en_d",itra,zx_tmp_3d, 718 . iim*(jjm+1)*klev,ndex) 719 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pde_d,zx_tmp_3d) 720 CALL histwrite(nid_tra,"de_d",itra,zx_tmp_3d, 721 . iim*(jjm+1)*klev,ndex) 722 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pde_u,zx_tmp_3d) 723 CALL histwrite(nid_tra,"de_u",itra,zx_tmp_3d, 724 . iim*(jjm+1)*klev,ndex) 725 CALL gr_fi_ecrit(klev,klon,iim,jjm+1,coefh,zx_tmp_3d) 726 CALL histwrite(nid_tra,"coefh",itra,zx_tmp_3d, 727 . iim*(jjm+1)*klev,ndex) 728 729 888 continue 730 731 c print*,'Sortie phytrac' 732 c do it=1,nqmax 733 c WRITE(itn,'(i1)') it 734 c call diagtracphy(tr_seri(:,:,it),paprs,'Fin Phys '//itn) 735 c enddo 736 737 if (lafin) then 738 print*, 'c est la fin de la physique' 739 open (99,file='restarttrac', form='formatted') 740 do i=1,klon 741 write(99,*) trs(i,1) 742 enddo 743 PRINT*, 'Ecriture du fichier restarttrac' 744 close(99) 745 else 746 print*, 'physique pas fini' 747 endif 748 539 749 540 750 RETURN -
LMDZ.3.3/branches/rel-LF/libf/phylmd/raddim.h
r2 r230 1 1 INTEGER kdlon, kflev 2 PARAMETER (kdlon=149,kflev=klev) 2 c 3 ccc PARAMETER (kdlon=klon,kflev=klev) 4 c 5 c resolution 72 45: 6 PARAMETER (kdlon=317,kflev=klev) 7 c resolution 64 32: 8 ccc PARAMETER (kdlon=331,kflev=klev) 9 c resolution 96 49: 10 ccc PARAMETER (kdlon=461,kflev=klev) 11 c resolution 144 73: 12 ccc PARAMETER (kdlon=610,kflev=klev) 13 c resolution 96 72: 14 c PARAMETER (kdlon=487,kflev=klev) 15 c resolution 128 64: 16 ccc PARAMETER (kdlon=4033,kflev=klev)
Note: See TracChangeset
for help on using the changeset viewer.