Index: LMDZ4/trunk/libf/phylmd/YOMCST.h
===================================================================
--- LMDZ4/trunk/libf/phylmd/YOMCST.h	(revision 651)
+++ LMDZ4/trunk/libf/phylmd/YOMCST.h	(revision 652)
@@ -14,5 +14,5 @@
       REAL RSIGMA
 ! A1.4 Thermodynamic gas phase
-      REAL R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV
+      REAL R,RMD,RMO3,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV
       REAL RKAPPA,RETV
 ! A1.5,6 Thermodynamic liquid,solid phases
@@ -27,8 +27,8 @@
       COMMON/YOMCST/RPI   ,RCLUM ,RHPLA ,RKBOL ,RNAVO
      S      ,RDAY  ,REA   ,REPSM ,RSIYEA,RSIDAY,ROMEGA
-     s      ,R_ecc, R_peri, R_incl
+     S      ,R_ecc, R_peri, R_incl
      S      ,RA    ,RG    ,R1SA
      S      ,RSIGMA
-     S      ,R     ,RMD   ,RMV   ,RD    ,RV    ,RCPD
+     S      ,R     ,RMD   ,RMO3  ,RMV   ,RD    ,RV    ,RCPD
      S      ,RCPV  ,RCVD  ,RCVV  ,RKAPPA,RETV
      S      ,RCW   ,RCS
Index: LMDZ4/trunk/libf/phylmd/YOMCST.inc
===================================================================
--- LMDZ4/trunk/libf/phylmd/YOMCST.inc	(revision 651)
+++ 	(revision )
@@ -1,31 +1,0 @@
-!
-! $Header$
-!
-! A1.0 Fundamental constants
-      REAL :: RPI,RCLUM,RHPLA,RKBOL,RNAVO
-! A1.1 Astronomical constants
-      REAL :: RDAY,REA,REPSM,RSIYEA,RSIDAY,ROMEGA
-! A1.1.bis Constantes concernant l'orbite de la Terre:
-      REAL :: R_ecc, R_peri, R_incl
-! A1.2 Geoide
-      REAL :: RA,RG,R1SA
-! A1.3 Radiation
-!     REAL :: RSIGMA,RI0
-      REAL :: RSIGMA
-! A1.4 Thermodynamic gas phase
-      REAL :: R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV
-      REAL :: RKAPPA,RETV
-! A1.5,6 Thermodynamic liquid,solid phases
-      REAL :: RCW,RCS
-! A1.7 Thermodynamic transition of phase
-      REAL :: RLVTT,RLSTT,RLMLT,RTT,RATM
-! A1.8 Curve of saturation
-      REAL :: RESTT,RALPW,RBETW,RGAMW,RALPS,RBETS,RGAMS
-      REAL :: RALPD,RBETD,RGAMD
-!
-!IM  & ,R1SA ,RSIGMA,RI0,R ,RMD   ,RMV   ,RD    ,RV    ,RCPD ,RCPV,RCVD &
-      COMMON/YOMCST/RPI ,RCLUM, RHPLA, RKBOL, RNAVO ,RDAY  ,REA &
-     & ,REPSM ,RSIYEA,RSIDAY,ROMEGA ,R_ecc, R_peri, R_incl, RA    ,RG &
-     & ,R1SA ,RSIGMA,R ,RMD   ,RMV   ,RD    ,RV    ,RCPD ,RCPV,RCVD &
-     & ,RCVV  ,RKAPPA,RETV ,RCW   ,RCS ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM &
-     & ,RESTT ,RALPW ,RBETW ,RGAMW ,RALPS ,RBETS ,RGAMS ,RALPD ,RBETD ,RGAMD
Index: LMDZ4/trunk/libf/phylmd/clesphys.h
===================================================================
--- LMDZ4/trunk/libf/phylmd/clesphys.h	(revision 651)
+++ LMDZ4/trunk/libf/phylmd/clesphys.h	(revision 652)
@@ -6,4 +6,5 @@
        LOGICAL cycle_diurne,soil_model,new_oliq,ok_orodr,ok_orolf 
        LOGICAL ok_limitvrai
+       LOGICAL bug_ozone
        INTEGER nbapp_rad, iflag_con
        REAL co2_ppm, solaire
@@ -29,11 +30,11 @@
 
        COMMON/clesphys/cycle_diurne, soil_model, new_oliq,
