Index: /trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_inputs_physiq_mod.F
===================================================================
--- /trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_inputs_physiq_mod.F	(revision 2871)
+++ /trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_inputs_physiq_mod.F	(revision 2872)
@@ -26,7 +26,7 @@
   REAL,INTENT(OUT) :: MY
   REAL :: sec,nsec
-  
+  print*,'GMT, elaps/3600=',GMT,elaps/3600.
   !IF (JULYR .le. 8999) THEN
-  !  if (tlocked .eqv. .false.) THEN
+    if (tlocked .eqv. .false.) THEN
       JH_cur_split = (GMT + elaps/3600.) !! universal time (0<JH_cur_split<1): JH_cur_split=0.5 at 12:00 UT 
       JH_cur_split = MODULO(JH_cur_split,24.)   !! the two arguments of MODULO must be of the same type 
@@ -51,6 +51,7 @@
   !    !ptime = lct_input - lon_input / 15. + elaps/3600.
   !    !pday =  INT((3600*(lct_input - lon_input / 15.) + elaps)/86400)
-  !  ELSE
-  !    JH_cur_split = lct_input - lon_input / 15. !+ elaps/1500.0
+  ELSE
+       JH_cur_split = 0.
+       JD_cur = 0.
   !    !pday =  INT((sec*(lct_input - lon_input / 15.)+ elaps)/36000)
   !    JD_cur =  INT((sec*(lct_input - lon_input / 15.))/3600)
@@ -63,5 +64,5 @@
   !    MY = 2024
   !  ENDIF
-  !ENDIF
+  ENDIF
 
 
@@ -86,9 +87,4 @@
     noms(1)="h2o_vap"
     noms(2)="h2o_ice"
-  else if (TRACER_MODE .eq. 22)  then 
-    nqtot=2
-    IF (.not.ALLOCATED(noms)) ALLOCATE(noms(nqtot)) !! est fait dans initracer normalement
-    noms(1)="co2_vap"
-    noms(2)="co2_ice"
   else
     nq=1
@@ -325,18 +321,7 @@
      SELECT CASE (TRACER_MODE)
        CASE(1)
-       qsurf(subs,2)=M_H2OICE(i,j)    !! logique avec noms(2) = 'h2o_ice' defini ci-dessus
+         qsurf(subs,2)=M_H2OICE(i,j)  !! logique avec noms(2) = 'h2o_ice' defini ci-dessus
                                       !! ----- retrocompatible ancienne physique
                                       !! ----- [H2O ice is last tracer in qsurf in LMD physics]
-       CASE(2)   
-       qsurf(subs,1)=0.                !! not coupled with lifting for the moment [non remobilise]
-       !CASE(3)
-       !qsurf(subs,1)=q_prof(1,1)                !!! temporaire, a definir       
-       !qsurf(subs,2)=q_prof(1,2)     
-       CASE(11)
-       qsurf(subs,2)=M_H2OICE(i,j)    !! logique avec noms(2) = 'h2o_ice' defini ci-dessus
-       qsurf(subs,3)=0.                !! not coupled with lifting for the moment [non remobilise]
-       CASE(12)
-       qsurf(subs,2)=M_H2OICE(i,j)    !! logique avec noms(2) = 'h2o_ice' defini ci-dessus
-       qsurf(subs,3)=0.                !! not coupled with lifting for the moment [non remobilise]
      END SELECT
 
Index: /trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_outputs_physiq_mod.F
===================================================================
--- /trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_outputs_physiq_mod.F	(revision 2871)
+++ /trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_outputs_physiq_mod.F	(revision 2872)
@@ -156,8 +156,5 @@
             ims,ime,jms,jme,kms,kme,&
             ips,ipe,jps,jpe,kps,kpe,&
-            SWDOWNZ,TAU_DUST,QSURFDUST,&
-            MTOT,ICETOT,TAU_ICE,&
-            HR_SW,HR_LW,HR_DYN,DT,DT_RAD,&
-            RDUST,VMR_ICE,RICE,&
+            HR_SW,HR_LW,HR_DYN,DT_RAD,&
             CLOUDFRAC,TOTCLOUDFRAC,RH,&
             DQICE,DQVAP,REEVAP,SURFRAIN,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
@@ -169,10 +166,8 @@
    INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe
    REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: &
-     SWDOWNZ,TAU_DUST,QSURFDUST,&
-     MTOT,ICETOT,TAU_ICE,&
      TOTCLOUDFRAC,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
      FLUXSURF_LW,FLXGRD,LATENT_HF,REEVAP,SURFRAIN
    REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &
-     HR_SW,HR_LW,RDUST,VMR_ICE,RICE,CLOUDFRAC,HR_DYN,DT,DT_RAD,RH,DQICE,DQVAP,&
+     HR_SW,HR_LW,CLOUDFRAC,HR_DYN,DT_RAD,RH,DQICE,DQVAP,&
      DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF
    INTEGER :: i,j,subs
