--- trunk/Sources/phylmd/physiq.f 2015/07/21 14:44:45 158 +++ trunk/Sources/phylmd/physiq.f 2015/11/25 20:14:19 174 @@ -60,8 +60,9 @@ use readsulfate_m, only: readsulfate use readsulfate_preind_m, only: readsulfate_preind use yoegwd, only: sugwd - USE suphec_m, ONLY: ra, rcpd, retv, rg, rlvtt, romega, rsigma, rtt + USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt USE temps, ONLY: itau_phy + use transp_m, only: transp use unit_nml_m, only: unit_nml USE ymds2ju_m, ONLY: ymds2ju USE yoethf_m, ONLY: r2es, rvtmp2 @@ -169,7 +170,7 @@ INTEGER kmax, lmax PARAMETER(kmax = 8, lmax = 8) INTEGER kmaxm1, lmaxm1 - PARAMETER(kmaxm1 = kmax-1, lmaxm1 = lmax-1) + PARAMETER(kmaxm1 = kmax - 1, lmaxm1 = lmax - 1) ! Variables propres a la physique @@ -289,7 +290,6 @@ ! Declaration des procedures appelees EXTERNAL nuage ! calculer les proprietes radiatives - EXTERNAL transp ! transport total de l'eau et de l'energie ! Variables locales @@ -523,7 +523,7 @@ IF (if_ebil >= 1) zero_v = 0. IF (nqmx < 2) CALL abort_gcm('physiq', & - 'eaux vapeur et liquide sont indispensables', 1) + 'eaux vapeur et liquide sont indispensables') test_firstcal: IF (firstcal) THEN ! initialiser @@ -713,7 +713,7 @@ IF (cycle_diurne) THEN CALL zenang(longi, time, dtphys * radpas, mu0, fract) ELSE - mu0 = -999.999 + mu0 = - 999.999 ENDIF ! Calcul de l'abedo moyen par maille @@ -875,10 +875,10 @@ conv_q = d_q_dyn + d_q_vdf / dtphys conv_t = d_t_dyn + d_t_vdf / dtphys z_avant = sum((q_seri + ql_seri) * zmasse, dim=2) - CALL conflx(dtphys, paprs, play, t_seri(:, llm:1:-1), & - q_seri(:, llm:1:-1), conv_t, conv_q, zxfluxq(:, 1), omega, & - d_t_con, d_q_con, rain_con, snow_con, mfu(:, llm:1:-1), & - mfd(:, llm:1:-1), pen_u, pde_u, pen_d, pde_d, kcbot, kctop, & + CALL conflx(dtphys, paprs, play, t_seri(:, llm:1:- 1), & + q_seri(:, llm:1:- 1), conv_t, conv_q, zxfluxq(:, 1), omega, & + d_t_con, d_q_con, rain_con, snow_con, mfu(:, llm:1:- 1), & + mfd(:, llm:1:- 1), pen_u, pde_u, pen_d, pde_d, kcbot, kctop, & kdtop, pmflxr, pmflxs) WHERE (rain_con < 0.) rain_con = 0. WHERE (snow_con < 0.) snow_con = 0. @@ -1066,17 +1066,17 @@ ! 1. NUAGES CONVECTIFS - IF (iflag_cldcon <= -1) THEN + IF (iflag_cldcon <= - 1) THEN ! seulement pour Tiedtke snow_tiedtke = 0. - if (iflag_cldcon == -1) then + if (iflag_cldcon == - 1) then rain_tiedtke = rain_con else rain_tiedtke = 0. do k = 1, llm do i = 1, klon if (d_q_con(i, k) < 0.) then - rain_tiedtke(i) = rain_tiedtke(i)-d_q_con(i, k)/dtphys & + rain_tiedtke(i) = rain_tiedtke(i) - d_q_con(i, k)/dtphys & *zmasse(i, k) endif enddo @@ -1146,7 +1146,7 @@ IF (thermcep) THEN zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t)/play(i, k) zx_qs = MIN(0.5, zx_qs) - zcor = 1./(1.-retv*zx_qs) + zcor = 1./(1. - retv*zx_qs) zx_qs = zx_qs*zcor ELSE IF (zx_t < t_coup) THEN @@ -1204,7 +1204,7 @@ DO k = 1, llm DO i = 1, klon - t_seri(i, k) = t_seri(i, k) + (heat(i, k)-cool(i, k)) * dtphys/86400. + t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys/86400. ENDDO ENDDO @@ -1237,11 +1237,11 @@ ! Param\'etrisation de l'orographie \`a l'\'echelle sous-maille : IF (ok_orodr) THEN - ! selection des points pour lesquels le shema est actif: + ! S\'election des points pour lesquels le sch\'ema est actif : igwd = 0 DO i = 1, klon itest(i) = 0 - IF (((zpic(i)-zmea(i)) > 100.).AND.(zstd(i) > 10.)) THEN + IF (zpic(i) - zmea(i) > 100. .AND. zstd(i) > 10.) THEN itest(i) = 1 igwd = igwd + 1 idx(igwd) = i @@ -1267,7 +1267,7 @@ igwd = 0 DO i = 1, klon itest(i) = 0 - IF ((zpic(i) - zmea(i)) > 100.) THEN + IF (zpic(i) - zmea(i) > 100.) THEN itest(i) = 1 igwd = igwd + 1 idx(igwd) = i @@ -1303,8 +1303,8 @@ ENDDO ENDDO - CALL aaam_bud(ra, rg, romega, rlat, rlon, pphis, zustrdr, zustrli, & - zustrph, zvstrdr, zvstrli, zvstrph, paprs, u, v, aam, torsfc) + CALL aaam_bud(rg, romega, rlat, rlon, pphis, zustrdr, zustrli, zustrph, & + zvstrdr, zvstrli, zvstrph, paprs, u, v, aam, torsfc) IF (if_ebil >= 2) CALL diagetpq(airephy, 'after orography', ip_ebil, 2, & 2, dtphys, t_seri, q_seri, ql_seri, u_seri, v_seri, paprs, d_h_vcol, & @@ -1313,16 +1313,15 @@ ! Calcul des tendances traceurs call phytrac(itap, lmt_pas, julien, time, firstcal, lafin, dtphys, t, & paprs, play, mfu, mfd, pde_u, pen_d, ycoefh, fm_therm, entr_therm, & - yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, pphis, da, phi, mp, & - upwd, dnwd, tr_seri, zmasse, ncid_startphy) + yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, & + dnwd, tr_seri, zmasse, ncid_startphy, nid_ins) IF (offline) call phystokenc(dtphys, rlon, rlat, t, mfu, mfd, pen_u, & pde_u, pen_d, pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, & pctsrf, frac_impa, frac_nucl, pphis, airephy, dtphys, itap) ! Calculer le transport de l'eau et de l'energie (diagnostique) - CALL transp(paprs, zxtsol, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, & - ue, uq) + CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq) ! diag. bilKP @@ -1380,7 +1379,7 @@ DO iq = 3, nqmx DO k = 1, llm DO i = 1, klon - d_qx(i, k, iq) = (tr_seri(i, k, iq-2) - qx(i, k, iq)) / dtphys + d_qx(i, k, iq) = (tr_seri(i, k, iq - 2) - qx(i, k, iq)) / dtphys ENDDO ENDDO ENDDO @@ -1500,7 +1499,7 @@ CALL gr_fi_ecrit(1, klon, iim, jjm + 1, bils, zx_tmp_2d) CALL histwrite(nid_ins, "bils", itau_w, zx_tmp_2d) - zx_tmp_fi2d(1:klon) = -1*sens(1:klon) + zx_tmp_fi2d(1:klon) = - sens(1:klon) ! CALL gr_fi_ecrit(1, klon, iim, jjm + 1, sens, zx_tmp_2d) CALL gr_fi_ecrit(1, klon, iim, jjm + 1, zx_tmp_fi2d, zx_tmp_2d) CALL histwrite(nid_ins, "sens", itau_w, zx_tmp_2d)