Index: /trunk/src/Makefile
===================================================================
--- /trunk/src/Makefile	(revision 52)
+++ /trunk/src/Makefile	(revision 53)
@@ -1,4 +1,5 @@
+#GENOPT=-DOPTIMORDER -DSOLSORYAO -E
+#GENOPT= -E
 GENOPT=-DOPTIMORDER -E
-#GENOPT= -E
 YAOPT=  -p +O3 -x sinobad
 
@@ -14,3 +15,3 @@
 
 clean:
-	rm essai.c
+	rm -f essai.c
Index: /trunk/src/cost.dat
===================================================================
--- /trunk/src/cost.dat	(revision 52)
+++ /trunk/src/cost.dat	(revision 53)
@@ -2,2 +2,53 @@
  0.0000000000000000e+00
  0.0000000000000000e+00
+ 2.9733593674719423e+03
+ 5.4561410776679122e+02
+ 2.4475352252509134e+02
+ 2.6358555318068841e+02
+ 2.1527711430855038e+02
+ 2.0204126463990215e+02
+ 2.1416662011590833e+02
+ 2.0207208737645496e+02
+ 2.0211049147089304e+02
+ 2.0235703823123197e+02
+ 2.0019969413511828e+02
+ 2.2286623273509434e+02
+ 1.9878349444274735e+02
+ 2.0070292696001030e+02
+ 2.0014258993979595e+02
+ 1.9972801663599338e+02
+ 1.9293537153893590e+02
+ 2.0814944891652880e+02
+ 1.8213155756443817e+02
+ 1.7950672225933866e+02
+ 1.8080233872884580e+02
+ 1.7876027971923725e+02
+ 2.0259497236690703e+02
+ 1.7881103040469617e+02
+ 1.7886996041817454e+02
+ 1.7907554124113310e+02
+ 1.8045371934564810e+02
+ 1.7569372841627006e+02
+ 1.9113648527038990e+02
+ 1.7516955251891332e+02
+ 1.9550146370923514e+02
+ 1.7455342251319595e+02
+ 2.1077987977826763e+02
+ 1.7473743190883036e+02
+ 1.7476659805882767e+02
+ 1.7491607437730161e+02
+ 1.7534570209262407e+02
+ 1.7146968928574532e+02
+ 1.7918664114219453e+02
+ 1.7311809756377912e+02
+ 1.7320818032615955e+02
+ 1.7322190117805096e+02
+ 1.7328346667692077e+02
+ 1.7390681350015083e+02
+ 1.7091883954920155e+02
+ 1.7074257389516592e+02
+ 1.7423942813610816e+02
+ 1.7069031205380722e+02
+ 1.7425456057653693e+02
+ 1.7425631257707835e+02
+ 1.7425753342598696e+02
Index: /trunk/src/gcx2.h
===================================================================
--- /trunk/src/gcx2.h	(revision 52)
+++ /trunk/src/gcx2.h	(revision 53)
@@ -17,6 +17,9 @@
   }
   else
-    //    YS1=gcx(Yi,Yj);
+#ifdef SOLSOR
+     YS1=gcx(Yi,Yj);
+#else
                YS1=  x1;
+#endif
   //
 }
Index: /trunk/src/sinobad.d
===================================================================
--- /trunk/src/sinobad.d	(revision 52)
+++ /trunk/src/sinobad.d	(revision 53)
@@ -1,7 +1,8 @@
-#define SOLSORYAO
+//#define SOLSORYAO
 //#define OPTIMORDER
 //#==============================================================================
-//# 		fichier de DESCRIPTION sinobad1.d
+//# 		fichier de DESCRIPTION sinobad.d
 //#Mohamed Berrada 26/02/2009
+//#modification (#define) Julien Brajard 06/2011
 //#==============================================================================
 //#DEFVAL ---------------------------------------------DEFVAL
@@ -15,4 +16,7 @@
 defval TU       2 | start time step
 //#exec disp_valdef
+#ifndef SOLSORYAO
+defval SOLSOR
+#endif
 
 //#HAT_NAME -----------------------------------------HAT_NAME
@@ -40,6 +44,8 @@
 space  S3d  	 M    NX NY NZ    Tcst
 space  S3dt      M    NX NY NZ    Tsbd
+#ifdef SOLSORYAO
 space  S3dt_b	 M    NX NY NZ	  Tsbd
 space  Ssolsor	 M    NX NY NMAX  Tsbd
+#endif
 
 exec disp_space
@@ -196,32 +202,45 @@
 modul	gcb_dynspg_flt		space	S3dt inter YA1 YA2 	input 4	    	  output 1	tempo	
 modul	gcx_dynspg_flt		space	S3dt inter YA1 YA2 	input 2	  	  output 1	tempo	
