Index: trunk/mesoscale/LMD_MM_MARS/SRC/POSTPROC/namelist.api_sav
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/POSTPROC/namelist.api_sav	(revision 65)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link /u/aslmd/Save/MODELES/POSTPROC/namelist.api
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F	(revision 65)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F	(revision 67)
@@ -209,11 +209,11 @@
 !**************************************************
 ! IMPORTANT: pour travailler avec grid nesting
-!       mieux vaut ne pas utiliser de SAVE ??
+!  une dimension supplementaire liee au nest
 !**************************************************
-      REAL, DIMENSION(:), ALLOCATABLE, SAVE :: &
+      REAL, DIMENSION(:,:), ALLOCATABLE, SAVE :: &
              dp_save
-      REAL, DIMENSION(:,:), ALLOCATABLE, SAVE :: &
+      REAL, DIMENSION(:,:,:), ALLOCATABLE, SAVE :: &
              du_save, dv_save, dt_save
-      REAL, DIMENSION(:,:,:), ALLOCATABLE, SAVE :: &
+      REAL, DIMENSION(:,:,:,:), ALLOCATABLE, SAVE :: &
              dq_save      
 
@@ -327,14 +327,21 @@
       !firstcall=.false. ! just in case you'd want to get rid of the physics 
 test=0
-ALLOCATE(dp_save(ngrid)) !! here are the arrays that would be useful to save physics tendencies
-ALLOCATE(du_save(ngrid,nlayer))
-ALLOCATE(dv_save(ngrid,nlayer)) 
-ALLOCATE(dt_save(ngrid,nlayer))     
-ALLOCATE(dq_save(ngrid,nlayer,nq)) 
-dp_save(:)=0.    !! initialize these arrays ...
-du_save(:,:)=0.
-dv_save(:,:)=0.
-dt_save(:,:)=0.    
-dq_save(:,:,:)=0.
+
+PRINT *, 'ALLOCATED dp_save ???', ALLOCATED( dp_save ), id
+IF( .NOT. ALLOCATED( dp_save  ) ) THEN
+   PRINT *, '**** check **** OK I ALLOCATE one save ARRAY for all NESTS ', max_dom, id
+   !! here are the arrays that would be useful to save physics tendencies
+   ALLOCATE(dp_save(ngrid,max_dom)) 
+   ALLOCATE(du_save(ngrid,nlayer,max_dom))
+   ALLOCATE(dv_save(ngrid,nlayer,max_dom)) 
+   ALLOCATE(dt_save(ngrid,nlayer,max_dom))     
+   ALLOCATE(dq_save(ngrid,nlayer,nq,max_dom)) 
+   dp_save(:,:)=0.    !! initialize these arrays ...
+   du_save(:,:,:)=0.
+   dv_save(:,:,:)=0.
+   dt_save(:,:,:)=0.
+   dq_save(:,:,:,:)=0.
+ENDIF
+
 !! put here some general information you'd like to print just once
     print *, 'TILES: ', i_start,i_end, j_start, j_end  ! numbers for simple runs, arrays for parallel runs
@@ -411,8 +418,14 @@
 
 print *, 'check dynamics'
-print *, 'u', MAXVAL(u), MINVAL(u)
-print *, 'v', MAXVAL(v), MINVAL(v)
-print *, 'w', MAXVAL(w), MINVAL(w)
-print *, 't', MAXVAL(t), MINVAL(t, MASK = t > 0)
+  !!! in some cases, weird values are displayed
+  !!! despite the fact that outputs are OK...
+  !print *, 'u', MAXVAL(u), MINVAL(u)
+  !print *, 'v', MAXVAL(v), MINVAL(v)
+  !print *, 'w', MAXVAL(w), MINVAL(w)
+  !print *, 't', MAXVAL(t), MINVAL(t, MASK = t > 0)
+print *, 'u', u(10,1,10), u(10,15,10)
+print *, 'v', v(10,1,10), v(10,15,10)
+print *, 'w', w(10,1,10), w(10,15,10) 
+print *, 't', t(10,1,10), t(10,15,10)
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -494,11 +507,9 @@
 IF (test.NE.0) THEN
 print *,'** Mars ** NO CALL FOR PHYSICS, go to next step...',test