-     ,     ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad, iflag_con
-     ,     , co2_ppm, solaire, RCO2, RCH4, RN2O, RCFC11, RCFC12
-     ,     , CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt
-     ,     , top_height, overlap, cdmmax, cdhmax, ksta, ksta_ter
-     ,     , ok_kzmin, lev_histhf, lev_histday, lev_histmth
-     ,     , type_run, ok_isccp, ok_regdyn
-     ,     , lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
-     ,     , ecrit_ins, ecrit_hf, ecrit_hf2mth, ecrit_day
-     ,     , ecrit_mth, ecrit_tra, ecrit_reg
+     S     ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad, iflag_con
+     S     , co2_ppm, solaire, RCO2, RCH4, RN2O, RCFC11, RCFC12
+     S     , CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt
+     S     , top_height, overlap, cdmmax, cdhmax, ksta, ksta_ter
+     S     , ok_kzmin, lev_histhf, lev_histday, lev_histmth
+     S     , type_run, ok_isccp, ok_regdyn
+     S     , lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
+     S     , ecrit_ins, ecrit_hf, ecrit_hf2mth, ecrit_day
+     S     , ecrit_mth, ecrit_tra, ecrit_reg, bug_ozone
Index: LMDZ4/trunk/libf/phylmd/clesphys.inc
===================================================================
--- LMDZ4/trunk/libf/phylmd/clesphys.inc	(revision 651)
+++ 	(revision )
@@ -1,32 +1,0 @@
-!
-! $Header$
-!
-!..include cles_phys.h
-!
-       LOGICAL :: cycle_diurne,soil_model,new_oliq,ok_orodr,ok_orolf 
-       LOGICAL :: ok_limitvrai
-       INTEGER :: nbapp_rad, iflag_con
-       REAL :: co2_ppm, solaire
-       DOUBLE PRECISION :: RCO2, RCH4, RN2O, RCFC11, RCFC12  
-       DOUBLE PRECISION :: CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt
-       INTEGER :: top_height, overlap
-       REAL :: cdmmax, cdhmax
-       REAL :: ksta, ksta_ter
-       LOGICAL :: ok_kzmin
-       INTEGER :: lev_histhf, lev_histday, lev_histmth
-       CHARACTER (len=4) type_run
-       LOGICAL ok_isccp, ok_regdyn
-       REAL lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
-       INTEGER ecrit_ins, ecrit_hf, ecrit_hf2mth, ecrit_day
-       INTEGER ecrit_mth, ecrit_tra, ecrit_reg
-
-       COMMON/clesphys/cycle_diurne, soil_model, new_oliq, &
-     &     ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad, iflag_con &
-     &     , co2_ppm, solaire, RCO2, RCH4, RN2O, RCFC11, RCFC12 &
-     &     , CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt &
-     &     , top_height, overlap, cdmmax, cdhmax, ksta, ksta_ter &
-     &     , ok_kzmin, lev_histhf, lev_histday, lev_histmth &
-     &     , type_run, ok_isccp, ok_regdyn &
-     &     , lonmin_ins, lonmax_ins, latmin_ins, latmax_ins &
-     &     , ecrit_ins, ecrit_hf, ecrit_hf2mth, ecrit_day &
-     &     , ecrit_mth, ecrit_tra, ecrit_reg
Index: LMDZ4/trunk/libf/phylmd/conf_phys.F90
===================================================================
--- LMDZ4/trunk/libf/phylmd/conf_phys.F90	(revision 651)
+++ LMDZ4/trunk/libf/phylmd/conf_phys.F90	(revision 652)
@@ -704,4 +704,13 @@
   call getin('ecrit_reg',ecrit_reg)
 !
+!
+!
+!Config Key  = bug_ozone
+!Config Desc = Pour retrouver le bug de l'ozone (IPCC), mettre a true
+!Config Def  = false
+!Config Help =
+!
+  bug_ozone = .false.
+  call getin('bug_ozone',bug_ozone)
 
 
@@ -765,4 +774,5 @@
   write(numout,*)' ecrit_ ins, hf, hf2mth, day, mth, reg, tra',&
  & ecrit_ins, ecrit_hf, ecrit_hf2mth, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra
+  write(numout,*)' bug_ozone = ', bug_ozone
   return
 
Index: LMDZ4/trunk/libf/phylmd/ozonecm.F
===================================================================
--- LMDZ4/trunk/libf/phylmd/ozonecm.F	(revision 651)
+++ LMDZ4/trunk/libf/phylmd/ozonecm.F	(revision 652)
@@ -21,6 +21,8 @@
 #include "dimensions.h"
 #include "dimphy.h"