-//modul	solsor_dynspg_flt	space	S3dt inter YA1 YA2	input array 19	  output 1	tempo
+#ifndef SOLSORYAO
+modul	solsor_dynspg_flt	space	S3dt inter YA1 YA2	input array 19	  output 1	tempo
+#endif
+
+#ifdef SOLSORYAO
 modul   solsor_gx1_x_r		space	Ssolsor	       		input 8           output 2      tempo 
 modul   solsor_gx2_x_r		space	Ssolsor	       		input 9           output 2      tempo 
 modul   solsor_flag             space	Ssolsor	       		input 4           output 2      tempo
-modul	gcx2			space	S3dt_b inter YA1 YA2 	input 1		  output 1	tempo	
-modul	spguv_dynspg_flt	space	S3dt_b inter YA1 YA2	input 3	  	  output 2	tempo	
-modul	ua			space	S3dt_b	       		input 3		  output 1	tempo
-modul	va			space	S3dt_b			input 3	    	  output 1	tempo
-modul	sshn			space	S3dt_b inter YA1  YA2	input 4	  	  output 1	tempo	
-modul	sshb			space	S3dt_b inter YA1  YA2	input 4	  	  output 1	tempo  cout
+#define S3dt S3dt_b
+#endif
+
+
+modul	gcx2			space	S3dt inter YA1 YA2 	input 1		  output 1	tempo	
+modul	spguv_dynspg_flt	space	S3dt inter YA1 YA2	input 3	  	  output 2	tempo	
+modul	ua			space	S3dt	       		input 3		  output 1	tempo
+modul	va			space	S3dt			input 3	    	  output 1	tempo
+modul	sshn			space	S3dt inter YA1  YA2	input 4	  	  output 1	tempo	
+modul	sshb			space	S3dt inter YA1  YA2	input 4	  	  output 1	tempo  cout
 //##END_dyn_spg
 
 //##START_dyn_nxt
 //#nxt : filtre d'asselin
-modul	 ub			space	S3dt_b	       		input 4	 	  output 1	tempo cout
-modul	 vb			space	S3dt_b	       		input 4	 	  output 1	tempo cout
+modul	 ub			space	S3dt	       		input 4	 	  output 1	tempo cout
+modul	 vb			space	S3dt	       		input 4	 	  output 1	tempo cout
 //##END_dyn_nxt
 
 //##START_divcur
 //#calcul de div et de rotationnel
-modul	 hdivn			space	S3dt_b	       		input 4		  output 1	tempo	
-modul	 rotn			space	S3dt_b			input 4		  output 1	tempo	
+modul	 hdivn			space	S3dt	       		input 4		  output 1	tempo	
+modul	 rotn			space	S3dt			input 4		  output 1	tempo	
 //##END_divcur
 
 //##START_wzv
 //#vitesse vertical
-modul	 wa			space	S3dt_b			input 2	 	  output 1	tempo	
+modul	 wa			space	S3dt			input 2	 	  output 1	tempo	
 //##END_wzv
+
+#ifdef SOLSORYAO
+#undef S3dt
+#endif
+
 //exec disp_modul
 //#############################################################################################
@@ -590,10 +609,14 @@
 ctin	 sshb			3	from	sshn			1  i 	j         t
 ctin	 sshb			4	from	sshn_c			1  i 	j         
+
+#ifndef SOLSORYAO
 //############## Ajout de ctin "virtuels" ##############
-//#ctin	 solsor_dynspg_flt      1..9    from    gcx_dynspg_flt		1 i%~1 j%~1       t
-//#ctin	 solsor_dynspg_flt      10..18  from    gcb_dynspg_flt		1 i%~1 j%~1       t
-//#ctin	 solsor_dynspg_flt      19      from    solsor_dynspg_flt       1 i-1  j-1       t
-//#ctin     gcx2			1	from    solsor_dynspg_flt       1 i    j          t
-
+ctin	 solsor_dynspg_flt      1..9    from    gcx_dynspg_flt		1 i%~1 j%~1       t
+ctin	 solsor_dynspg_flt      10..18  from    gcb_dynspg_flt		1 i%~1 j%~1       t
+ctin	 solsor_dynspg_flt      19      from    solsor_dynspg_flt       1 i-1  j-1       t
+ctin     gcx2			1	from    solsor_dynspg_flt       1 i    j          t
+#endif
+
+#ifdef SOLSORYAO
 ctin solsor_flag		1	from 	solsor_gx2_x_r		2 i    j   k	t 
 ctin solsor_flag		2	from 	solsor_flag		2 NX   NY  k-1	t 
@@ -621,4 +644,6 @@
 
 ctin gcx2			1	from 	solsor_gx2_x_r		1 i    j     NMAX  t
+#endif
+
 //#---------->dyn_nxt
 ctin	ub		1	from	ub			1  i 	j    k    t-1
@@ -650,6 +675,4 @@
 
 #ifdef OPTIMORDER
