--- trunk/libf/phylmd/physiq.f90 2009/07/31 15:18:47 22 +++ trunk/libf/phylmd/physiq.f90 2010/04/06 17:52:58 32 @@ -23,38 +23,41 @@ !AA - stockage des moyennes des champs necessaires !AA en mode traceur off-line - USE ioipsl, only: ymds2ju, histwrite, 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 dimsoil, only: nsoilmx - use temps, only: itau_phy, day_ref, annee_ref, itaufin + use abort_gcm_m, only: abort_gcm + USE calendar, only: ymds2ju use clesphys, only: ecrit_hf, ecrit_ins, ecrit_mth, & cdmmax, cdhmax, & co2_ppm, ecrit_reg, ecrit_tra, ksta, ksta_ter, & ok_kzmin use clesphys2, only: iflag_con, ok_orolf, ok_orodr, nbapp_rad, & cycle_diurne, new_oliq, soil_model - use iniprint, only: prt_level - use abort_gcm_m, only: abort_gcm - use YOMCST, only: rcpd, rtt, rlvtt, rg, ra, rsigma, retv, romega use comgeomphy + use conf_gcm_m, only: raz_date, offline + use conf_phys_m, only: conf_phys use ctherm - use phytrac_m, only: phytrac - use oasis_m - use radepsi - use radopt - use yoethf + use dimens_m, only: jjm, iim, llm + use dimphy, only: klon, nbtr + use dimsoil, only: nsoilmx + use hgardfou_m, only: hgardfou + USE histcom, only: histsync + USE histwrite_m, only: histwrite + use indicesol, only: nbsrf, is_ter, is_lic, is_sic, is_oce, & + clnsurf, epsfra use ini_hist, only: ini_histhf, ini_histday, ini_histins + use iniprint, only: prt_level + use oasis_m use orbite_m, only: orbite, zenang + use ozonecm_m, only: ozonecm use phyetat0_m, only: phyetat0, rlat, rlon - use hgardfou_m, only: hgardfou - use conf_phys_m, only: conf_phys use phyredem_m, only: phyredem + use phystokenc_m, only: phystokenc + use phytrac_m, only: phytrac use qcheck_m, only: qcheck - use ozonecm_m, only: ozonecm + use radepsi + use radopt + use temps, only: itau_phy, day_ref, annee_ref + use yoethf + use YOMCST, only: rcpd, rtt, rlvtt, rg, ra, rsigma, retv, romega ! Declaration des constantes et des fonctions thermodynamiques : use fcttre, only: thermcep, foeew, qsats, qsatl @@ -180,18 +183,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 @@ -206,34 +201,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) @@ -242,7 +209,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) @@ -294,9 +261,6 @@ integer nid_hf, nid_hf3d save nid_hf, nid_hf3d - INTEGER longcles - PARAMETER ( longcles = 20 ) - ! Variables propres a la physique INTEGER, save:: radpas @@ -624,8 +588,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 @@ -1838,10 +1800,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 +1809,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, & @@ -1966,7 +1917,7 @@ subroutine write_histday - use grid_change, only: gr_phy_write_3d + use gr_phy_write_3d_m, only: gr_phy_write_3d integer itau_w ! pas de temps ecriture !------------------------------------------------