Index: /trunk/WRF.COMMON/INTERFACES_V4/module_lmd_driver.F
===================================================================
--- /trunk/WRF.COMMON/INTERFACES_V4/module_lmd_driver.F	(revision 2871)
+++ /trunk/WRF.COMMON/INTERFACES_V4/module_lmd_driver.F	(revision 2872)
@@ -42,10 +42,8 @@
         CST_AL, CST_TI, &
         isfflx, diff_opt, km_opt, &
-        HR_SW,HR_LW,HR_DYN,DDT,DT_RAD,DT_VDF,&
+        HR_SW,HR_LW,HR_DYN,DT_RAD,&
         CLOUDFRAC,TOTCLOUDFRAC,RH, &
         DQICE,DQVAP,REEVAP,SURFRAIN,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
-        FLUXSURF_LW,FLXGRD,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF,LATENT_HF,SWDOWNZ,&
-        TAU_DUST,RDUST,QSURFDUST,&
-        MTOT,ICETOT,VMR_ICE,TAU_ICE,RICE,&
+        FLUXSURF_LW,FLXGRD,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF,LATENT_HF,&
         HFMAX,ZMAX,&
         USTM,HFX,&
@@ -106,7 +104,4 @@
      PSFC,TSK
 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(OUT) :: &
-     SWDOWNZ,&
-     TAU_DUST,QSURFDUST,&
-     MTOT,ICETOT,TAU_ICE,&
      HFMAX,ZMAX,&
      USTM,HFX,TOTCLOUDFRAC,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
@@ -118,5 +113,5 @@
 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT ) :: &
      RTHPLATEN,RUPLATEN,RVPLATEN, &
-     HR_SW,HR_LW,HR_DYN,DDT,DT_RAD,DT_VDF,RDUST,VMR_ICE,RICE,&
+     HR_SW,HR_LW,HR_DYN,DT_RAD,&
      CLOUDFRAC,RH,DQICE,DQVAP,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF
 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: &
@@ -440,12 +435,15 @@
 ! specific treatment for tracers !
 !--------------------------------!
-IF (TRACER_MODE .EQ. 0) THEN
-    q_prof(:,1)=0.95
-ELSE IF (TRACER_MODE .GE. 1) THEN
+IF (TRACER_MODE == 1) THEN
     ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc.
     q_prof(:,1) = SCALAR(i,kps:kpe,j,P_QH2O) / (1.d0 + SCALAR(i,kps:kpe,j,P_QH2O)) !! P_xxx is the index for variable xxx.
     q_prof(:,2) = SCALAR(i,kps:kpe,j,P_QH2O_ICE) / (1.d0 + SCALAR(i,kps:kpe,j,P_QH2O))
     ! conversion from mass mixing ratio in WRF to specific concentration in Physiq
-ELSE IF (TRACER_MODE .GE. 42) THEN
+ELSE IF ((TRACER_MODE == 42).OR.(TRACER_MODE == 43)) THEN
+    ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc.
+    q_prof(:,1) = moist(i,kps:kpe,j,P_QV) / (1.d0 + moist(i,kps:kpe,j,P_QV)) !! P_xxx is the index for variable xxx.
+    q_prof(:,2) = moist(i,kps:kpe,j,P_QC) / (1.d0 + moist(i,kps:kpe,j,P_QV))
+    ! conversion from mass mixing ratio in WRF to specific concentration in Physiq
+ELSE IF ((TRACER_MODE == 44).OR.(TRACER_MODE == 45)) THEN
     ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc.
     q_prof(:,1) = moist(i,kps:kpe,j,P_QV) / (1.d0 + moist(i,kps:kpe,j,P_QV)) !! P_xxx is the index for variable xxx.
@@ -455,17 +453,4 @@
     q_prof(:,1:nq) = SCALAR(i,kps:kpe,j,2:nq+1)  !! the names were set above !! one dummy tracer in WRF
     !JL22 cannot normalize to moist here as we do not know if it has been initialized.
-ENDIF
-
-IF (TRACER_MODE .EQ. 20) THEN
-  IF (firstcall .EQV. .true. .and. (.not. restart)) THEN
-      q_prof(:,:) = 0.95
-  ENDIF
-ENDIF
-
-IF (TRACER_MODE .EQ. 32) THEN
-  IF (firstcall .EQV. .true. .and. (.not. restart)) THEN
-      q_prof(:,7) = 0.95
-!! traceurs(7)   = 'co2'
-  ENDIF
 ENDIF
 
@@ -667,8 +652,5 @@
             ims,ime,jms,jme,kms,kme,&
             ips,ipe,jps,jpe,kps,kpe,&
