--- trunk/Sources/phylmd/ini_histins.f 2016/03/11 18:47:26 178 +++ trunk/Sources/phylmd/ini_histins.f 2016/06/08 12:23:41 202 @@ -2,60 +2,51 @@ implicit none + integer, save:: nid_ins + contains - subroutine ini_histins(dtime, ok_instan, nid_ins, itau_phy) + subroutine ini_histins(dtime) ! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09 - use clesphys, only: ecrit_ins + use clesphys, only: ecrit_ins, ok_instan + 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 dynetat0_m, only: day_ref, annee_ref, rlatu, rlonv 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 iniadvtrac_m, only: tname, ttext - use phyetat0_m, only: rlon, rlat + use nr_util, only: pi + use phyetat0_m, only: itau_phy 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, nsrf, iq, it + integer nhori, nvert, nsrf, iq, it !------------------------------------------------------------------- IF (ok_instan) THEN zsto = dtime * ecrit_ins zout = dtime * ecrit_ins - 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 - zx_lon(i, 1) = rlon(i+1) - zx_lon(i, (jjm + 1)) = rlon(i+1) - ENDDO - CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlat, zx_lat) - CALL histbeg_totreg("histins", zx_lon(:, 1), zx_lat(1, :), 1, iim, 1, & - jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins) + CALL histbeg_totreg("histins", rlonv(:iim) / pi * 180., & + rlatu / pi * 180., 1, iim, & + 1, jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins) write(*, *)'Inst ', itau_phy, zjulian CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", & presnivs/100., nvert) - CALL histdef(nid_ins, "phis", "Surface geop. height", "-", & iim, (jjm + 1), nhori, 1, 1, 1, -99, & "once", zsto, zout) - CALL histdef(nid_ins, "aire", "Grid area", "-", & iim, (jjm + 1), nhori, 1, 1, 1, -99, & "once", zsto, zout) @@ -164,7 +155,6 @@ "inst(X)", zsto, zout) DO nsrf = 1, nbsrf - call histdef(nid_ins, "pourc_"//clnsurf(nsrf), & "% "//clnsurf(nsrf), "%", & iim, (jjm + 1), nhori, 1, 1, 1, -99, & @@ -260,7 +250,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: