Index: tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/lpj_cover.f90
===================================================================
--- tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/lpj_cover.f90	(revision 6268)
+++ tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/lpj_cover.f90	(revision 6367)
@@ -72,5 +72,5 @@
   SUBROUTINE cover (npts, cn_ind, ind, biomass, &
        veget_cov_max, veget_cov_max_old, lai, litter, carbon, turnover_daily, bm_to_litter, &
-       co2_to_bm, co2_fire, resp_hetero, resp_maint, resp_growth, gpp_daily)
+       co2_to_bm, co2_fire, resp_hetero, resp_hetero_litter, resp_hetero_soil, resp_maint, resp_growth, gpp_daily)
 
 !! 0. Variable and parameter declaration
@@ -105,4 +105,6 @@
                                                                                        !! and dead biomass)
     REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)                  :: resp_hetero    !! Heterotrophic respiration
+    REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)                  :: resp_hetero_litter  !! Heterotrophic respiration from litter
+    REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)                  :: resp_hetero_soil    !! Heterotrophic respiration from soil
     REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)                  :: resp_maint     !! Maintenance respiration 
     REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)                  :: resp_growth    !! Growth respiration
@@ -123,4 +125,6 @@
     REAL(r_std), DIMENSION(npts)                                :: dilu_resp_maint     !! Dilution for carbon variables
     REAL(r_std), DIMENSION(npts)                                :: dilu_resp_hetero    !! Dilution for carbon variables
+    REAL(r_std), DIMENSION(npts)                                :: dilu_resp_hetero_litter  !! Dilution for carbon variables
+    REAL(r_std), DIMENSION(npts)                                :: dilu_resp_hetero_soil    !! Dilution for carbon variables
     REAL(r_std), DIMENSION(npts)                                :: dilu_co2_to_bm      !! Dilution for carbon variables
     REAL(r_std), DIMENSION(npts)                                :: dilu_co2_fire       !! Dilution for carbon variables
@@ -211,4 +215,6 @@
           dilu_resp_maint(i)=zero
           dilu_resp_hetero(i)=zero
+          dilu_resp_hetero_litter(i)=zero
+          dilu_resp_hetero_soil(i)=zero
           dilu_co2_to_bm(i)=zero
           dilu_co2_fire(i)=zero
@@ -235,4 +241,6 @@
                 dilu_resp_maint(i)=dilu_resp_maint(i)+delta_veg(j)*resp_maint(i,j)/delta_veg_sum
                 dilu_resp_hetero(i)=dilu_resp_hetero(i)+delta_veg(j)*resp_hetero(i,j)/delta_veg_sum
+                dilu_resp_hetero_litter(i)=dilu_resp_hetero_litter(i)+delta_veg(j)*resp_hetero_litter(i,j)/delta_veg_sum
+                dilu_resp_hetero_soil(i)=dilu_resp_hetero_soil(i)+delta_veg(j)*resp_hetero_soil(i,j)/delta_veg_sum
                 dilu_co2_to_bm(i)=dilu_co2_to_bm(i)+delta_veg(j)*co2_to_bm(i,j)/delta_veg_sum
                 dilu_co2_fire(i)=dilu_co2_fire(i)+delta_veg(j)*co2_fire(i,j)/delta_veg_sum
@@ -262,4 +270,8 @@
                 resp_maint(i,j)=(resp_maint(i,j)*veget_cov_max_old(i,j)+dilu_resp_maint(i)*delta_veg(j))/veget_cov_max(i,j)
                 resp_hetero(i,j)=(resp_hetero(i,j)*veget_cov_max_old(i,j)+dilu_resp_hetero(i)*delta_veg(j))/veget_cov_max(i,j)
+                resp_hetero_litter(i,j)=(resp_hetero_litter(i,j)*veget_cov_max_old(i,j)+ &
+                        dilu_resp_hetero_litter(i)*delta_veg(j))/veget_cov_max(i,j)
+                resp_hetero_soil(i,j)=(resp_hetero_soil(i,j)*veget_cov_max_old(i,j)+ &
+                        dilu_resp_hetero_soil(i)*delta_veg(j))/veget_cov_max(i,j)
                 co2_to_bm(i,j)=(co2_to_bm(i,j)*veget_cov_max_old(i,j)+dilu_co2_to_bm(i)*delta_veg(j))/veget_cov_max(i,j)
                 co2_fire(i,j)=(co2_fire(i,j)*veget_cov_max_old(i,j)+dilu_co2_fire(i)*delta_veg(j))/veget_cov_max(i,j)
Index: tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/stomate.f90
===================================================================
--- tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/stomate.f90	(revision 6268)
+++ tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/stomate.f90	(revision 6367)
@@ -259,4 +259,10 @@
                                                                          !! @tex $(gC m^{-2} dt_stomate^{-1})$ @endtex
 !$OMP THREADPRIVATE(resp_hetero_d)
+  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:,:)    :: resp_hetero_litter_d !! Heterotrophic respiration from litter per ground area 
+                                                                         !! @tex $(gC m^{-2} dt_stomate^{-1})$ @endtex
+!$OMP THREADPRIVATE(resp_hetero_litter_d)
+  REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:,:)    :: resp_hetero_soil_d   !! Heterotrophic respiration from soil per ground area 
+                                                                         !! @tex $(gC m^{-2} dt_stomate^{-1})$ @endtex
+!$OMP THREADPRIVATE(resp_hetero_soil_d)
   REAL(r_std),ALLOCATABLE,SAVE,DIMENSION(:,:)    :: resp_hetero_radia    !! Heterothrophic respiration per ground area at Sechiba
                                                                          !! time step 
@@ -1582,5 +1588,5 @@
             &             control_moist_inst, control_temp_inst, soilcarbon_input_inst, &
             &             co2_to_bm_dgvm, co2_fire, &
-            &             resp_hetero_d, resp_maint_d, resp_growth_d, &
+            &             resp_hetero_d, resp_hetero_litter_d, resp_hetero_soil_d, resp_maint_d, resp_growth_d, &
             &             height, deadleaf_cover, vcmax, &
             &             bm_to_litter,&
@@ -1751,6 +1757,4 @@
 
        CALL xios_orchidee_send_field("nep",SUM(nep_daily*veget_cov_max,dim=2)/1e3/one_day)
-       CALL xios_orchidee_send_field("rhSoil",SUM(resp_hetero_soil*veget_cov_max,dim=2)/1e3)
-       CALL xios_orchidee_send_field("rhLitter",SUM(resp_hetero_litter*veget_cov_max,dim=2)/1e3)
        
 
@@ -1833,4 +1837,6 @@
        resp_maint_part(:,:,:)=zero
        resp_hetero_d=zero
+       resp_hetero_litter_d=zero
+       resp_hetero_soil_d=zero
        IF (printlev >= 3) THEN
           WRITE(numout,*) 'stomate_main: daily processes done'
@@ -2824,4 +2830,18 @@
     ENDIF
 
+    ALLOCATE(resp_hetero_litter_d(kjpindex,nvm),stat=ier)
+    l_error = l_error .OR. (ier /= 0)
+    IF (l_error) THEN
+       WRITE(numout,*) 'Memory allocation error for resp_hetero_litter_d. We stop. We need kjpindex*nvm words',kjpindex,nvm
+       STOP 'stomate_init'
+    ENDIF
+
+    ALLOCATE(resp_hetero_soil_d(kjpindex,nvm),stat=ier)
+    l_error = l_error .OR. (ier /= 0)
+    IF (l_error) THEN
+       WRITE(numout,*) 'Memory allocation error for resp_hetero_soil_d. We stop. We need kjpindex*nvm words',kjpindex,nvm
+       STOP 'stomate_init'
+    ENDIF
+
     ALLOCATE(resp_hetero_radia(kjpindex,nvm),stat=ier)
     l_error = l_error .OR. (ier /= 0)
@@ -3391,4 +3411,6 @@
     turnover_daily(:,:,:,:) = zero
     resp_hetero_d(:,:) = zero
+    resp_hetero_litter_d(:,:) = zero
+    resp_hetero_soil_d(:,:) = zero
     nep_daily(:,:) = zero
     nep_monthly(:,:) = zero
@@ -3504,4 +3526,6 @@
     IF (ALLOCATED(age))  DEALLOCATE(age)
     IF (ALLOCATED(resp_hetero_d)) DEALLOCATE(resp_hetero_d)
+    IF (ALLOCATED(resp_hetero_litter_d)) DEALLOCATE(resp_hetero_litter_d)
+    IF (ALLOCATED(resp_hetero_soil_d)) DEALLOCATE(resp_hetero_soil_d)
     IF (ALLOCATED(resp_hetero_radia)) DEALLOCATE(resp_hetero_radia)
     IF (ALLOCATED(resp_maint_d)) DEALLOCATE(resp_maint_d)
Index: tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/stomate_lpj.f90
===================================================================
--- tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/stomate_lpj.f90	(revision 6268)
+++ tags/ORCHIDEE_2_0/ORCHIDEE/src_stomate/stomate_lpj.f90	(revision 6367)
@@ -153,5 +153,5 @@
        lai, rprof,npp_daily, turnover_daily, turnover_time,&
        control_moist, control_temp, soilcarbon_input, &
-       co2_to_bm, co2_fire, resp_hetero, resp_maint, resp_growth, &
+       co2_to_bm, co2_fire, resp_hetero, resp_hetero_litter, resp_hetero_soil, resp_maint, resp_growth, &
        height, deadleaf_cover, vcmax, &
        bm_to_litter, &
@@ -248,4 +248,8 @@
     REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)            :: resp_hetero          !! Heterotrophic respiration
                                                                                        !! @tex $(gC m^{-2} dtslow^{-1})$ @endtex 
+    REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)            :: resp_hetero_litter   !! Heterotrophic respiration from litter
+                                                                                       !! @tex $(gC m^{-2} dtslow^{-1})$ @endtex
+    REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)            :: resp_hetero_soil     !! Heterotrophic respiration from soil
+                                                                                       !! @tex $(gC m^{-2} dtslow^{-1})$ @endtex
     REAL(r_std), DIMENSION(npts,nvm), INTENT(out)              :: resp_maint           !! Maintenance respiration  
                                                                                        !! @tex $(gC m^{-2} dtslow^{-1})$ @endtex 
@@ -800,5 +804,5 @@
          veget_cov_max, veget_cov_max_tmp, lai, &
          litter, carbon, turnover_daily, bm_to_litter, &
-         co2_to_bm, co2_fire, resp_hetero, resp_maint, resp_growth, gpp_daily)
+         co2_to_bm, co2_fire, resp_hetero, resp_hetero_litter, resp_hetero_soil, resp_maint, resp_growth, gpp_daily)
 
   !! 13. Update litter pools to account for harvest
@@ -1098,4 +1102,9 @@
 
     CALL xios_orchidee_send_field("rh",SUM(resp_hetero*veget_cov_max,dim=2)/1e3/one_day)
+    CALL xios_orchidee_send_field("rhLitter",SUM(resp_hetero_litter*veget_cov_max,dim=2)/1e3/one_day)
+    CALL xios_orchidee_send_field("rhSoil",SUM(resp_hetero_soil*veget_cov_max,dim=2)/1e3/one_day)
+    CALL xios_orchidee_send_field("HET_RESP_SOIL",resp_hetero_soil(:,:))
+    CALL xios_orchidee_send_field("HET_RESP_LITTER",resp_hetero_litter(:,:))
+
     CALL xios_orchidee_send_field("fFire",SUM(co2_fire*veget_cov_max,dim=2)/1e3/one_day)
     ctotfirelut(:,:)=xios_default_val