-pdpsrf(:)=dp_save(:)
-pdu(:,:)=du_save(:,:)
-pdv(:,:)=dv_save(:,:)
-pdt(:,:)=dt_save(:,:)
-pdq(:,:,:)=dq_save(:,:,:)
-        !!!!!TEST TEST
-        !!!!!pour le nesting c est mieux de les mettre dans la physique, les SAVE
+pdpsrf(:)=dp_save(:,id)
+pdu(:,:)=du_save(:,:,id)
+pdv(:,:)=dv_save(:,:,id)
+pdt(:,:)=dt_save(:,:,id)
+pdq(:,:,:)=dq_save(:,:,:,id)
 !!!
 !!! BIG LOOP : 2. calculate physical tendencies
@@ -1004,9 +1015,9 @@
 ! PHYSIQ TENDENCIES ARE SAVED TO BE SPLIT WITHIN INTERMEDIATE DYNAMICAL TIMESTEPS !
 !---------------------------------------------------------------------------------!
-dp_save(:)=pdpsrf(:)
-du_save(:,:)=pdu(:,:)
-dv_save(:,:)=pdv(:,:)
-dt_save(:,:)=pdt(:,:)
-dq_save(:,:,:)=pdq(:,:,:)
+dp_save(:,id)=pdpsrf(:)
+du_save(:,:,id)=pdu(:,:)
+dv_save(:,:,id)=pdv(:,:)
+dt_save(:,:,id)=pdt(:,:)
+dq_save(:,:,:,id)=pdq(:,:,:)
 
 ENDIF call_physics
@@ -1113,13 +1124,15 @@
 PRINT *, '** Mars ** Results from LMD physics'
 PRINT *, 'u non-zero tendencies'
-PRINT *, 'max',MAXVAL(RUBLTEN, MASK=RUBLTEN/=0.),&
-        ' at',MAXLOC(RUBLTEN, MASK=RUBLTEN/=0.)
-PRINT *, 'min',MINVAL(RUBLTEN, MASK=RUBLTEN/=0.),&
-        ' at',MINLOC(RUBLTEN, MASK=RUBLTEN/=0.)
+!!PRINT *, 'max',MAXVAL(RUBLTEN, MASK=RUBLTEN/=0.),&
+!!        ' at',MAXLOC(RUBLTEN, MASK=RUBLTEN/=0.)
+!!PRINT *, 'min',MINVAL(RUBLTEN, MASK=RUBLTEN/=0.),&
+!!        ' at',MINLOC(RUBLTEN, MASK=RUBLTEN/=0.)
+PRINT *, RUBLTEN(10,1,10), RUBLTEN(10,15,10)
 PRINT *, 'v non-zero tendencies'
-PRINT *, 'max',MAXVAL(RVBLTEN, MASK=RVBLTEN/=0.),&
-        ' at',MAXLOC(RVBLTEN, MASK=RVBLTEN/=0.)
-PRINT *, 'min',MINVAL(RVBLTEN, MASK=RVBLTEN/=0.),&
-        ' at',MINLOC(RVBLTEN, MASK=RVBLTEN/=0.)
+!!PRINT *, 'max',MAXVAL(RVBLTEN, MASK=RVBLTEN/=0.),&
+!!        ' at',MAXLOC(RVBLTEN, MASK=RVBLTEN/=0.)
+!!PRINT *, 'min',MINVAL(RVBLTEN, MASK=RVBLTEN/=0.),&
+!!        ' at',MINLOC(RVBLTEN, MASK=RVBLTEN/=0.)
+PRINT *, RVBLTEN(10,1,10), RVBLTEN(10,15,10)
 !!! STOP IF CRASH
 !IF (MAXVAL(RUBLTEN, MASK=RUBLTEN/=0.) == 0.) STOP
