Index: trunk/LMDZ.MARS/libf/phymars/phyredem.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/phyredem.F90	(revision 3964)
+++ trunk/LMDZ.MARS/libf/phymars/phyredem.F90	(revision 4150)
@@ -198,4 +198,5 @@
   use iostart,             only: open_restartphy, close_restartphy, put_var, put_field
   use tracer_mod,          only: noms ! tracer names
+  use tracer_mod,          only: igcm_co, igcm_o2, igcm_h2, igcm_ho2, igcm_h2o2, igcm_n2, igcm_ar, igcm_he
   use nonoro_gwd_ran_mod,  only: du_nonoro_gwd, dv_nonoro_gwd
   use compute_dtau_mod,    only: dtau
@@ -206,4 +207,5 @@
   use comslope_mod,        only: nslope
   use paleoclimate_mod,    only: paleoclimate
+  use tracer_mass_fixer_dyn_mod, only: call_mass_fixer_dyn, mass_predyn
   use callkeys_mod,        only: calltherm, dustinjection, calllott_nonoro
   use callkeys_mod, only: CLFvarying
@@ -392,4 +394,32 @@
   endif
 
+  ! Correction to tracer mass non-conservations in dynamics
+  if (call_mass_fixer_dyn) then
+    if (igcm_co .ne. 0) then
+      call put_var("mass_predyn_co", "Global mass of CO before the last physiq step ends", mass_predyn(igcm_co))
+    endif
+    if (igcm_o2 .ne. 0) then
+      call put_var("mass_predyn_o2", "Global mass of O2 before the last physiq step ends", mass_predyn(igcm_o2))
+    endif
+    if (igcm_h2 .ne. 0) then
+      call put_var("mass_predyn_h2", "Global mass of H2 before the last physiq step ends", mass_predyn(igcm_h2))
+    endif
+    if (igcm_ho2 .ne. 0) then
+      call put_var("mass_predyn_ho2", "Global mass of HO2 before the last physiq step ends", mass_predyn(igcm_ho2))
+    endif
+    if (igcm_h2o2 .ne. 0) then
+      call put_var("mass_predyn_h2o2", "Global mass of H2O2 before the last physiq step ends", mass_predyn(igcm_h2o2))
+    endif
+    if (igcm_n2 .ne. 0) then
+      call put_var("mass_predyn_n2", "Global mass of N2 before the last physiq step ends", mass_predyn(igcm_n2))
+    endif
+    if (igcm_ar .ne. 0) then
+      call put_var("mass_predyn_ar", "Global mass of Ar before the last physiq step ends", mass_predyn(igcm_ar))
+    endif
+    if (igcm_he .ne. 0) then
+      call put_var("mass_predyn_he", "Global mass of He before the last physiq step ends", mass_predyn(igcm_he))
+    endif
+  endif
+
   ! Close file
   call close_restartphy