-
-#ifdef SOLSORYAO
 
 //#---------->sbcgyre + bn2_rn2 + zdf + trasbc + traqsr + traadv +
@@ -725,7 +748,17 @@
             sbcgyre_wndm 
 	    gcb_dynspg_flt
+
      forder 
+#ifdef SOLSORYAO
 forder
-
+#endif
+
+#ifndef SOLSORYAO
+order YA1 YA2
+      solsor_dynspg_flt
+forder
+#endif
+
+#ifdef SOLSORYAO
 order modinspace Ssolsor
       order YA3 
@@ -743,8 +776,9 @@
       forder
 forder
-
-
-
+#endif
+
+#ifdef SOLSORYAO
 order modinspace S3dt_b
+#endif
       order YA2 YA1
       	    gcx2
@@ -757,5 +791,5 @@
 		      ub vb
 		forder
-      forder
+        forder
 
 //	#---------->divcur
@@ -766,12 +800,13 @@
 	      order YA2 YA1 YB3
 	            wa
-      forder
+ 
+     forder
+
+
 forder
 
 #endif
-#endif
 
 #ifndef OPTIMORDER
-#ifdef SOLSORYAO
 
 order modinspace S3dt
@@ -903,6 +938,16 @@
       	    gcb_dynspg_flt gcx_dynspg_flt
       forder
+
+#ifdef SOLSORYAO
 forder
-
+#endif
+
+#ifndef SOLSORYAO
+order YA1 YA2
+      solsor_dynspg_flt
+forder
+#endif
+
+#ifdef SOLSORYAO
 order modinspace Ssolsor
       order YA3 
@@ -920,6 +965,10 @@
       forder
 forder
-
+#endif
+
+#ifdef SOLSORYAO
 order modinspace S3dt_b
+#endif SOLSORYAO
+
       order YA2 YA1
       	    gcx2
@@ -947,9 +996,15 @@
 #endif
 
-#endif
+
 
 #ifdef SOLSORYAO
 order spaceintraj Tsbd
 	S3dt Ssolsor S3dt_b
+forder
+#endif
+
+#ifndef SOLSORYAO
+order spaceintraj Tsbd
+	S3dt
 forder
 #endif
Index: /trunk/src/solsor_dynspg_flt.h
===================================================================
--- /trunk/src/solsor_dynspg_flt.h	(revision 52)
+++ /trunk/src/solsor_dynspg_flt.h	(revision 53)
@@ -9,5 +9,5 @@
 forward ()
 {
-  FILE * fid;
+  // FILE * fid;
  
   if(Yt==TU)
@@ -24,9 +24,9 @@
       //initialisation de gcx
       
-      /*test solsor */
+      /*test solsor 
       if (Yt==TU+1) {
 	
 	fid=fopen("../data_out/test_solsor_mb","w");
-      }
+	}*/
       
       
@@ -36,9 +36,9 @@
 	  gcx(ji,jj)=YS_gcx_dynspg_flt(0,ji,jj,Yt);
   
-	  /*test solsor */
+	  /*test solsor 
 	  if (Yt==TU+1) {
 	    
 	    fprintf(fid,"%d\t%d\t%d\t%e\t%e\n",0,jj,ji,gcx(ji,jj),gcr(ji,jj));
-	  }
+	    }*/
 	  
 
@@ -80,10 +80,10 @@
  
 
-	    /*test solsor */
+	    /*test solsor 
 	    if (Yt==TU+1) {
 	      
 	      fprintf(fid,"%d\t%d\t%d\t%e\t%e\n",jn,jj,ji,gcx(ji,jj),gcr(ji,jj));
 	    }
-
+	    */
 
 	  }
@@ -109,9 +109,9 @@
 	    gcx(ji,jj) = sor * ztmp + (1.-sor) * gcx(ji,jj);
 
-	    /*test solsor */
+	    /*test solsor 
 	    if (Yt==TU+1) {
 	      
 	      fprintf(fid,"%d\t%d\t%d\t%e\t%e\n",jn,jj,ji,gcx(ji,jj),gcr(ji,jj));
-	    }
+	      }*/
 	  }
 	}
@@ -130,5 +130,5 @@
 	    niter = jn; tniter[Yt]=jn;
 	    ncut = 999;
-	      printf("FOR=======tniter(%d)=%d\n",Yt,tniter[Yt]);
+	    //	      printf("FOR=======tniter(%d)=%d\n",Yt,tniter[Yt]);
 	  }
 	}
@@ -151,9 +151,9 @@
       /*      xtest("gcx",gcx(28,3),28,3,0,Yt);
 	      xtest("gcb",YS_gcb_dynspg_flt(0,28,3,Yt),28,3,0,Yt); */
-    /*test solsor */
+    /*test solsor 
     if (Yt==TU+1) {
       fclose(fid);
     }
-    
+    */
    
     }