+#include "clesphys.h"
+#include "YOMCST.h"
       REAL rlat(klon), paprs(klon,klev+1)
-      REAL o3(klon,klev)
+      REAL o3(klon,klev)   ! ozone concentration in kg/kg
       REAL tozon, rjour, pi, pl
       INTEGER i, k
@@ -77,7 +79,12 @@
       ENDDO
       DO k = 1, klev
-      DO i = 1, klon
-         o3(i,k) = field(i,k) - field(i,k+1)
-      ENDDO
+        DO i = 1, klon
+          o3(i,k) = field(i,k) - field(i,k+1)
+          IF (.not. bug_ozone) then
+c         convert o3 into kg/kg         
+            o3(i,k)=MAX(o3(i,k),1.0e-12)*RG/46.6968
+     .               /(paprs(i,k)-paprs(i,k+1))
+          ENDIF
+        ENDDO
       ENDDO
 c
Index: LMDZ4/trunk/libf/phylmd/radlwsw.F
===================================================================
--- LMDZ4/trunk/libf/phylmd/radlwsw.F	(revision 651)
+++ LMDZ4/trunk/libf/phylmd/radlwsw.F	(revision 652)
@@ -32,5 +32,5 @@
 c t--------input-R- temperature (K)
 c q--------input-R- vapeur d'eau (en kg/kg)
-c wo-------input-R- contenu en ozone (en cm.atm)
+c wo-------input-R- contenu en ozone (en kg/kg) correction MPL 100505
 c cldfra---input-R- fraction nuageuse (entre 0 et 1)
 c cldtaupd---input-R- epaisseur optique des nuages dans le visible (present-day value)
@@ -238,7 +238,12 @@
 c wo:    cm.atm (epaisseur en cm dans la situation standard)
 c POZON: kg/kg
-         POZON(i,k) = MAX(wo(iof+i,k),1.0e-12)*RG/46.6968
+         IF (bug_ozone) then
+           POZON(i,k) = MAX(wo(iof+i,k),1.0e-12)*RG/46.6968
      .               /(paprs(iof+i,k)-paprs(iof+i,k+1))
      .               *(paprs(iof+i,1)/101325.0)
+         ELSE
+c le calcul qui suit est maintenant fait dans ozonecm (MPL)
+           POZON(i,k) = wo(i,k)
+         ENDIF
          PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k)
          PCLDLU(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k)
@@ -550,6 +555,11 @@
       DO JL = 1, KDLON
          ZCLDSW0(JL,JK) = 0.0
-         ZOZ(JL,JK) = POZON(JL,JK)*46.6968/RG
+         IF (bug_ozone) then
+           ZOZ(JL,JK) = POZON(JL,JK)*46.6968/RG
      .               *PDP(JL,JK)*(101325.0/PPSOL(JL))
+         ELSE
+c        Correction MPL 100505
+           ZOZ(JL,JK) = POZON(JL,JK)*RMD/RMO3*46.6968/RG*PDP(JL,JK)
+         ENDIF           
       ENDDO
       ENDDO
@@ -2884,5 +2894,7 @@
       DO k = 1, KFLEV  ! convertir ozone de kg/kg en pa/pa
       DO i = 1, KDLON
-         ZOZ(i,k) = POZON(i,k)*PDP(i,k) * 28.9644/47.9942
+c convertir ozone de kg/kg en pa (modif MPL 100505)
+         ZOZ(i,k) = POZON(i,k)*PDP(i,k) * RMD/RMO3
+c        print *,'LW: ZOZ*10**6=',ZOZ(i,k)*1000000.
       ENDDO
       ENDDO
Index: LMDZ4/trunk/libf/phylmd/suphec.F
===================================================================
--- LMDZ4/trunk/libf/phylmd/suphec.F	(revision 651)
+++ LMDZ4/trunk/libf/phylmd/suphec.F	(revision 652)
@@ -116,4 +116,5 @@
       R=RNAVO*RKBOL
       RMD=28.9644
+      RMO3=47.9942
       RMV=18.0153
       RD=1000.*R/RMD
@@ -128,4 +129,5 @@
       WRITE(UNIT=6,FMT='('' Perfect gas  = '',e13.7)') R
       WRITE(UNIT=6,FMT='('' Dry air mass = '',e13.7)') RMD
+      WRITE(UNIT=6,FMT='('' Ozone   mass = '',e13.7)') RMO3
       WRITE(UNIT=6,FMT='('' Vapour  mass = '',e13.7)') RMV
       WRITE(UNIT=6,FMT='('' Dry air cst. = '',e13.7)') RD
