--- trunk/libf/phylmd/ini_histins.f90 2010/06/02 11:01:12 34 +++ trunk/Sources/phylmd/ini_histins.f 2016/03/21 15:36:26 186 @@ -4,37 +4,43 @@ contains - subroutine ini_histins(dtime, ok_instan, nid_ins) + subroutine ini_histins(dtime, ok_instan, nid_ins, itau_phy) ! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09 - use dimens_m, only: iim, jjm, llm - use dimphy, only: klon - use temps, only: itau_phy, day_ref, annee_ref use clesphys, only: ecrit_ins + use clesphys2, only: conv_emanuel + use dimens_m, only: iim, jjm, llm, nqmx + use dimphy, only: klon + use disvert_m, only: presnivs + use dynetat0_m, only: day_ref, annee_ref + use gr_fi_ecrit_m, only: gr_fi_ecrit + USE histbeg_totreg_m, ONLY : histbeg_totreg + USE histdef_m, ONLY : histdef + USE histend_m, ONLY : histend + USE histvert_m, ONLY : histvert use indicesol, only: nbsrf, clnsurf - USE calendar, only: ymds2ju - use histcom, only: histbeg_totreg, histvert, histend, histdef + use iniadvtrac_m, only: tname, ttext use phyetat0_m, only: rlon, rlat - use comvert, only: presnivs + USE ymds2ju_m, only: ymds2ju REAL, intent(in):: dtime ! pas temporel de la physique (s) logical, intent(in):: ok_instan integer, intent(out):: nid_ins + integer, intent(in):: itau_phy + ! Local: REAL zx_lon(iim, jjm + 1), zx_lat(iim, jjm + 1) real zjulian, zsto, zout - integer i, nhori, nvert, idayref, nsrf + integer i, nhori, nvert, nsrf, iq, it !------------------------------------------------------------------- IF (ok_instan) THEN - zsto = dtime * ecrit_ins zout = dtime * ecrit_ins - idayref = day_ref - CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) + CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian) CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlon, zx_lon) DO i = 1, iim @@ -46,7 +52,7 @@ jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins) write(*, *)'Inst ', itau_phy, zjulian CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", & - llm, presnivs/100., nvert) + presnivs/100., nvert) CALL histdef(nid_ins, "phis", "Surface geop. height", "-", & iim, (jjm + 1), nhori, 1, 1, 1, -99, & @@ -214,12 +220,7 @@ CALL histdef(nid_ins, "albs", "Surface albedo", "-", & iim, (jjm + 1), nhori, 1, 1, 1, -99, & "inst(X)", zsto, zout) - CALL histdef(nid_ins, "albslw", "Surface albedo LW", "-", & - iim, (jjm + 1), nhori, 1, 1, 1, -99, & - "inst(X)", zsto, zout) - !IM cf. AM 081204 BEG - ! HBTM2 CALL histdef(nid_ins, "s_pblh", "Boundary Layer Height", "m", & iim, (jjm + 1), nhori, 1, 1, 1, -99, & "inst(X)", zsto, zout) @@ -261,7 +262,8 @@ iim, (jjm + 1), nhori, 1, 1, 1, -99, & "inst(X)", zsto, zout) - !IM cf. AM 081204 END + if (conv_emanuel) CALL histdef(nid_ins, "ptop", "cloud top pressure", & + "Pa", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout) ! Champs 3D: @@ -293,6 +295,40 @@ iim, (jjm + 1), nhori, llm, 1, llm, nvert, & "inst(X)", zsto, zout) + CALL histdef(nid_ins, "zmasse", "column density of air in cell", & + "kg m-2", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", & + zsto, zout) + + CALL histdef(nid_ins, "rhum", "Relative humidity", & + "", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", & + zsto, zout) + + DO it = 1, nqmx - 2 + ! champ 2D + iq=it+2 + CALL histdef(nid_ins, tname(iq), ttext(iq), "U/kga", iim, jjm+1, & + nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout) + CALL histdef(nid_ins, "fl"//tname(iq), "Flux "//ttext(iq), & + "U/m2/s", iim, jjm+1, nhori, llm, 1, llm, nvert, & + "inst(X)", zsto, zout) + + !---Ajout Olivia + CALL histdef(nid_ins, "d_tr_th_"//tname(iq), & + "tendance thermique"// ttext(iq), "?", & + iim, jjm+1, nhori, llm, 1, llm, nvert, & + "inst(X)", zsto, zout) + CALL histdef(nid_ins, "d_tr_cv_"//tname(iq), & + "tendance convection"// ttext(iq), "?", & + iim, jjm+1, nhori, llm, 1, llm, nvert, & + "inst(X)", zsto, zout) + CALL histdef(nid_ins, "d_tr_cl_"//tname(iq), & + "tendance couche limite"// ttext(iq), "?", & + iim, jjm+1, nhori, llm, 1, llm, nvert, & + "inst(X)", zsto, zout) + !---fin Olivia + + ENDDO + CALL histend(nid_ins) ENDIF