Index: tags/ORCHIDEE_2_0/ORCHIDEE/src_xml/field_def_orchidee.xml
===================================================================
--- tags/ORCHIDEE_2_0/ORCHIDEE/src_xml/field_def_orchidee.xml	(revision 6268)
+++ tags/ORCHIDEE_2_0/ORCHIDEE/src_xml/field_def_orchidee.xml	(revision 6367)
@@ -390,4 +390,6 @@
     <field id="MAXFPC_LASTYEAR" name="MAXFPC_LASTYEAR" long_name="Foliage projective cover of last year" unit="-" grid_ref="grid_nvm"/>
     <field id="HET_RESP" name="HET_RESP" long_name="heterotr. resp. from ground" unit="gC/m^2 tot/pft/day" grid_ref="grid_nvm"/>
+    <field id="HET_RESP_SOIL" name="HET_RESP_SOIL" long_name="heterotr. resp. from soil" unit="gC/m^2 tot/pft/day" grid_ref="grid_nvm"/>
+    <field id="HET_RESP_LITTER" name="HET_RESP_LITTER" long_name="heterotr. resp. from litter" unit="gC/m^2 tot/pft/day" grid_ref="grid_nvm"/>
     <field id="firefrac" name="FIREFRAC" long_name="Fire fraction on ground " unit="1/day" grid_ref="grid_nvm"/>
     <field id="CO2_FIRE" name="CO2_FIRE" long_name="Output CO2 flux from fire " unit="gC/day/m^2/pft" grid_ref="grid_nvm"/>
@@ -511,6 +513,6 @@
     <field id="npp_ipcc" name="npp" long_name="Net Primary Production (positive from atm to land)" unit="kg C m-2 s-1"/>
     <field id="rh" name="rh" long_name="Heterotrophic Respiration (positive from atm to land)" unit="kg C m-2 s-1"/>
-    <field id="rhSoil" name="rhSoil" long_name="Carbon mass flux due to heterotrophic respiration from soil on land (positive from land to atm)" unit="kg C m-2 s-1"  > this*(-1) </field>
-    <field id="rhLitter" name="rhLitter" long_name="Carbon mass flux due to heterotrophic respiration from litter on land (positive from land to atm)" unit="kg C m-2 s-1"  > this*(-1) </field>
+    <field id="rhSoil" name="rhSoil" long_name="Carbon mass flux due to heterotrophic respiration from soil on land (positive from land to atm)" unit="kg C m-2 s-1" /> 
+    <field id="rhLitter" name="rhLitter" long_name="Carbon mass flux due to heterotrophic respiration from litter on land (positive from land to atm)" unit="kg C m-2 s-1" /> 
     <field id="tSoilPools" name="tSoilPools" long_name="soil_carbon_turnover_rate : defined as 1/(turnover time) for soil pools." unit="s-1" grid_ref="grid_ncarb"/>
     <field id="fFire" name="fFire" long_name="CO2 Emission from Fire (positive from atm to land)" unit="kg C m-2 s-1"/>
Index: tags/ORCHIDEE_2_0/ORCHIDEE/src_xml/file_def_orchidee.xml
===================================================================
--- tags/ORCHIDEE_2_0/ORCHIDEE/src_xml/file_def_orchidee.xml	(revision 6268)
+++ tags/ORCHIDEE_2_0/ORCHIDEE/src_xml/file_def_orchidee.xml	(revision 6367)
@@ -715,6 +715,6 @@
   <file id="stomate1" name="stomate_history" output_level="_AUTO_" output_freq="_AUTO_" enabled="_AUTO_">
     <!-- level 1 -->
-    <field field_ref="RESOLUTION_X" level="1"/>
-    <field field_ref="RESOLUTION_Y" level="1"/>
+    <field field_ref="RESOLUTION_X" level="0"/>
+    <field field_ref="RESOLUTION_Y" level="0"/>
     <field field_ref="CONTFRAC_STOMATE" level="0"/>
     <field field_ref="areas" level="0"/>
@@ -845,4 +845,7 @@
     <!-- level 10 -->
     <field field_ref="FIREINDEX" level="10"/>
+    <field field_ref="HET_RESP_SOIL" level="10"/>
+    <field field_ref="HET_RESP_LITTER" level="10"/>
+ 
   </file>
 
