Index: LMDZ5/branches/testing/libf/phylmd/1D_read_forc_cases.h
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/1D_read_forc_cases.h	(revision 2056)
+++ LMDZ5/branches/testing/libf/phylmd/1D_read_forc_cases.h	(revision 2160)
@@ -290,9 +290,6 @@
 
       if (forcing_amma) then
-!read AMMA forcings
-      fich_amma='amma.nc'
-      call read_amma(fich_amma,nlev_amma,nt_amma                            &
-     &     ,z_amma,plev_amma,th_amma,q_amma,u_amma,v_amma,vitw_amma         &
-     &     ,ht_amma,hq_amma,sens_amma,lat_amma)
+
+      call read_1D_cases
 
       write(*,*) 'Forcing AMMA lu'
@@ -357,4 +354,117 @@
       endif !forcing_amma
 
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!---------------------------------------------------------------------
+! Forcing from DICE experiment (see file DICE_protocol_vn2-3.pdf)
+!---------------------------------------------------------------------
+
+      if (forcing_dice) then
+!read DICE forcings
+      fich_dice='dice_driver.nc'
+      call read_dice(fich_dice,nlev_dice,nt_dice                    &
+     &     ,zz_dice,plev_dice,th_dice,qv_dice,u_dice,v_dice,o3_dice &
+     &     ,shf_dice,lhf_dice,lwup_dice,swup_dice,tg_dice,ustar_dice& 
+     &     ,psurf_dice,ug_dice,vg_dice,ht_dice,hq_dice              &
+     &     ,hu_dice,hv_dice,w_dice,omega_dice)
+
+      write(*,*) 'Forcing DICE lu'
+
+!champs initiaux:
+      do k=1,nlev_dice
+         th_dicei(k)=th_dice(k)
+         qv_dicei(k)=qv_dice(k)
+         u_dicei(k)=u_dice(k)
+         v_dicei(k)=v_dice(k)
+         o3_dicei(k)=o3_dice(k)
+         ht_dicei(k)=ht_dice(k,1)
+         hq_dicei(k)=hq_dice(k,1)
+         hu_dicei(k)=hu_dice(k,1)
+         hv_dicei(k)=hv_dice(k,1)
+         w_dicei(k)=w_dice(k,1)
+         omega_dicei(k)=omega_dice(k,1)
+      enddo   
+      omega(:)=0.      
+      omega2(:)=0.
+      rho(:)=0.
+! vertical interpolation using TOGA interpolation routine:
+!      write(*,*)'avant interp vert', t_proftwp
+!
+!     CALL interp_dice_time(daytime,day1,annee_ref
+!    i             ,year_ini_dice,day_ju_ini_dice,nt_dice,dt_dice
+!    i             ,nlev_dice,shf_dice,lhf_dice,lwup_dice,swup_dice
+!    i             ,tg_dice,ustar_dice,psurf_dice,ug_dice,vg_dice
+!    i             ,ht_dice,hq_dice,hu_dice,hv_dice,w_dice,omega_dice
+!    o             ,shf_prof,lhf_prof,lwup_prof,swup_prof,tg_prof
+!    o             ,ustar_prof,psurf_prof,ug_profd,vg_profd
+!    o             ,ht_profd,hq_profd,hu_profd,hv_profd,w_profd
+!    o             ,omega_profd)
+
+      CALL interp_dice_vertical(play,nlev_dice,nt_dice,plev_dice       &
+     &         ,th_dicei,qv_dicei,u_dicei,v_dicei,o3_dicei             &
+     &         ,ht_dicei,hq_dicei,hu_dicei,hv_dicei,w_dicei,omega_dicei&
+     &         ,th_mod,qv_mod,u_mod,v_mod,o3_mod                       &
+     &         ,ht_mod,hq_mod,hu_mod,hv_mod,w_mod,omega_mod,mxcalc)
+
+! Pour tester les advections horizontales de T et Q, on met w_mod et omega_mod à zero (MPL 20131108)
+!     w_mod(:,:)=0.
+!     omega_mod(:,:)=0.
+
+!       write(*,*) 'Profil initial forcing DICE interpole',t_mod
+! Les forcages DICE sont donnes /jour et non /seconde !
+      ht_mod(:)=ht_mod(:)/86400.
+      hq_mod(:)=hq_mod(:)/86400.
+      hu_mod(:)=hu_mod(:)/86400.
+      hv_mod(:)=hv_mod(:)/86400.
+
+! initial and boundary conditions :
+      write(*,*) 'SST initiale mxcalc: ',tsurf,mxcalc
+      do l = 1, llm
+! Ligne du dessous à decommenter si on lit theta au lieu de temp
+       temp(l) = th_mod(l)*(play(l)/pzero)**rkappa 
+!      temp(l) = t_mod(l) 
+       q(l,1) = qv_mod(l)
+       q(l,2) = 0.0
+!      print *,'read_forc: l,temp,q=',l,temp(l),q(l,1)
+       u(l) = u_mod(l)
+       v(l) = v_mod(l)
+       ug(l)=ug_dice(1)
+       vg(l)=vg_dice(1)
+       rho(l)  = play(l)/(rd*temp(l)*(1.+(rv/rd-1.)*q(l,1)))
+!      omega(l) = w_mod(l)*(-rg*rho(l))
+       omega(l) = omega_mod(l)
+       omega2(l)=omega(l)/rg*airefi ! flxmass_w calcule comme ds physiq
+
+       alpha = rd*temp(l)*(1.+(rv/rd-1.)*q(l,1))/play(l)
+!on applique le forcage total au premier pas de temps
+!attention: signe different de toga
+       d_th_adv(l) = alpha*omega(l)/rcpd+ht_mod(l)
+!forcage en th
+!       d_th_adv(l) = ht_mod(l)
+       d_q_adv(l,1) = hq_mod(l)
+       d_q_adv(l,2) = 0.0
+       dt_cooling(l)=0.
+      enddo     
+       write(*,*) 'Profil initial forcing DICE interpole temp39',temp(39)
+      
+
+!     ok_flux_surf=.false.
+      fsens=-1.*shf_dice(1)
+      flat=-1.*lhf_dice(1)
+! Le cas Dice doit etre force avec ustar mais on peut simplifier en forcant par 
+! le coefficient de trainee en surface cd**2=ustar*vent(k=1)
+! On commence ici a stocker ustar dans cdrag puis on terminera le calcul dans pbl_surface
+! MPL 05082013
+      ust=ustar_dice(1)
+      tg=tg_dice(1)
+      print *,'ust= ',ust
+      IF (tsurf .LE. 0.) THEN
+       tsurf= tg_dice(1)
+      ENDIF
+      psurf= psurf_dice(1)
+      solsw_in = (1.-albedo)/albedo*swup_dice(1)
+      sollw_in = (0.7*RSIGMA*temp(1)**4)-lwup_dice(1)
+      PRINT *,'1D_READ_FORC : solsw, sollw',solsw_in,sollw_in
+      endif !forcing_dice
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
