--- trunk/libf/phylmd/physiq.f90 2008/10/15 16:19:57 20 +++ trunk/libf/phylmd/physiq.f90 2010/04/01 14:59:19 31 @@ -23,14 +23,16 @@ !AA - stockage des moyennes des champs necessaires !AA en mode traceur off-line - USE ioipsl, only: ymds2ju, histwrite, histsync + USE calendar, only: ymds2ju + USE histwrite_m, only: histwrite + USE histcom, only: histsync use dimens_m, only: jjm, iim, llm use indicesol, only: nbsrf, is_ter, is_lic, is_sic, is_oce, & clnsurf, epsfra use dimphy, only: klon, nbtr - use conf_gcm_m, only: raz_date, offline, iphysiq + use conf_gcm_m, only: raz_date, offline use dimsoil, only: nsoilmx - use temps, only: itau_phy, day_ref, annee_ref, itaufin + use temps, only: itau_phy, day_ref, annee_ref use clesphys, only: ecrit_hf, ecrit_ins, ecrit_mth, & cdmmax, cdhmax, & co2_ppm, ecrit_reg, ecrit_tra, ksta, ksta_ter, & @@ -54,6 +56,7 @@ use conf_phys_m, only: conf_phys use phyredem_m, only: phyredem use qcheck_m, only: qcheck + use ozonecm_m, only: ozonecm ! Declaration des constantes et des fonctions thermodynamiques : use fcttre, only: thermcep, foeew, qsats, qsatl @@ -179,18 +182,10 @@ REAL swup0(klon, klevp1), swup(klon, klevp1) SAVE swdn0, swdn, swup0, swup - REAL SWdn200clr(klon), SWdn200(klon) - REAL SWup200clr(klon), SWup200(klon) - SAVE SWdn200clr, SWdn200, SWup200clr, SWup200 - REAL lwdn0(klon, klevp1), lwdn(klon, klevp1) REAL lwup0(klon, klevp1), lwup(klon, klevp1) SAVE lwdn0, lwdn, lwup0, lwup - REAL LWdn200clr(klon), LWdn200(klon) - REAL LWup200clr(klon), LWup200(klon) - SAVE LWdn200clr, LWdn200, LWup200clr, LWup200 - !IM Amip2 ! variables a une pression donnee @@ -205,34 +200,6 @@ '500 ', '400 ', '300 ', '250 ', '200 ', '150 ', '100 ', & '70 ', '50 ', '30 ', '20 ', '10 '/ - real tlevSTD(klon, nlevSTD), qlevSTD(klon, nlevSTD) - real rhlevSTD(klon, nlevSTD), philevSTD(klon, nlevSTD) - real ulevSTD(klon, nlevSTD), vlevSTD(klon, nlevSTD) - real wlevSTD(klon, nlevSTD) - - ! nout : niveau de output des variables a une pression donnee - INTEGER nout - PARAMETER(nout=3) !nout=1 : day; =2 : mth; =3 : NMC - - logical oknondef(klon, nlevSTD, nout) - real tnondef(klon, nlevSTD, nout) - save tnondef - - ! les produits uvSTD, vqSTD, .., T2STD sont calcules - ! a partir des valeurs instantannees toutes les 6 h - ! qui sont moyennees sur le mois - - real uvSTD(klon, nlevSTD) - real vqSTD(klon, nlevSTD) - real vTSTD(klon, nlevSTD) - real wqSTD(klon, nlevSTD) - - real vphiSTD(klon, nlevSTD) - real wTSTD(klon, nlevSTD) - real u2STD(klon, nlevSTD) - real v2STD(klon, nlevSTD) - real T2STD(klon, nlevSTD) - ! prw: precipitable water real prw(klon) @@ -241,7 +208,7 @@ REAL flwp(klon), fiwp(klon) REAL flwc(klon, llm), fiwc(klon, llm) - INTEGER l, kmax, lmax + INTEGER kmax, lmax PARAMETER(kmax=8, lmax=8) INTEGER kmaxm1, lmaxm1 PARAMETER(kmaxm1=kmax-1, lmaxm1=lmax-1) @@ -293,9 +260,6 @@ integer nid_hf, nid_hf3d save nid_hf, nid_hf3d - INTEGER longcles - PARAMETER ( longcles = 20 ) - ! Variables propres a la physique INTEGER, save:: radpas @@ -443,7 +407,6 @@ EXTERNAL conema3 ! convect4.3 EXTERNAL fisrtilp ! schema de condensation a grande echelle (pluie) EXTERNAL nuage ! calculer les proprietes radiatives - EXTERNAL ozonecm ! prescrire l'ozone EXTERNAL radlwsw ! rayonnements solaire et infrarouge EXTERNAL transp ! transport total de l'eau et de l'energie @@ -624,8 +587,6 @@ REAL dudyn(iim+1, jjm + 1, llm) REAL zx_tmp_fi2d(klon) ! variable temporaire grille physique - REAL zx_tmp_fi3d(klon, llm) ! variable temporaire pour champs 3D - REAL zx_tmp_2d(iim, jjm + 1), zx_tmp_3d(iim, jjm + 1, llm) INTEGER, SAVE:: nid_day, nid_ins @@ -991,7 +952,7 @@ if (nq >= 5) then wo = qx(:, :, 5) * zmasse / dobson_u / 1e3 else IF (MOD(itap - 1, lmt_pas) == 0) THEN - CALL ozonecm(REAL(julien), rlat, paprs, wo) + wo = ozonecm(REAL(julien), paprs) ENDIF ! Re-evaporer l'eau liquide nuageuse @@ -1838,10 +1799,7 @@ , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) END IF - !AA Installation de l'interface online-offline pour traceurs - - ! Calcul des tendances traceurs - + ! Calcul des tendances traceurs call phytrac(rnpb, itap, lmt_pas, julien, gmtime, firstcal, lafin, nq-2, & pdtphys, u, v, t, paprs, pplay, pmfu, pmfd, pen_u, pde_u, pen_d, & pde_d, ycoefh, fm_therm, entr_therm, yu1, yv1, ftsol, pctsrf, & @@ -1850,24 +1808,16 @@ psfl, da, phi, mp, upwd, dnwd, tr_seri, zmasse) IF (offline) THEN - - print*, 'Attention on met a 0 les thermiques pour phystoke' - call phystokenc(pdtphys, rlon, rlat, & - t, pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & - fm_therm, entr_therm, & - ycoefh, yu1, yv1, ftsol, pctsrf, & - frac_impa, frac_nucl, & - pphis, airephy, pdtphys, itap) - + call phystokenc(pdtphys, rlon, rlat, t, pmfu, pmfd, pen_u, pde_u, & + pen_d, pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, & + pctsrf, frac_impa, frac_nucl, pphis, airephy, pdtphys, itap) ENDIF ! 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, zxtsol, & - t_seri, q_seri, u_seri, v_seri, zphi, & - ve, vq, ue, uq) - - !IM diag. bilKP + ! diag. bilKP CALL transp_lay (paprs, zxtsol, & t_seri, q_seri, u_seri, v_seri, zphi, &