-            SWDOWNZ,TAU_DUST,QSURFDUST,&
-            MTOT,ICETOT,TAU_ICE,&
-            HR_SW,HR_LW,HR_DYN,DDT,DT_RAD,&
-            RDUST,VMR_ICE,RICE,&
+            HR_SW,HR_LW,HR_DYN,DT_RAD,&
             CLOUDFRAC,TOTCLOUDFRAC,RH,&
             DQICE,DQVAP,REEVAP,SURFRAIN,&
@@ -721,10 +703,4 @@
     CASE(0)
       SCALAR(i,kps:kpe,j,:)=0.
-    CASE(20)
-      !! tracer mode 20 : add a passive tracer with radioactive-like decay
-      IF ( (i == ips) .AND. (j == jps) )   print *, 'RADIOACTIVE-LIKE TRACER WITH SOURCE AT SURFACE LAYER.'
-      tau_decay=60.*10. !! why not make it a namelist argument?
-      SCALAR(i,kps:kpe,j,2) = SCALAR(i,kps:kpe,j,2)*exp(-dt/tau_decay)
-      SCALAR(i,1,j,2) = SCALAR(i,1,j,2) + 1. !! this tracer is emitted in the surface layer
     CASE(1)
       scalar(i,kps:kpe,j,P_QH2O)=scalar(i,kps:kpe,j,P_QH2O) &
@@ -737,17 +713,32 @@
       moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) &
           +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
-      scalar(i,kps:kpe,j,P_QH2O_ICE)=scalar(i,kps:kpe,j,P_QH2O_ICE) &
+      moist(i,kps:kpe,j,P_QC)=moist(i,kps:kpe,j,P_QC) &
            +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
-       ! if you want to use this mode, RTHPLATEN should be corrected as below. 
-       ! we keep it like that for the moment for testing.
+      RTHPLATEN(i,kps:kpe,j) = RTHPLATEN(i,kps:kpe,j) &
+           * (1.d0+moist(i,kps:kpe,j,P_QV))/(1.d0+rvovrd*moist(i,kps:kpe,j,P_QV))
+           ! correct dT/dt assuming a constant molar heat capacity.
+           ! Specific heat cappacity scales with molar mass. 
     CASE(43)
+      moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) &
+          +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
+      moist(i,kps:kpe,j,P_QC)=moist(i,kps:kpe,j,P_QC) &
+           +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
+      tau_decay=86400.*100. !! why not make it a namelist argument?
+      SCALAR(i,kps:kpe,j,P_MARKER) = SCALAR(i,kps:kpe,j,P_MARKER)*exp(-dt/tau_decay)
+      SCALAR(i,1,j,P_MARKER) = 1. !! this tracer is emitted in the surface layer
+      RTHPLATEN(i,kps:kpe,j) = RTHPLATEN(i,kps:kpe,j) &
+        * (1.d0+moist(i,kps:kpe,j,P_QV))/(1.d0+rvovrd*moist(i,kps:kpe,j,P_QV))
+        ! correct dT/dt assuming a constant molar heat capacity.
+        ! Specific heat cappacity scales with molar mass. 
+    CASE(44)
       moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) &
           +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
       scalar(i,kps:kpe,j,P_QH2O_ICE)=scalar(i,kps:kpe,j,P_QH2O_ICE) &
            +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
-      RTHPLATEN(i,kps:kpe,j) = RTHPLATEN(i,kps:kpe,j) &
-        * (1.d0+moist(i,kps:kpe,j,P_QV))/(1.d0+rvovrd*moist(i,kps:kpe,j,P_QV))
-        ! correct dT/dt assuming a constant molar heat capacity.
-        ! Specific heat cappacity scales with molar mass. 
+    CASE(45)
+      moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) &
+          +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
+      scalar(i,kps:kpe,j,P_QH2O_ICE)=scalar(i,kps:kpe,j,P_QH2O_ICE) &
+           +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
       tau_decay=86400.*100. !! why not make it a namelist argument?
       SCALAR(i,kps:kpe,j,P_MARKER) = SCALAR(i,kps:kpe,j,P_MARKER)*exp(-dt/tau_decay)
Index: /trunk/WRF.COMMON/INTERFACES_V4/module_model_constants.F
===================================================================
--- /trunk/WRF.COMMON/INTERFACES_V4/module_model_constants.F	(revision 2871)
+++ /trunk/WRF.COMMON/INTERFACES_V4/module_model_constants.F	(revision 2872)
@@ -312,5 +312,5 @@
      rfcp         =0.25/cp
      p608         =rvovrd-1.
-     z_scale      =(r_d*t0/g)*1e-3
+     z_scale      =(r_d*t0/g)
     write(*,*) "planet : ", planet
     write(*,*) "g = ", g
