Index: LMDZ6/branches/Amaury_dev/libf/obsolete/ini_histREGDYN.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/obsolete/ini_histREGDYN.h	(revision 5139)
+++ LMDZ6/branches/Amaury_dev/libf/obsolete/ini_histREGDYN.h	(revision 5139)
@@ -0,0 +1,126 @@
+
+! $Header$
+
+      IF (ok_regdyn) THEN
+      
+        IF (is_sequential) THEN
+c
+cIM      PRINT*, 'La frequence de sortie REGDYN est de ', ecrit_mth
+c
+         idayref = day_ref
+         CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
+c
+c axe vertical pour les differents niveaux des histogrammes
+      DO iw=1, iwmax
+        zx_o500(iw)=wmin+(iw-1./2.)*pas_w
+      ENDDO
+
+         CALL histbeg("histREGDYN", kmaxm1,zx_tau, lmaxm1,zx_pc,
+     .                 1,kmaxm1,1,lmaxm1, itau_phy, zjulian, dtime, 
+     .                 nhoriRD, nid_regdyn)
+
+         CALL histvert(nid_regdyn, "omeganivs", "Omega levels", 
+     .                 "mb/day",
+     .                 iwmax, zx_o500, komega)
+c
+c   pour les champs instantannes, il faut mettre la meme valeur pour
+c   zout et zsto.
+c   dtime est passe par ailleurs a histbeg
+c
+c        zout = dtime * REAL(NINT(86400./dtime*ecrit_regdyn))
+c        zsto = zout
+c        PRINT*,'zout,zsto=',zout,zsto
+c
+c stockage a chaque pas de temps de la physique
+c
+         zstophy = dtime
+cIM 020904      zstophy = dtime * nbapp_isccp
+
+c ecriture mensuelle
+c
+         zout = dtime * ecrit_mth
+cIM 020904      
+c        zout = dtime * ecrit_day
+c        zout = dtime * REAL(NINT(86400./dtime*ecrit_regdyn))
+
+c
+c Champs 3D:
+c
+c TROP
+         CALL histdef(nid_regdyn, "hw1", "Tropics Histogram ", "%",
+                      kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega, 32,
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_regdyn, "nh1", "Nb of pixels Tropics Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+
+         CALL histdef(nid_regdyn, "nht1",
+                      "Total Nb pixels Tropics Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+c PAN
+         CALL histdef(nid_regdyn, "hw2", "North Pacific Histogram", "%",
+                      kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega, 32,
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_regdyn, "nh2", "Nb of pixels North Pacific",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+
+         CALL histdef(nid_regdyn, "nht2",
+                      "Total Nb pixels North Pacific Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c CAL
+         CALL histdef(nid_regdyn, "hw3", "California Histogram", "%",
+                      kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega, 32,
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_regdyn, "nh3", 
+                      "Nb of pixels California Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+
+         CALL histdef(nid_regdyn, "nht3",
+                      "Total Nb pixels California Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c HAW
+         CALL histdef(nid_regdyn, "hw4", "Hawai Histogram", "%",
+                      kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega, 32,
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_regdyn, "nh4", "Nb of pixels Hawai Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+
+         CALL histdef(nid_regdyn, "nht4",
+                      "Total Nb pixels Hawai Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c WAP
+         CALL histdef(nid_regdyn, "hw5", "Warm Pool Histogram", "%",
+                      kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega, 32,
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_regdyn, "nh5", "Nb of pixels Warm Pool Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+
+         CALL histdef(nid_regdyn, "nht5",
+                      "Total Nb pixels Warm Pool Histo",
+                      "%",kmaxm1,lmaxm1,nhoriRD, iwmax,1,iwmax, komega,
+                      32,"ave(X)", zstophy,zout)
+c
+         CALL histend(nid_regdyn)
+	 
+	 END IF ! is_sequential
+
+      endif ! ok_regdyn
Index: LMDZ6/branches/Amaury_dev/libf/obsolete/ini_histday_seri.h
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/obsolete/ini_histday_seri.h	(revision 5139)
+++ LMDZ6/branches/Amaury_dev/libf/obsolete/ini_histday_seri.h	(revision 5139)
@@ -0,0 +1,131 @@
+
+! $Id$
+
+!ym Ne fonctionnera pas en mode parallele
+      IF (is_sequential) THEN
+      
+      IF (type_run.EQ."AMIP") THEN
+
+       zstophy = pdtphys
+       zout = ecrit_day
+
+         idayref = day_ref
+         CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
+
+         CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,longitude_deg,zx_lon)
+         DO i = 1, nbp_lon
+            zx_lon(i,1) = longitude_deg(i+1)
+            zx_lon(i,nbp_lat) = longitude_deg(i+1)
+         ENDDO
+         DO ll=1,klev
+            znivsig(ll)=REAL(ll)
+         ENDDO
+         CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,latitude_deg,zx_lat)
+
+         imin_debut=1 
+         nbpti=1
+         jmin_debut=1 
+         nbptj=1
+
+         CALL histbeg("histday_seri.nc",  &
+                       nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:), &
+                       imin_debut,nbpti,jmin_debut,nbptj, &
+                       itau_phy, zjulian, dtime, &
+                       nhori, nid_day_seri)
+
+         CALL histvert(nid_day_seri, "presnivs",  &
+                      "Vertical levels","mb", &
+                       klev, presnivs/100., nvert)
+
+         CALL histdef(nid_day_seri, "bilTOA",  &
+                      "Net radiation at model top", "W/m2", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32,  &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "bils",  &
+                      "Net downward energy flux at surface","W/m2", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32,  &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "ecin",  &
+                      "Total kinetic energy (per unit area)","J/m2", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+!IM 151004 BEG
+         IF(1.EQ.0) THEN
+
+         CALL histdef(nid_day_seri, "momang",  &
+                     "Total relative angular momentum (per unit area)", &
+                     "kg/s", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "frictor",  &
+                     "Friction torque (per unit area)", "N/m", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "mountor",  &
+                     "Mountain torque (per unit area)", "N/m", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+         ENDIF !(1.EQ.0) THEN
+
+         CALL histdef(nid_day_seri, "momang",  &
+                     "Axial angular momentum (per unit area)", &
+                     "kg/s", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "torsfc",  &
+              "Total surface torque (including mountain torque)", "N/m", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+!IM 151004 END        
+
+         CALL histdef(nid_day_seri, "tamv",  &
+                      "Temperature (mass-weighted vert. ave)", "K", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "psol",  &
+                      "Surface pressure", "Pa", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32,  &
+                      "ave(X)", zstophy,zout)
+
+         CALL histdef(nid_day_seri, "evap",  &
+                      "Evaporation and sublimation (per unit area)",  &
+                      "kg/(m2*s)", &
+                      nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32,  &
+                      "ave(X)", zstophy,zout)
+
+!          CALL histdef(nid_day_seri,
+!    .         "SnowFrac", 
+!    .         "Snow-covered area ", "%",  
+!    .         nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32,
+!    .         "ave(X)", zstophy,zout)
+
+!        CALL histdef(nid_day_seri, "snow_depth", 
+!IM 080904  .                "Snow Depth (water equivalent)", "m",
+!IM 191104  .                "Snow Depth (water equivalent)", "kg/m2",
+!    .                "Snow Mass", "kg/m2",
+!    .                nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, 
+!    .               "ave(X)", zstophy,zout)
+
+           CALL histdef(nid_day_seri,  &
+               "tsol_"//clnsurf(is_oce),  &
+               "SST over open (ice-free) ocean ", "K",   &
+               nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, &
+               "ave(X)", zstophy,zout)
+
+!=================================================================
+
+         CALL histend(nid_day_seri)
+
+!=================================================================
+      ENDIF ! fin de test sur type_run.EQ.AMIP
+      
+      ENDIF ! is_sequential
