Index: /trunk/src/python_script/TUP zone des plateformes.py
===================================================================
--- /trunk/src/python_script/TUP zone des plateformes.py	(revision 6)
+++ /trunk/src/python_script/TUP zone des plateformes.py	(revision 6)
@@ -0,0 +1,235 @@
+
+
+mask=mppgrid_tab1.round()
+llon, llat = np.meshgrid(xvec,yvec)
+iplat=(mask<=0.5) & (llat<=-80)
+iiplat=iplat*1
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(a1,a2,a3)#star, stop, step
+cs=map.pcolor(xii,yii,iiplat)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title('plateformes)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 30), labels=[0, 0, 0, 1])
+map.drawparallels(np.arange(-90, 90, 10), labels=[1, 0, 0, 0])
+#plt.show()
+plt.savefig('plateformes.png')
+close()
+
+#amsub
+
+iplatv1=(ambch1[1,:]<=-80)&(ambch1[14,:]<=0.5)
+iplatv2=(ambch2[1,:]<=-80)&(ambch2[14,:]<=0.5)
+iplatv3=(ambch3[1,:]<=-80)&(ambch3[14,:]<=0.5)
+iplatv4=(ambch4[1,:]<=-80)&(ambch4[14,:]<=0.5)
+iplatv5=(ambch5[1,:]<=-80)&(ambch5[14,:]<=0.5)
+
+tup_platab=np.zeros([5],float)
+tup_platab[0]=mean(ambch1[18,iplatv1])
+tup_platab[1]=mean(ambch2[18,iplatv2])
+tup_platab[2]=mean(ambch3[18,iplatv3])
+tup_platab[3]=mean(ambch4[18,iplatv4])
+tup_platab[4]=mean(ambch5[18,iplatv5])
+
+#amsub angles faibles
+iplatv1n1=iplatv1 & (ambch1[7,:]<=13) | iplatv1 & (ambch1[7,:]>=78)
+iplatv2n1=iplatv2 & (ambch2[7,:]<=13) | iplatv2 & (ambch2[7,:]>=78)
+iplatv3n1=iplatv3 & (ambch3[7,:]<=13) | iplatv3 & (ambch3[7,:]>=78)
+iplatv4n1=iplatv4 & (ambch4[7,:]<=13) | iplatv4 & (ambch4[7,:]>=78)
+iplatv5n1=iplatv5 & (ambch5[7,:]<=13) | iplatv5 & (ambch5[7,:]>=78)
+
+tup_platabn1=np.zeros([5],float)
+tup_platabn1[0]=mean(ambch1[18,iplatv1n1])
+tup_platabn1[1]=mean(ambch2[18,iplatv2n1])
+tup_platabn1[2]=mean(ambch3[18,iplatv3n1])
+tup_platabn1[3]=mean(ambch4[18,iplatv4n1])
+tup_platabn1[4]=mean(ambch5[18,iplatv5n1])
+
+
+#ecart types
+tupet_platabn1=np.zeros([5],float)
+tupet_platabn1[0]=sqrt(sum(ambch1[18,iplatv1n1]**2)/size(ambch1[18,iplatv1n1])-mean(ambch1[18,iplatv1n1])**2)
+tupet_platabn1[1]=sqrt(sum(ambch2[18,iplatv2n1]**2)/size(ambch2[18,iplatv2n1])-mean(ambch2[18,iplatv2n1])**2)
+tupet_platabn1[2]=sqrt(sum(ambch3[18,iplatv3n1]**2)/size(ambch3[18,iplatv3n1])-mean(ambch3[18,iplatv3n1])**2)
+tupet_platabn1[3]=sqrt(sum(ambch4[18,iplatv4n1]**2)/size(ambch4[18,iplatv4n1])-mean(ambch4[18,iplatv4n1])**2)
+tupet_platabn1[4]=sqrt(sum(ambch5[18,iplatv5n1]**2)/size(ambch5[18,iplatv5n1])-mean(ambch5[18,iplatv5n1])**2)
+
+
+amsubch=np.array([1,2,3,4,5])
+for i in range(0,5):
+    ti=str(amsubch[i])
+    t='tupet_platabn1['+str(i)+']=sqrt(sum(ambch'+ti+'[18,iplatv'+ti+'n1]**2)/size(ambch'+ti+'[18,iplatv'+ti+'n1])-mean(ambch'+ti+'[18,iplatv'+ti+'n1])**2)'
+    print t
+
+#amsua
+iplatvaa1=(amch1[1,:]<=-80)&(amch1[14,:]<=0.5)
+iplatvaa2=(amch2[1,:]<=-80)&(amch2[14,:]<=0.5)
+iplatvaa3=(amch3[1,:]<=-80)&(amch3[14,:]<=0.5)
+iplatvaa4=(amch4[1,:]<=-80)&(amch4[14,:]<=0.5)
+iplatvaa5=(amch5[1,:]<=-80)&(amch5[14,:]<=0.5)
+iplatvaa6=(amch6[1,:]<=-80)&(amch6[14,:]<=0.5)
+iplatvaa7=(amch7[1,:]<=-80)&(amch7[14,:]<=0.5)
+iplatvaa15=(amch15[1,:]<=-80)&(amch15[14,:]<=0.5)
+
+
+tup_plataa=np.zeros([8],float)
+tup_plataa[0]=mean(amch1[18,iplatvaa1])
+tup_plataa[1]=mean(amch2[18,iplatvaa2])
+tup_plataa[2]=mean(amch3[18,iplatvaa3])
+tup_plataa[3]=mean(amch4[18,iplatvaa4])
+tup_plataa[4]=mean(amch5[18,iplatvaa5])
+tup_plataa[5]=mean(amch6[18,iplatvaa6])
+tup_plataa[6]=mean(amch7[18,iplatvaa7])
+tup_plataa[7]=mean(amch15[18,iplatvaa15])
+
+#amsua angles faibles
+iplatvaa1n1= iplatvaa1 & (amch1[7,:]<=5) | iplatvaa1 & (amch1[7,:]>=26)
+iplatvaa2n1= iplatvaa2 & (amch2[7,:]<=5) | iplatvaa2 & (amch2[7,:]>=26)
+iplatvaa3n1= iplatvaa3 & (amch3[7,:]<=5) | iplatvaa3 & (amch3[7,:]>=26)
+iplatvaa4n1= iplatvaa4 & (amch4[7,:]<=5) | iplatvaa4 & (amch4[7,:]>=26)
+iplatvaa5n1= iplatvaa5 & (amch5[7,:]<=5) | iplatvaa5 & (amch5[7,:]>=26)
+iplatvaa6n1= iplatvaa6 & (amch6[7,:]<=5) | iplatvaa6 & (amch6[7,:]>=26)
+iplatvaa7n1= iplatvaa7 & (amch7[7,:]<=5) | iplatvaa7 & (amch7[7,:]>=26)
+iplatvaa15n1= iplatvaa15 & (amch15[7,:]<=5) | iplatvaa15 & (amch15[7,:]>=26)
+
+tup_plataan1=np.zeros([8],float)
+tup_plataan1[0]=mean(amch1[18,iplatvaa1n1])
+tup_plataan1[1]=mean(amch2[18,iplatvaa2n1])
+tup_plataan1[2]=mean(amch3[18,iplatvaa3n1])
+tup_plataan1[3]=mean(amch4[18,iplatvaa4n1])
+tup_plataan1[4]=mean(amch5[18,iplatvaa5n1])
+tup_plataan1[5]=mean(amch6[18,iplatvaa6n1])
+tup_plataan1[6]=mean(amch7[18,iplatvaa7n1])
+tup_plataan1[7]=mean(amch15[18,iplatvaa15n1])
+
+#ecart type
+tupet_plataan1=np.zeros([8],float)
+tupet_plataan1[0]=sqrt(sum(amch1[18,iplatvaa1n1]**2)/size(amch1[18,iplatvaa1n1])-mean(amch1[18,iplatvaa1n1])**2)
+tupet_plataan1[1]=sqrt(sum(amch2[18,iplatvaa2n1]**2)/size(amch2[18,iplatvaa2n1])-mean(amch2[18,iplatvaa2n1])**2)
+tupet_plataan1[2]=sqrt(sum(amch3[18,iplatvaa3n1]**2)/size(amch3[18,iplatvaa3n1])-mean(amch3[18,iplatvaa3n1])**2)
+tupet_plataan1[3]=sqrt(sum(amch4[18,iplatvaa4n1]**2)/size(amch4[18,iplatvaa4n1])-mean(amch4[18,iplatvaa4n1])**2)
+tupet_plataan1[4]=sqrt(sum(amch5[18,iplatvaa5n1]**2)/size(amch5[18,iplatvaa5n1])-mean(amch5[18,iplatvaa5n1])**2)
+tupet_plataan1[5]=sqrt(sum(amch6[18,iplatvaa6n1]**2)/size(amch6[18,iplatvaa6n1])-mean(amch6[18,iplatvaa6n1])**2)
+tupet_plataan1[6]=sqrt(sum(amch7[18,iplatvaa7n1]**2)/size(amch7[18,iplatvaa7n1])-mean(amch7[18,iplatvaa7n1])**2)
+tupet_plataan1[7]=sqrt(sum(amch15[18,iplatvaa15n1]**2)/size(amch15[18,iplatvaa15n1])-mean(amch15[18,iplatvaa15n1])**2)
+
+
+#ssmis
+iplatvss1=(ssch1[1,:]<=-80)&(ssch1[12,:]<=0.5)
+iplatvss2=(ssch2[1,:]<=-80)&(ssch2[12,:]<=0.5)
+iplatvss3=(ssch3[1,:]<=-80)&(ssch3[12,:]<=0.5)
+iplatvss4=(ssch4[1,:]<=-80)&(ssch4[12,:]<=0.5)
+iplatvss5=(ssch5[1,:]<=-80)&(ssch5[12,:]<=0.5)
+iplatvss8=(ssch8[1,:]<=-80)&(ssch8[12,:]<=0.5)
+iplatvss9=(ssch9[1,:]<=-80)&(ssch9[12,:]<=0.5)
+iplatvss10=(ssch10[1,:]<=-80)&(ssch10[12,:]<=0.5)
+iplatvss11=(ssch11[1,:]<=-80)&(ssch11[12,:]<=0.5)
+iplatvss12=(ssch12[1,:]<=-80)&(ssch12[12,:]<=0.5)
+iplatvss13=(ssch13[1,:]<=-80)&(ssch13[12,:]<=0.5)
+iplatvss14=(ssch14[1,:]<=-80)&(ssch14[12,:]<=0.5)
+iplatvss15=(ssch15[1,:]<=-80)&(ssch15[12,:]<=0.5)
+iplatvss16=(ssch16[1,:]<=-80)&(ssch16[12,:]<=0.5)
+iplatvss17=(ssch17[1,:]<=-80)&(ssch17[12,:]<=0.5)
+iplatvss18=(ssch18[1,:]<=-80)&(ssch18[12,:]<=0.5)
+
+tup_platss=np.zeros([16],float)
+tup_platss[0]=mean(ssch1[16,iplatvss1])
+tup_platss[1]=mean(ssch2[16,iplatvss2])
+tup_platss[2]=mean(ssch3[16,iplatvss3])
+tup_platss[3]=mean(ssch4[16,iplatvss4])
+tup_platss[4]=mean(ssch5[16,iplatvss5])
+tup_platss[5]=mean(ssch8[16,iplatvss8])
+tup_platss[6]=mean(ssch9[16,iplatvss9])
+tup_platss[7]=mean(ssch10[16,iplatvss10])
+tup_platss[8]=mean(ssch11[16,iplatvss11])
+tup_platss[9]=mean(ssch12[16,iplatvss12])
+tup_platss[10]=mean(ssch13[16,iplatvss13])
+tup_platss[11]=mean(ssch14[16,iplatvss14])
+tup_platss[12]=mean(ssch15[16,iplatvss15])
+tup_platss[13]=mean(ssch16[16,iplatvss16])
+tup_platss[14]=mean(ssch17[16,iplatvss17])
+tup_platss[15]=mean(ssch18[16,iplatvss18])
+
+
+#ecart types
+
+tupet_platss=np.zeros([16],float)
+tupet_platss[0]=sqrt(sum(ssch1[16,iplatvss1]**2)/size(ssch1[16,iplatvss1])-mean(ssch1[16,iplatvss1])**2)
+tupet_platss[1]=sqrt(sum(ssch2[16,iplatvss2]**2)/size(ssch2[16,iplatvss2])-mean(ssch2[16,iplatvss2])**2)
+tupet_platss[2]=sqrt(sum(ssch3[16,iplatvss3]**2)/size(ssch3[16,iplatvss3])-mean(ssch3[16,iplatvss3])**2)
+tupet_platss[3]=sqrt(sum(ssch4[16,iplatvss4]**2)/size(ssch4[16,iplatvss4])-mean(ssch4[16,iplatvss4])**2)
+tupet_platss[4]=sqrt(sum(ssch5[16,iplatvss5]**2)/size(ssch5[16,iplatvss5])-mean(ssch5[16,iplatvss5])**2)
+tupet_platss[5]=sqrt(sum(ssch8[16,iplatvss8]**2)/size(ssch8[16,iplatvss8])-mean(ssch8[16,iplatvss8])**2)
+tupet_platss[6]=sqrt(sum(ssch9[16,iplatvss9]**2)/size(ssch9[16,iplatvss9])-mean(ssch9[16,iplatvss9])**2)
+tupet_platss[7]=sqrt(sum(ssch10[16,iplatvss10]**2)/size(ssch10[16,iplatvss10])-mean(ssch10[16,iplatvss10])**2)
+tupet_platss[8]=sqrt(sum(ssch11[16,iplatvss11]**2)/size(ssch11[16,iplatvss11])-mean(ssch11[16,iplatvss11])**2)
+tupet_platss[9]=sqrt(sum(ssch12[16,iplatvss12]**2)/size(ssch12[16,iplatvss12])-mean(ssch12[16,iplatvss12])**2)
+tupet_platss[10]=sqrt(sum(ssch13[16,iplatvss13]**2)/size(ssch13[16,iplatvss13])-mean(ssch13[16,iplatvss13])**2)
+tupet_platss[11]=sqrt(sum(ssch14[16,iplatvss14]**2)/size(ssch14[16,iplatvss14])-mean(ssch14[16,iplatvss14])**2)
+tupet_platss[12]=sqrt(sum(ssch15[16,iplatvss15]**2)/size(ssch15[16,iplatvss15])-mean(ssch15[16,iplatvss15])**2)
+tupet_platss[13]=sqrt(sum(ssch16[16,iplatvss16]**2)/size(ssch16[16,iplatvss16])-mean(ssch16[16,iplatvss16])**2)
+tupet_platss[14]=sqrt(sum(ssch17[16,iplatvss17]**2)/size(ssch17[16,iplatvss17])-mean(ssch17[16,iplatvss17])**2)
+tupet_platss[15]=sqrt(sum(ssch18[16,iplatvss18]**2)/size(ssch18[16,iplatvss18])-mean(ssch18[16,iplatvss18])**2)
+
+
+
+for i in range(0,16):
+    ti=str(ssmisch[i])
+    t='tupet_platss['+str(i)+']=sqrt(sum(ssch'+ti+'[16,iplatvss'+ti+']**2)/size(ssch'+ti+'[16,iplatvss'+ti+'])-mean(ssch'+ti+'[16,iplatvss'+ti+'])**2)'
+    print t
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /trunk/src/python_script/angles_amsu.py
===================================================================
--- /trunk/src/python_script/angles_amsu.py	(revision 6)
+++ /trunk/src/python_script/angles_amsu.py	(revision 6)
@@ -0,0 +1,24 @@
+
+#angles amsub
+
+ang_ab1=np.zeros([90],float)
+for kk in range(0,89):
+    ipos= (ambch1[7,:]==kk)
+    ang_ab1[kk]= mean(ambch1[8,ipos])
+
+
+ipos2= (ambch1[7,:]==2)
+sum(ipos1)
+ambch1[8,ipos1]
+
+
+#angles amsua
+
+ang_aa1=np.zeros([31],float)
+for kk in range(0,31):
+    iposs= (amch1[7,:]==kk)
+    ang_aa1[kk]= mean(amch1[8,iposs])
+
+
+iposs0= (amch1[7,:]==0)
+iposs30= (amch1[7,:]==30)
Index: /trunk/src/python_script/bina_gc.py
===================================================================
--- /trunk/src/python_script/bina_gc.py	(revision 6)
+++ /trunk/src/python_script/bina_gc.py	(revision 6)
@@ -0,0 +1,46 @@
+import numpy as np
+from numpy import *
+
+def bina(x, dx, x0, x1):
+    #
+    # [i, nbins] = bin(x, dx, x0, x1);
+    #
+    # Returns the vector of indices, starting from 1, 
+    # corresponding to the chosen bin size, dx, 
+    # start x0 and end x1. If x1 is omitted, x1 = max(x) - dx/2. 
+    # If x0 is omitted, x0 = min(x) + dx/2. If dx is omitted, the data 
+    # are divided into 10 classes. Note that outliers are not removed.
+    #
+    # Tested under MatLab 4.2, 5.0, and 5.1.
+    #
+
+    # 17.1.97, Oyvind.Breivik@gfi.uib.no.
+    #
+    # Oyvind Breivik
+    # Department of Geophysics
+    # University of Bergen
+    # NORWAY
+    #if nargin < 2:
+    #    dx = (max(x) - min(x)) / N
+    #end
+    #if nargin < 3:
+    #x0 = min(x) 
+    #end
+    #if nargin < 4:
+    #x1 = max(x) + dx
+    #end
+    
+    nn=size(x)
+    indic = zeros(nn, float)
+    
+    nbins= round((x1 - x0)/dx)
+    
+    for kk in range(0,nn): indic[kk] = math.ceil((x[kk] - x0)/dx)-1
+    #indicp=((x - x0)/dx) + 1 
+    #indic = indicp.round();
+
+    #if nargout > 1:
+    nnbins = nbins
+
+    return indic
+    #end
Index: /trunk/src/python_script/calcul foot print amsu.py
===================================================================
--- /trunk/src/python_script/calcul foot print amsu.py	(revision 6)
+++ /trunk/src/python_script/calcul foot print amsu.py	(revision 6)
@@ -0,0 +1,33 @@
+#amsua tache
+
+cross_track_amsua=zeros(15, float)
+along_track_amsua=zeros(15, float)
+cross_track_amsub=zeros(45, float)
+along_track_amsub=zeros(45, float)
+
+n_amsua=arange(1,16,1)
+n_amsub=arange(1,46,1)
+
+cross_track_amsua=230.65+12.39*n_amsua-95.06*(n_amsua**0.5)
+along_track_amsua=83.01-7.28*n_amsua+1.28*(n_amsua**1.5)
+
+cross_track_amsub=79.08+2.84*n_amsub-14.78*(n_amsub**0.666)
+along_track_amsub=28.72-0.90*n_amsub+0.094*(n_amsub**1.5)
+
+amsua=(n_amsua, cross_track_amsua, along_track_amsua)
+
+np.savetxt('amsua_track.txt', amsua, fmt='%.18e', delimiter=' ')
+
+amsub=(n_amsub, cross_track_amsub, along_track_amsub)
+np.savetxt('amsub_track.txt', amsub, fmt='%.18e', delimiter=' ')
+
+
+#histograma tb ssmis
+
+import pylab
+pylab.hist(zzp, bins=30)
+pylab.show()
+
+
+latp = (lat >= -60)
+zzp = z[latp]
Index: /trunk/src/python_script/comp_tb_alt.py
===================================================================
--- /trunk/src/python_script/comp_tb_alt.py	(revision 6)
+++ /trunk/src/python_script/comp_tb_alt.py	(revision 6)
@@ -0,0 +1,68 @@
+#realtion tb altitude sur antartique
+
+iterre = (mm_t >= 0.5)
+tb_tcnm=tb_t[iterre]
+alt_ta=alt_t[iterre]
+
+plot(tb_tcnm,alt_ta,'.')
+plt.title('tb vs altitude sur antartique')
+#plt.show()
+plt.savefig('tb_vs_alt_sur_ant.png')
+close()
+
+#est lo positive
+itest = (mm_t >= 0.5) & (lo_t>=0)
+tb_taest=tb_t[itest]
+alt_taest=alt_t[itest]
+
+plot(tb_taest,alt_taest,'.')
+plt.title('tb vs altitude sur antartique est')
+#plt.show()
+plt.savefig('tb_vs_alt_sur_ant_est.png')
+close()
+
+#oest lo negative
+itoest = (mm_t >= 0.5) & (lo_t<=0)
+tb_taoest=tb_t[itoest]
+alt_taoest=alt_t[itoest]
+
+plot(tb_taoest,alt_taoest,'.')
+plt.title('tb vs altitude sur antartique west')
+#plt.show()
+plt.savefig('tb_vs_alt_sur_ant_west.png')
+close()
+
+##################################
+#realtion tb lat sur antartique
+
+iterre = (mm_t >= 0.5)
+tb_tcnm=tb_t[iterre]
+la_ta=la_t[iterre]
+
+plot(tb_tcnm,la_ta,'.')
+plt.title('tb vs latitude sur antartique')
+#plt.show()
+plt.savefig('tb_vs_lat_sur_ant.png')
+close()
+
+#est lo positive
+itest = (mm_t >= 0.5) & (lo_t>=0)
+tb_taest=tb_t[itest]
+la_taest=la_t[itest]
+
+plot(tb_taest,la_taest,'.')
+plt.title('tb vs altitude sur antartique est')
+plt.show()
+plt.savefig('tb_vs_alt_sur_ant_est.png')
+close()
+
+#oest lo negative
+itoest = (mm_t >= 0.5) & (lo_t<=0)
+tb_taoest=tb_t[itoest]
+la_taoest=la_t[itoest]
+
+plot(tb_taoest,la_taoest,'.')
+plt.title('tb vs altitude sur antartique west')
+#plt.show()
+plt.savefig('tb_vs_alt_sur_ant_west.png')
+close()
Index: /trunk/src/python_script/decimal.py
===================================================================
--- /trunk/src/python_script/decimal.py	(revision 6)
+++ /trunk/src/python_script/decimal.py	(revision 6)
@@ -0,0 +1,8 @@
+#pruebas con decimal
+from decimal import Decimal
+a=Decimal('1.1')
+latD=np.zeros([10],float)
+latD[1]=a
+
+
+
Index: /trunk/src/python_script/draw_carte_terre.py
===================================================================
--- /trunk/src/python_script/draw_carte_terre.py	(revision 6)
+++ /trunk/src/python_script/draw_carte_terre.py	(revision 6)
@@ -0,0 +1,52 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+#trans t
+
+
+zz1=iterrei
+tt1='terre amusa ch2'
+t1='terre_amsua_ch2.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,1,0.001)#star, stop, step
+cs=map.pcolor(xii,yii,zz1)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+plt.show()
+
+plt.savefig(t1)
+close()
Index: /trunk/src/python_script/draw_map_3gc.py
===================================================================
--- /trunk/src/python_script/draw_map_3gc.py	(revision 6)
+++ /trunk/src/python_script/draw_map_3gc.py	(revision 6)
@@ -0,0 +1,232 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+import ffgrid2
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+#import netCDF4
+
+#x=monthly_lon
+#y=monthly_lat
+#z=monthly_outz
+
+zz1=zzpgrid_3n
+zz2=sigma_grid_3n
+zz3=nngrid_3n
+
+t1='amsua_ch2_tb.png'
+tt1='amsua_ch2 tb'
+t2='amsua_ch2_ecart_type.png'
+tt2='amsua_ch2 ecart type'
+t3='amsua_ch2_nom_donnes_tb.png'
+tt3='amsua ch2 nom donnes tb'
+
+t1='amsua_ch2_pos3_tb.png'
+tt1='amsua_ch2 pos3 tb'
+t2='amsua_ch2_pos3_ecart_type.png'
+tt2='amsua_ch2 pos3 ecart type'
+t3='amsua_ch2_pos3_nom_donnes_tb.png'
+tt3='amsua ch2 pos3 nom donnes tb'
+
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+cs=m.contourf(xii,yii,zz1)
+#, clevs, cmap=my_cmap) 
+cs=map.pcolormesh(xii,yii,zz1,cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t1)
+close()
+
+#carte ecart type
+zz21 = sigma_grid_t
+zz22 = sigma_grid_1n
+zz23 = sigma_grid_2n
+zz24 = sigma_grid_3n
+tt21='amsua ch2 t ecart type'
+tt22='amsua ch2 1n ecart type'
+tt23='amsua ch2 2n ecart type'
+tt24='amsua ch2 3n ecart type'
+t='amsua_ch2_ecart_type.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,40,0.1)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,40,0.1)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,40,0.1)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,40,0.1)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+plt.show()
+plt.savefig(t)
+close()
+
+
+
+
+
+
+##########################"
+#carte nom de donnees
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+
+evels=[300, 290, 280, 270, 260, 250, 240, 230, 220, 210, 200, 190, 180, 170, 160, 150, 140, 130, 120, 110, 100]
+cs=map.pcolormesh(xii,yii,zz3)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt3)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t3)
+close()
Index: /trunk/src/python_script/draw_map_emis_amsuach2.py
===================================================================
--- /trunk/src/python_script/draw_map_emis_amsuach2.py	(revision 6)
+++ /trunk/src/python_script/draw_map_emis_amsuach2.py	(revision 6)
@@ -0,0 +1,523 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+import ffgrid2
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+#emis t
+
+eepgrid=zzpgrid
+esigma_grid=sigma_grid
+zz1=eepgrid
+tt1='emis amusa ch2'
+t1='emis_amsua_ch2.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0.5,1.1,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t1)
+close()
+
+#########################################################################
+####emis t 1pos 2pos 3pos
+zz21 = eepgrid_t
+zz22 = eepgrid_1n
+zz23 = eepgrid_2n
+zz24 = eepgrid_3n
+tt21='emis amsua ch2 t'
+tt22='emis amsua ch2 1n'
+tt23='emis amsua ch2 2n'
+tt24='emis amsua ch2 3n'
+t='emis_amsua_ch2_t123.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.4,1,0.01)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.4,1,0.01)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.4,1,0.01)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.4,1,0.01)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+#########################################################################
+#### ecart type emis t 1pos 2pos 3pos
+zz21 = esigma_grid_t
+zz22 = esigma_grid_1n
+zz23 = esigma_grid_2n
+zz24 = esigma_grid_3n
+tt21='ecart type emis amsua ch2 t'
+tt22='ecart type emis amsua ch2 1n'
+tt23='ecart type emis amsua ch2 2n'
+tt24='ecart type emis amsua ch2 3n'
+t='ecart_type_emis_amsua_ch2_t123.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.16,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.16,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.16,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.16,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+#########################################################################
+#### nom donnÃ©es emis t 1pos 2pos 3pos
+zz21 = enngrid_t
+zz22 = enngrid_1n
+zz23 = enngrid_2n
+zz24 = enngrid_3n
+tt21='nom donnees emis amsua ch2 t'
+tt22='nom donnees emis amsua ch2 1n'
+tt23='nom donnees emis amsua ch2 2n'
+tt24='nom donnees emis amsua ch2 3n'
+t='nom_donnees_emis_amsua_ch2_t123.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+
+#########################################################################
+#### dif emis t 1pos 2pos 3pos
+zz21 = edif_t1
+zz22 = edif_t2
+zz23 = edif_t3
+zz24 = edif_13
+tt21='dif emis t pos1 amsua ch2'
+tt22='dif emis t pos2 amsua ch2'
+tt23='dif emis t pos3 amsua ch2'
+tt24='dif emis pos1 pos2 amsua ch2'
+t='dif_emis_amsua_ch2.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+################################################
+#histograma
+
+bins=arange(0.4,1,0.002)
+plt.hist(zz, bins=bins,histtype='step', label='hist',normed='True',color='black')
+plt.show()
+plt.savefig('hist_emis_amsua_ch2.png')
+close()
Index: /trunk/src/python_script/draw_map_mod_gc.py
===================================================================
--- /trunk/src/python_script/draw_map_mod_gc.py	(revision 6)
+++ /trunk/src/python_script/draw_map_mod_gc.py	(revision 6)
@@ -0,0 +1,73 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+import ffgrid2
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+#import netCDF4
+
+#x=monthly_lon
+#y=monthly_lat
+#z=monthly_outz
+
+zz1=zzpgrid
+zz2=sigma_grid
+zz3=nngrid
+
+t1='amsua_ch2_tb.png'
+tt1='amsua_ch2 tb'
+t2='amsua_ch2_ecart_type.png'
+tt2='amsua_ch2 ecart type'
+t3='amsua_ch2_nom_donnes_tb.png'
+tt3='amsua ch2 nom donnes tb'
+
+#t1='amsua_ch2_pos2_tb.png'
+#tt1='amsua_ch2 pos2 tb'
+#t2='amsua_ch2_pos2_ecart_type.png'
+#tt2='amsua_ch2 pos2 ecart type'
+#t3='amsua_ch2_pos2_nom_donnes_tb.png'
+#tt3='amsua ch2 pos2 nom donnes tb'
+
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+# en jouant sur la valeurt du coef, on peut zoomer sur l'Antarctique
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+cs=map.pcolormesh(xii,yii,zz1,cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+plt.show()
+
+plt.savefig(t1)
+close()
Index: /trunk/src/python_script/draw_map_mod_gc1.py
===================================================================
--- /trunk/src/python_script/draw_map_mod_gc1.py	(revision 6)
+++ /trunk/src/python_script/draw_map_mod_gc1.py	(revision 6)
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+import ffgrid2
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+#import netCDF4
+
+x=monthly_lon
+y=monthly_lat
+z=monthly_outz
+
+def draw(z, x, y, outfile, txt, cax1,cax2,cax3, my_cmap):
+
+        m = Basemap(llcrnrlon=-180,urcrnrlon=180,llcrnrlat=-90,urcrnrlat=90,projection='cyl',resolution='c',fix_aspect=True)
+        #m = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='c')
+	#m = Basemap(resolution='c',projection='sinu',lon_0=60)
+	#m = Basemap(llcrnrlon=-180,urcrnrlon=180,llcrnrlat=-90,urcrnrlat=90,projection='cyl',resolution='i',fix_aspect=True)
+        #m = Basemap(llcrnrlon=-180,urcrnrlon=180,llcrnrlat=-60,urcrnrlat=60,projection='cyl',resolution='c',fix_aspect=True)
+        
+        #ax = plt.gca()
+	xii, yii = m(*np.meshgrid(x,y))
+	#ax = plt.gca()
+	#clevs=arange(0,0.8,0.005)
+	clevs=arange(cax1,cax2,cax3)
+	#boxColors= ['darkkhaki','royalblue']
+
+	m.drawcoastlines(linewidth=1)
+	#m.drawlsmask(land_color='white',ocean_color='#F4EAF1', lakes=False)
+        cs=m.contourf(xii,yii,z,20) # emissivity
+	cbar =colorbar(cs)
+        cbar.set_label(txt)
+        #cbar.set_clim(0.65,1)
+	#m.drawmapboundary(fill_color='aqua')
+	#m.drawparallels(np.arange(-90.,90.,10.), labels=[1,0,0,0])
+	#m.drawmeridians(np.arange(-180.,180.,30.), labels=[0,0,0,1])
+	m.drawparallels(np.arange(-90.,90.,45.), color='#909090', linewidth=1.0, zorder=None, dashes=[1, 1])
+	#m.drawmeridians(np.arange(-180.,180.,50.))
+	# stations: ThulÃ©, Resolute, Longyearbyen, lqaluit, murmonsk, arkangelek
+
+	plt.savefig(outfile)
+	#close()
Index: /trunk/src/python_script/draw_map_ssmisch15.py
===================================================================
--- /trunk/src/python_script/draw_map_ssmisch15.py	(revision 6)
+++ /trunk/src/python_script/draw_map_ssmisch15.py	(revision 6)
@@ -0,0 +1,185 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+#trans t
+
+
+zz1=tbpgrid_t
+tt1='tb moy ssmis ch15'
+t1='tb_ssmis_ch15.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(100,300,1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t1)
+close()
+
+################################
+#carte ecart type
+
+zz1=tbsigma_grid_t
+tt1='ecart type tb moy ssmis ch15'
+t1='ecart_type_tb_ssmis_ch15.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,40,0.1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+plt.savefig(t1)
+close()
+
+################################
+#nom donnÃ©es
+
+zz1=tbnngrid_t
+tt1='nom donnees tb moy ssmis ch15'
+t1='nom_donnees_tb_ssmis_ch15.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,300,1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+plt.savefig(t1)
+close()
+
+################################
+#mask
+
+zz1=mzzpgrid_t
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,300,1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+plt.show()
+
Index: /trunk/src/python_script/draw_map_ssmisch16.py
===================================================================
--- /trunk/src/python_script/draw_map_ssmisch16.py	(revision 6)
+++ /trunk/src/python_script/draw_map_ssmisch16.py	(revision 6)
@@ -0,0 +1,185 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+#trans t
+
+
+zz1=tbpgrid_t16
+tt1='tb ssmis ch16 newggrid'
+t1='tb_ssmis_ch16_newgrid.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(100,300,1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+plt.show()
+
+plt.savefig(t1)
+close()
+
+################################
+#carte ecart type
+
+zz1=tbsigma_grid_t16
+tt1='ecart type tb moy ssmis ch16'
+t1='ecart_type_tb_ssmis_ch16.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,40,0.1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+plt.show()
+plt.savefig(t1)
+close()
+
+################################
+#nom donnÃ©es
+
+zz1=tbnngrid_t16
+tt1='nom donnees tb moy ssmis ch16 newgrid'
+t1='nom_donnees_tb_ssmis_ch16_newgrid.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(100,600,1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+plt.savefig(t1)
+close()
+
+################################
+#mask
+
+zz1=mzzpgrid_t
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,300,1)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+plt.show()
+
Index: /trunk/src/python_script/draw_map_tr_amsuach2.py
===================================================================
--- /trunk/src/python_script/draw_map_tr_amsuach2.py	(revision 6)
+++ /trunk/src/python_script/draw_map_tr_amsuach2.py	(revision 6)
@@ -0,0 +1,521 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+#trans t
+
+
+zz1=trpgrid_t
+tt1='trans amusa ch2'
+t1='trans_amsua_ch2.png'
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(0,1,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t1)
+close()
+
+#########################################################################
+####emis t 1pos 2pos 3pos
+zz21 = trpgrid_t
+zz22 = trpgrid_1n
+zz23 = trpgrid_2n
+zz24 = trpgrid_3n
+tt21='trans amsua ch2 t'
+tt22='trans amsua ch2 1n'
+tt23='trans amsua ch2 2n'
+tt24='trans amsua ch2 3n'
+t='trans_amsua_ch2_t123.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.9,1,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.9,1,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.9,1,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0.9,1,0.001)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+#########################################################################
+#### ecart type emis t 1pos 2pos 3pos
+zz21 = trsigma_grid_t
+zz22 = trsigma_grid_1n
+zz23 = trsigma_grid_2n
+zz24 = trsigma_grid_3n
+tt21='ecart type trans amsua ch2 t'
+tt22='ecart type trans amsua ch2 1n'
+tt23='ecart type trans amsua ch2 2n'
+tt24='ecart type trans amsua ch2 3n'
+t='ecart_type_trans_amsua_ch2_t123.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.03,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.03,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.03,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,0.03,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+#########################################################################
+#### nom donnÃ©es emis t 1pos 2pos 3pos
+zz21 = trnngrid_t
+zz22 = trnngrid_1n
+zz23 = trnngrid_2n
+zz24 = trnngrid_3n
+tt21='nom donnees trans amsua ch2 t'
+tt22='nom donnees trans amsua ch2 1n'
+tt23='nom donnees trans amsua ch2 2n'
+tt24='nom donnees trans amsua ch2 3n'
+t='nom_donnees_trans_amsua_ch2_t123.png'
+
+0,0.1,0.0001figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(0,1000,10)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+
+#########################################################################
+#### dif emis t 1pos 2pos 3pos
+zz21 = edif_t1
+zz22 = edif_t2
+zz23 = edif_t3
+zz24 = edif_13
+tt21='dif emis t pos1 amsua ch2'
+tt22='dif emis t pos2 amsua ch2'
+tt23='dif emis t pos3 amsua ch2'
+tt24='dif emis pos1 pos2 amsua ch2'
+t='dif_emis_amsua_ch2.png'
+
+figure(1)
+subplot(221)
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt21)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+subplot(222)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt22)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(223)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt23)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+
+
+subplot(224)
+# on fait une nouvelle projection en zoomant sur l'antarctique
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+clevs=arange(-0.05,0.05,0.0001)#star, stop, step
+cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r)
+#cs=map.pcolormesh(xii,yii,zz2)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt24)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 10))
+map.drawparallels(np.arange(-90, 90, 10))
+#plt.show()
+
+plt.savefig(t)
+close()
+
+################################################
+#histograma
+
+bins=arange(0.4,1,0.002)
+plt.hist(zz, bins=bins,histtype='step', label='hist',normed='True',color='black')
+plt.show()
+plt.savefig('hist_emis_amsua_ch2.png')
+close()
Index: /trunk/src/python_script/draw_map_ts.py
===================================================================
--- /trunk/src/python_script/draw_map_ts.py	(revision 6)
+++ /trunk/src/python_script/draw_map_ts.py	(revision 6)
@@ -0,0 +1,51 @@
+#mod gabi para graficar TS
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import drawmap
+
+coef=0.6
+cax1=0
+cax2=230
+cax3=1
+my_cmap=cm.s3pcpn_l_r
+
+zz=tspgrid_ta1
+txt='ts amsua ch1'
+outfile='ts_amsua_ch11.png'
+
+zz=tspgrid_ta2
+txt='ts amsua ch2'
+outfile='ts_amsua_ch22.png'
+
+zz=tspgrid_ta3
+txt='ts amsua ch3'
+outfile='ts_amsua_ch33.png'
+
+zz=tspgrid_ta4
+txt='ts amsua ch4'
+outfile='ts_amsua_ch44.png'
+
+zz=tspgrid_ta5
+txt='ts amsua ch5'
+outfile='ts_amsua_ch55.png'
+
+zz=tspgrid_ta6
+txt='ts amsua ch6'
+outfile='ts_amsua_ch66.png'
+
+zz=tspgrid_ta7
+txt='ts amsua ch7'
+outfile='ts_amsua_ch77.png'
+
+zz=tspgrid_ta15
+txt='ts amsua ch15'
+outfile='ts_amsua_ch1515.png'
+
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
Index: /trunk/src/python_script/draw_map_tup.py
===================================================================
--- /trunk/src/python_script/draw_map_tup.py	(revision 6)
+++ /trunk/src/python_script/draw_map_tup.py	(revision 6)
@@ -0,0 +1,318 @@
+#mod gabi para graficar AMSUA CH2
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+
+
+
+#################################
+#carte cont ant
+#amsua ch2
+
+
+icont= (mpgrid_t60>=0.5)
+tuppgrid_ta2ant=tuppgrid_ta260*icont
+#tuppgrid_ta2ant=tuppgrid_ta260*mpgrid_t60
+zz1=tuppgrid_ta2ant
+tt1='tup cont amsua ch2'
+t1='tup_cont_amsua_ch2.png'
+
+#ssmis ch16
+tuppgrid_t16ant=tuppgrid_t1660*mpgrid_t60
+zz1=tuppgrid_t16ant
+tt1='tup cont ssmis ch16'
+t1='tup_cont_ssmis_ch16.png'
+
+##########################"
+zz1=tuppgrid_t
+tt1='tup ssmis ch15'
+t1='tup_ssmis_ch15.png'
+
+zz1=tuppgrid_t16
+tt1='tup ssmis ch16'
+t1='tup_ssmis_ch16.png'
+
+################
+tupdif_15116=tuppgrid_t-tuppgrid_t16#dif presque cero
+zz1=tupdif_15116
+tt1='tup ssmis ch16'
+t1='tup_ssmis_ch16.png'
+
+zz1=tuppgrid_ta2
+tt1='tup amsua ch2'
+t1='tup_amsua_ch2.png'
+
+
+zz1=tssigma_grid_ta2
+tt1='ecart type tup amsua ch2'
+t1='ecart_tipe_tup_amsua_ch2.png'
+a1=0
+a2=7
+a3=0.1
+
+
+zz1=tssigma_grid_t16
+tt1='ecart type tup ssmis ch16'
+t1='ecart_tipe_tup_sssmis_ch16.png'
+a1=0
+a2=7
+a3=0.1
+
+
+zz1=tssigma_grid_t
+tt1='ecart type tup ssmis ch15'
+t1='ecart_tipe_tup_sssmis_ch15.png'
+a1=0
+a2=7
+a3=0.1
+
+###################################
+#ssmis
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import drawmap
+
+tupssmisgird_max=np.array([tuppgrid_tss1.max(),tuppgrid_tss2.max(),tuppgrid_tss3.max(),tuppgrid_tss4.max(),tuppgrid_tss5.max(),tuppgrid_tss8.max(),tuppgrid_tss9.max(),tuppgrid_tss10.max(),tuppgrid_tss11.max(),tuppgrid_tss12.max(),tuppgrid_tss13.max(),tuppgrid_tss14.max(),tuppgrid_tss15.max(),tuppgrid_tss16.max(),tuppgrid_tss17.max(),tuppgrid_tss18.max()])
+
+coef=0.6
+cax1=0
+cax2=300
+cax3=1
+my_cmap=cm.s3pcpn_l_r
+
+zz=tuppgrid_tss1
+txt='tup ssmis ch1'
+outfile='tup_ssmis_ch1.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+
+zz=tuppgrid_tss2
+txt='tup ssmis ch2'
+outfile='tup_ssmis_ch2.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss3
+txt='tup ssmis ch3'
+outfile='tup_ssmis_ch3.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss4
+txt='tup ssmis ch4'
+outfile='tup_ssmis_ch4.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss5
+txt='tup ssmis ch5'
+outfile='tup_ssmis_ch5.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss8
+txt='tup ssmis ch8'
+outfile='tup_ssmis_ch8.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss9
+txt='tup ssmis ch9'
+outfile='tup_ssmis_ch9.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss10
+txt='tup ssmis ch10'
+outfile='tup_ssmis_ch10.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss11
+txt='tup ssmis ch11'
+outfile='tup_ssmis_ch11.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+
+zz=tuppgrid_tss12
+txt='tup ssmis ch12'
+outfile='tup_ssmis_ch12.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss13
+txt='tup ssmis ch13'
+outfile='tup_ssmis_ch13.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss14
+txt='tup ssmis ch14'
+outfile='tup_ssmis_ch14.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss15
+txt='tup ssmis ch15'
+outfile='tup_ssmis_ch15.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss16
+txt='tup ssmis ch16'
+outfile='tup_ssmis_ch16.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss17
+txt='tup ssmis ch17'
+outfile='tup_ssmis_ch17.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tss18
+txt='tup ssmis ch18'
+outfile='tup_ssmis_ch18.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+#############################################
+#amsub
+tupamsubgrid_max=np.array([tuppgrid_tab1.max(),tuppgrid_tab2.max(),tuppgrid_tab3.max(),tuppgrid_tab4.max(),tuppgrid_tab5.max()])
+
+coef=0.6
+cax1=0
+cax2=300
+cax3=1
+my_cmap=cm.s3pcpn_l_r
+
+zz=tuppgrid_tab1
+txt='tup amsub ch1'
+outfile='tup_amsub_ch1.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+
+zz=tuppgrid_tab2
+txt='tup amsub ch2'
+outfile='tup_amsub_ch2.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tab3
+txt='tup amsub ch3'
+outfile='tup_amsub_ch3.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tab4
+txt='tup amsub ch4'
+outfile='tup_amsub_ch4.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+zz=tuppgrid_tab5
+txt='tup amsub ch5'
+outfile='tup_amsub_ch5.png'
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+
+
+###################################
+#amsua
+
+tupmax=np.array([tuppgrid_ta1.max(), tuppgrid_ta2.max(), tuppgrid_ta3.max(),tuppgrid_ta4.max(),tuppgrid_ta5.max(),tuppgrid_ta6.max(),tuppgrid_ta7.max(),tuppgrid_ta15.max()])
+
+tupmin=np.array([tuppgrid_ta1.min(), tuppgrid_ta2.min(), tuppgrid_ta3.min(),tuppgrid_ta4.min(),tuppgrid_ta5.min(),tuppgrid_ta6.min(),tuppgrid_ta7.min(),tuppgrid_ta15.min()])
+
+zz1=tuppgrid_ta1
+tt1='tup amsua ch1'
+t1='tup_amsua_ch1.png'
+
+zz1=tupnngrid_ta2
+tt1='nom donnÃ©es tup ssmis ch15'
+t1='nom_donnÃ©es_tup_sssmis_ch15.png'
+
+zz1=tuppgrid_ta3
+tt1='tup amsua ch3'
+t1='tup_amsua_ch3.png'
+
+
+zz1=tuppgrid_ta4
+tt1='tup amsua ch4'
+t1='tup_amsua_ch4.png'
+
+import drawmap
+
+zz=tuppgrid_ta1
+txt='tup amsua ch1'
+outfile='tup_amsua_ch11.png'
+coef=0.6
+cax1=0
+cax2=230
+cax3=1
+my_cmap=cm.s3pcpn_l_r
+
+zz=tuppgrid_ta2
+txt='tup amsua ch2'
+outfile='tup_amsua_ch22.png'
+
+zz=tuppgrid_ta3
+txt='tup amsua ch3'
+outfile='tup_amsua_ch33.png'
+
+zz=tuppgrid_ta4
+txt='tup amsua ch4'
+outfile='tup_amsua_ch44.png'
+
+zz=tuppgrid_ta5
+txt='tup amsua ch5'
+outfile='tup_amsua_ch55.png'
+
+zz=tuppgrid_ta6
+txt='tup amsua ch6'
+outfile='tup_amsua_ch66.png'
+
+zz=tuppgrid_ta7
+txt='tup amsua ch7'
+outfile='tup_amsua_ch77.png'
+
+zz=tuppgrid_ta15
+txt='tup amsua ch15'
+outfile='tup_amsua_ch1515.png'
+
+drawmap.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+
+
+
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(a1,a2,a3)#star, stop, step
+cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title(tt1)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 30), labels=[0, 0, 0, 1])
+map.drawparallels(np.arange(-90, 90, 10), labels=[1, 0, 0, 0])
+#plt.show()
+plt.savefig(t1)
+close()
Index: /trunk/src/python_script/drawmap.py
===================================================================
--- /trunk/src/python_script/drawmap.py	(revision 6)
+++ /trunk/src/python_script/drawmap.py	(revision 6)
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+def drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef):
+
+           # on recupere les coordonnes xy de la projection orth standard
+           m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+           xii, yii = m1(*np.meshgrid(xvec,yvec))
+           width = m1.urcrnrx - m1.llcrnrx
+           height = m1.urcrnry - m1.llcrnry
+           width = width*coef
+           height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+           map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+           xii, yii = map(*np.meshgrid(xvec,yvec))
+           clevs=arange(cax1,cax2,cax3)#star, stop, step
+           cs=map.contourf(xii,yii,z, clevs, cmap=my_cmap)
+           cbar =colorbar(cs)
+           plt.title(txt)
+# draw coastlines, country boundaries, fill continents.
+           map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+           map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+           map.drawmeridians(np.arange(0, 360, 30), labels=[0, 0, 0, 1])
+           map.drawparallels(np.arange(-90, 90, 10), labels=[1, 0, 0, 0])
+#plt.show()
+           plt.savefig(outfile)
+           close()
Index: /trunk/src/python_script/drawmapf.py
===================================================================
--- /trunk/src/python_script/drawmapf.py	(revision 6)
+++ /trunk/src/python_script/drawmapf.py	(revision 6)
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+
+def drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef):
+
+           # on recupere les coordonnes xy de la projection orth standard
+           m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+           xii, yii = m1(*np.meshgrid(xvec,yvec))
+           width = m1.urcrnrx - m1.llcrnrx
+           height = m1.urcrnry - m1.llcrnry
+           width = width*coef
+           height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+           map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+           xii, yii = map(*np.meshgrid(xvec,yvec))
+           clevs=arange(cax1,cax2,cax3)#star, stop, step
+           cs=map.contourf(xii,yii,z, clevs, cmap=my_cmap)
+           cbar =colorbar(cs)
+           plt.title(txt)
+# draw coastlines, country boundaries, fill continents.
+           map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+           map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+           map.drawmeridians(np.arange(0, 360, 30), labels=[0, 0, 0, 1])
+           map.drawparallels(np.arange(-90, 90, 10), labels=[1, 0, 0, 0])
+#plt.show()
+           plt.savefig(outfile)
+           close()
Index: /trunk/src/python_script/ffgrid2_gc.py
===================================================================
--- /trunk/src/python_script/ffgrid2_gc.py	(revision 6)
+++ /trunk/src/python_script/ffgrid2_gc.py	(revision 6)
@@ -0,0 +1,89 @@
+# griddata.py - 2010-07-11 ccampo
+import numpy as np
+from numpy import *
+import bina
+
+def ffgrid(xx, yy, zz, vnx):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=100
+    z1=300
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zzdgrid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        z2grid[iix[i], iiy[i]] = z2grid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zzdgrid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zzdgrid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    zzgrid = np.transpose(zzgrid)
+    zzpgrid = np.transpose(zzpgrid)
+    zzdgrid = np.transpose(zzdgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzgrid, ngrid, nngrid, sigma_grid, xvec, yvec
Index: /trunk/src/python_script/ffgrid2_gc_nof.py
===================================================================
--- /trunk/src/python_script/ffgrid2_gc_nof.py	(revision 6)
+++ /trunk/src/python_script/ffgrid2_gc_nof.py	(revision 6)
@@ -0,0 +1,129 @@
+#modificado para grilla irregular griddata.py
+import numpy as np
+from numpy import *
+
+
+  
+x=xx
+y=yy
+z=zz
+dx=0.1
+dy=1	
+dparx=0.05
+dpary=0.5
+n0=0
+#### z0 y z1 dependen del dato tb, emis....
+z0=0
+z1=2
+y11= -50
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+dx=0.1
+dy=1.0
+
+n=size(lon)    
+xvec = arange(x0,x1,dx)
+yvec = arange(y0,y11,dy)
+nx = size(xvec)
+ny = size(yvec)
+
+ix = zeros(n, float)    
+iy = zeros(n, float)    
+
+for kk in range(0,n):
+    if x[kk] == -180:
+       ix[kk] = 3600
+    else:
+       ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+for kk in range(0,n):
+    if y[kk] == -90:
+       iy[kk] = 0
+    else:
+       iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+#save txt file
+#np.savetxt('ix_py.txt', ix, fmt='%.18e', delimiter=';')    
+
+
+inx = (ix >= 0) & (ix < nx) 
+iny = (iy >= 0) & (iy < ny)
+inz = (z >= z0) & (z <= z1) 
+inn = inx & iny & inz
+iix = ix[inn]
+iiy = iy[inn]
+zz = z[inn]
+
+N = size(iix)# how many datapoints are left now?
+
+    #calculation of the each arc legth
+Rt=6371
+beta=math.pi/180
+R=beta*Rt 
+L=zeros(ny,float)#arc vector
+L[0]=2*math.pi*R
+
+for i in range(1, ny):
+    L[i]=2*math.pi*R*(i+1)
+
+nnx=zeros(ny,float)
+nnx=L/L[0]
+nnx=200/nnx
+nnx=nnx.round()
+
+div=(1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,30,36,40,45,48,50,60,
+72,75,80,90,100,120,144,150,180,200,225,240,300,360,400,450,
+600,720,900,1200,1800,3600)
+vnx=zeros(ny,float)
+
+for i in range(0, ny):
+    a=nnx[i]
+    for j in range(0, ny):
+        b=div[j]
+        if b<=a:
+           vnx[i]=b
+
+vnx[13:40]=12
+li=(L/3600)*vnx
+dxx=vnx
+
+ngrid = zeros([nx, ny], float)# no of obs per grid cell
+nngrid = zeros([nx, ny], float)
+zgrid = zeros([nx, ny], float)# z-coordinate
+zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+z2grid = zeros([nx, ny], float)# z-coordinate 
+zz2grid = zeros([nx, ny], float)# z-coordinate  grouped
+
+for i in range(0, N):
+    zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+    z2grid[iix[i], iiy[i]] = z2grid[iix[i],iiy[i]]+zz[i]*zz[i]
+    ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+for i in range(0,ny):
+    jj=round(3600/dxx[i])
+    c=reshape(ngrid[:,i],(jj,dxx[i]))
+    b=c.sum(axis=1)
+    d=reshape(zgrid[:,i],(jj,dxx[i]))
+    e=d.sum(axis=1)
+    f=reshape(z2grid[:,i],(jj,dxx[i]))
+    g=f.sum(axis=1)  
+    for j in range(0, nx):
+        ii=ceil((j+1)/dxx[i])-1
+        nngrid[j,i]=b[ii]
+        zzgrid[j,i]=e[ii]
+        zz2grid[j,i]=g[ii]
+
+zzpgrid = zeros([nx, ny], float)    
+zzpgrid = zzgrid/nngrid
+sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    
+
+zgrid = np.transpose(zgrid)
+zzgrid = np.transpose(zzgrid)
+zzpgrid = np.transpose(zzpgrid)
+sigma_grid=np.transpose(sigma_grid)
+zz2grid = np.transpose(zz2grid)
+ngrid = np.transpose(ngrid)
+nngrid = np.transpose(nngrid)
+
+
Index: /trunk/src/python_script/ffgrid2_gc_nof_pos.py
===================================================================
--- /trunk/src/python_script/ffgrid2_gc_nof_pos.py	(revision 6)
+++ /trunk/src/python_script/ffgrid2_gc_nof_pos.py	(revision 6)
@@ -0,0 +1,128 @@
+#modificado para grilla irregular griddata.py
+import numpy as np
+from numpy import *
+
+
+  
+x=xx
+y=yy
+z=zz
+dx=0.1
+dy=1	
+dparx=0.05
+dpary=0.5
+n0=0
+z0=100
+z1=300
+y11= -50
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+dx=0.1
+dy=1.0
+
+n=size(lon)    
+xvec = arange(x0,x1,dx)
+yvec = arange(y0,y11,dy)
+nx = size(xvec)
+ny = size(yvec)
+
+ix = zeros(n, float)    
+iy = zeros(n, float)    
+
+for kk in range(0,n):
+    if x[kk] == -180:
+       ix[kk] = 3600
+    else:
+       ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+for kk in range(0,n):
+    if y[kk] == -90:
+       iy[kk] = 0
+    else:
+       iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+#save txt file
+#np.savetxt('ix_py.txt', ix, fmt='%.18e', delimiter=';')    
+
+
+inx = (ix >= 0) & (ix < nx) 
+iny = (iy >= 0) & (iy < ny)
+inz = (z >= z0) & (z <= z1) 
+ipos = ((pos >=11) & (pos<=20)) #| ((pos >=21) & (pos <=25)) 
+inn = inx & iny & inz & ipos
+iix = ix[inn]
+iiy = iy[inn]
+zz = z[inn]
+
+N = size(iix)# how many datapoints are left now?
+
+    #calculation of the each arc legth
+Rt=6371
+beta=math.pi/180
+R=beta*Rt 
+L=zeros(ny,float)#arc vector
+L[0]=2*math.pi*R
+
+for i in range(1, ny):
+    L[i]=2*math.pi*R*(i+1)
+
+nnx=zeros(ny,float)
+nnx=L/L[0]
+nnx=200/nnx
+nnx=nnx.round()
+
+div=(1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,30,36,40,45,48,50,60,
+72,75,80,90,100,120,144,150,180,200,225,240,300,360,400,450,
+600,720,900,1200,1800,3600)
+vnx=zeros(ny,float)
+
+for i in range(0, ny):
+    a=nnx[i]
+    for j in range(0, 45):
+        b=div[j]
+        if b<=a:
+           vnx[i]=b
+
+vnx[13:40]=12
+li=(L/3600)*vnx
+dxx=vnx
+
+ngrid = zeros([nx, ny], float)# no of obs per grid cell
+nngrid = zeros([nx, ny], float)
+zgrid = zeros([nx, ny], float)# z-coordinate
+zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+z2grid = zeros([nx, ny], float)# z-coordinate Â²
+zz2grid = zeros([nx, ny], float)# z-coordinate Â² grouped
+
+for i in range(0, N):
+    zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+    z2grid[iix[i], iiy[i]] = z2grid[iix[i],iiy[i]]+zz[i]*zz[i]
+    ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+for i in range(0,ny):
+    jj=round(3600/dxx[i])
+    c=reshape(ngrid[:,i],(jj,dxx[i]))
+    b=c.sum(axis=1)
+    d=reshape(zgrid[:,i],(jj,dxx[i]))
+    e=d.sum(axis=1)
+    f=reshape(z2grid[:,i],(jj,dxx[i]))
+    g=f.sum(axis=1)  
+    for j in range(0, nx):
+        ii=ceil((j+1)/dxx[i])-1
+        nngrid[j,i]=b[ii]
+        zzgrid[j,i]=e[ii]
+        zz2grid[j,i]=g[ii]
+
+zzpgrid = zeros([nx, ny], float)    
+zzpgrid = zzgrid/nngrid
+sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    
+
+zgrid = np.transpose(zgrid)
+zzgrid = np.transpose(zzgrid)
+zzpgrid = np.transpose(zzpgrid)
+zz2grid = np.transpose(zz2grid)
+ngrid = np.transpose(ngrid)
+nngrid = np.transpose(nngrid)
+sigma_grid=np.transpose(sigma_grid)
+
Index: /trunk/src/python_script/glace de mer.py
===================================================================
--- /trunk/src/python_script/glace de mer.py	(revision 6)
+++ /trunk/src/python_script/glace de mer.py	(revision 6)
@@ -0,0 +1,304 @@
+
+
+ia1 = (llon>=-55) & (llon<=-29) & (llat<=-70) & (llat>=-76)
+ia2 = (llon>=-29) & (llon<=-21) & (llat<=-69) & (llat>=-73)
+ia3 = (llon>=-37) & (llon<=-13) & (llat<=-67) & (llat>=-69)
+ia4 = (llon>=-31) & (llon<=-13) & (llat<=-64) & (llat>=-67)
+ia6 = (llon>=-13) & (llon<=0) & (llat<=-64) & (llat>=-69)
+ia7 = (llon>=0) & (llon<=30) & (llat<=-64) & (llat>=-69)
+
+iaa= ia1 | ia2 | ia3 | ia4 | ia6 | ia7
+iaaa=iaa*1
+
+######################
+ia6 = (llon>=-31) & (llon<=0) & (llat<=-64) & (llat>=-69)
+ia7 = (llon>=0) & (llon<=30) & (llat<=-64) & (llat>=-69)
+
+ib= (llon>=-180) & (llon<=-130) & (llat<=-67) & (llat>=-73)
+ibb=ib*1
+
+iab= iaa | ib
+
+#####################################
+#amsub
+
+igmv_ab1=(ambch1[0,:]>=-31) & (ambch1[0,:]<=0) & (ambch1[1,:]<=-64) & (ambch1[1,:]>=-69) | (ambch1[0,:]>=0) & (ambch1[0,:]<=30) & (ambch1[1,:]<=-64) & (ambch1[1,:]>=-69) | (ambch1[0,:]>=-180) & (ambch1[0,:]<=-130) & (ambch1[1,:]<=-67) & (ambch1[1,:]>=-73)
+
+igmv_ab2=(ambch2[0,:]>=-31) & (ambch2[0,:]<=0) & (ambch2[1,:]<=-64) & (ambch2[1,:]>=-69) | (ambch2[0,:]>=0) & (ambch2[0,:]<=30) & (ambch2[1,:]<=-64) & (ambch2[1,:]>=-69) | (ambch2[0,:]>=-180) & (ambch2[0,:]<=-130) & (ambch2[1,:]<=-67) & (ambch2[1,:]>=-73)
+
+igmv_ab3=(ambch3[0,:]>=-31) & (ambch3[0,:]<=0) & (ambch3[1,:]<=-64) & (ambch3[1,:]>=-69) | (ambch3[0,:]>=0) & (ambch3[0,:]<=30) & (ambch3[1,:]<=-64) & (ambch3[1,:]>=-69) | (ambch3[0,:]>=-180) & (ambch3[0,:]<=-130) & (ambch3[1,:]<=-67) & (ambch3[1,:]>=-73)
+
+igmv_ab4=(ambch4[0,:]>=-31) & (ambch4[0,:]<=0) & (ambch4[1,:]<=-64) & (ambch4[1,:]>=-69) | (ambch4[0,:]>=0) & (ambch4[0,:]<=30) & (ambch4[1,:]<=-64) & (ambch4[1,:]>=-69) | (ambch4[0,:]>=-180) & (ambch4[0,:]<=-130) & (ambch4[1,:]<=-67) & (ambch4[1,:]>=-73)
+
+igmv_ab5=(ambch5[0,:]>=-31) & (ambch5[0,:]<=0) & (ambch5[1,:]<=-64) & (ambch5[1,:]>=-69) | (ambch5[0,:]>=0) & (ambch5[0,:]<=30) & (ambch5[1,:]<=-64) & (ambch5[1,:]>=-69) | (ambch5[0,:]>=-180) & (ambch5[0,:]<=-130) & (ambch5[1,:]<=-67) & (ambch5[1,:]>=-73)
+
+tup_gmab=np.zeros([5],float)
+tup_gmab[0]=mean(ambch1[18,igmv_ab1])
+tup_gmab[1]=mean(ambch2[18,igmv_ab2])
+tup_gmab[2]=mean(ambch3[18,igmv_ab3])
+tup_gmab[3]=mean(ambch4[18,igmv_ab4])
+tup_gmab[4]=mean(ambch5[18,igmv_ab5])
+
+#amsub angles faibles
+
+igmv_ab1n1= igmv_ab1 & (ambch1[7,:]<=13) | igmv_ab1 & (ambch1[7,:]>=78)
+igmv_ab2n1= igmv_ab2 & (ambch2[7,:]<=13) | igmv_ab2 & (ambch2[7,:]>=78)
+igmv_ab3n1= igmv_ab3 & (ambch3[7,:]<=13) | igmv_ab3 & (ambch3[7,:]>=78)
+igmv_ab4n1= igmv_ab4 & (ambch4[7,:]<=13) | igmv_ab4 & (ambch4[7,:]>=78)
+igmv_ab5n1= igmv_ab5 & (ambch5[7,:]<=13) | igmv_ab5 & (ambch5[7,:]>=78)
+
+
+tup_gmabn1=np.zeros([5],float)
+tup_gmabn1[0]=mean(ambch1[18,igmv_ab1n1])
+tup_gmabn1[1]=mean(ambch2[18,igmv_ab2n1])
+tup_gmabn1[2]=mean(ambch3[18,igmv_ab3n1])
+tup_gmabn1[3]=mean(ambch4[18,igmv_ab4n1])
+tup_gmabn1[4]=mean(ambch5[18,igmv_ab5n1])
+
+#ecart types
+tupet_gmabn1=np.zeros([5],float)
+tupet_gmabn1[0]=sqrt(sum(ambch1[18,igmv_ab1n1]**2)/size(ambch1[18,igmv_ab1n1])-mean(ambch1[18,igmv_ab1n1])**2)
+tupet_gmabn1[1]=sqrt(sum(ambch2[18,igmv_ab2n1]**2)/size(ambch2[18,igmv_ab2n1])-mean(ambch2[18,igmv_ab2n1])**2)
+tupet_gmabn1[2]=sqrt(sum(ambch3[18,igmv_ab3n1]**2)/size(ambch3[18,igmv_ab3n1])-mean(ambch3[18,igmv_ab3n1])**2)
+tupet_gmabn1[3]=sqrt(sum(ambch4[18,igmv_ab4n1]**2)/size(ambch4[18,igmv_ab4n1])-mean(ambch4[18,igmv_ab4n1])**2)
+tupet_gmabn1[4]=sqrt(sum(ambch5[18,igmv_ab5n1]**2)/size(ambch5[18,igmv_ab5n1])-mean(ambch5[18,igmv_ab5n1])**2)
+
+#Ã€msua
+
+igmv_aa1=(amch1[0,:]>=-31) & (amch1[0,:]<=0) & (amch1[1,:]<=-64) & (amch1[1,:]>=-69) | (amch1[0,:]>=0) & (amch1[0,:]<=30) & (amch1[1,:]<=-64) & (amch1[1,:]>=-69) | (amch1[0,:]>=-180) & (amch1[0,:]<=-130) & (amch1[1,:]<=-67) & (amch1[1,:]>=-73)
+
+igmv_aa2=(amch2[0,:]>=-31) & (amch2[0,:]<=0) & (amch2[1,:]<=-64) & (amch2[1,:]>=-69) | (amch2[0,:]>=0) & (amch2[0,:]<=30) & (amch2[1,:]<=-64) & (amch2[1,:]>=-69) | (amch2[0,:]>=-180) & (amch2[0,:]<=-130) & (amch2[1,:]<=-67) & (amch2[1,:]>=-73)
+
+igmv_aa3=(amch3[0,:]>=-31) & (amch3[0,:]<=0) & (amch3[1,:]<=-64) & (amch3[1,:]>=-69) | (amch3[0,:]>=0) & (amch3[0,:]<=30) & (amch3[1,:]<=-64) & (amch3[1,:]>=-69) | (amch3[0,:]>=-180) & (amch3[0,:]<=-130) & (amch3[1,:]<=-67) & (amch3[1,:]>=-73)
+
+igmv_aa4=(amch4[0,:]>=-31) & (amch4[0,:]<=0) & (amch4[1,:]<=-64) & (amch4[1,:]>=-69) | (amch4[0,:]>=0) & (amch4[0,:]<=30) & (amch4[1,:]<=-64) & (amch4[1,:]>=-69) | (amch4[0,:]>=-180) & (amch4[0,:]<=-130) & (amch4[1,:]<=-67) & (amch4[1,:]>=-73)
+
+igmv_aa5=(amch5[0,:]>=-31) & (amch5[0,:]<=0) & (amch5[1,:]<=-64) & (amch5[1,:]>=-69) | (amch5[0,:]>=0) & (amch5[0,:]<=30) & (amch5[1,:]<=-64) & (amch5[1,:]>=-69) | (amch5[0,:]>=-180) & (amch5[0,:]<=-130) & (amch5[1,:]<=-67) & (amch5[1,:]>=-73)
+
+igmv_aa6=(amch6[0,:]>=-31) & (amch6[0,:]<=0) & (amch6[1,:]<=-64) & (amch6[1,:]>=-69) | (amch6[0,:]>=0) & (amch6[0,:]<=30) & (amch6[1,:]<=-64) & (amch6[1,:]>=-69) | (amch6[0,:]>=-180) & (amch6[0,:]<=-130) & (amch6[1,:]<=-67) & (amch6[1,:]>=-73)
+
+igmv_aa7=(amch7[0,:]>=-31) & (amch7[0,:]<=0) & (amch7[1,:]<=-64) & (amch7[1,:]>=-69) | (amch7[0,:]>=0) & (amch7[0,:]<=30) & (amch7[1,:]<=-64) & (amch7[1,:]>=-69) | (amch7[0,:]>=-180) & (amch7[0,:]<=-130) & (amch7[1,:]<=-67) & (amch7[1,:]>=-73)
+
+igmv_aa15=(amch15[0,:]>=-31) & (amch15[0,:]<=0) & (amch15[1,:]<=-64) & (amch15[1,:]>=-69) | (amch15[0,:]>=0) & (amch15[0,:]<=30) & (amch15[1,:]<=-64) & (amch15[1,:]>=-69) | (amch15[0,:]>=-180) & (amch15[0,:]<=-130) & (amch15[1,:]<=-67) & (amch15[1,:]>=-73)
+
+tup_gmaa=np.zeros([8],float)
+tup_gmaa[0]=mean(amch1[18,igmv_aa1])
+tup_gmaa[1]=mean(amch2[18,igmv_aa2])
+tup_gmaa[2]=mean(amch3[18,igmv_aa3])
+tup_gmaa[3]=mean(amch4[18,igmv_aa4])
+tup_gmaa[4]=mean(amch5[18,igmv_aa5])
+tup_gmaa[5]=mean(amch6[18,igmv_aa6])
+tup_gmaa[6]=mean(amch7[18,igmv_aa7])
+tup_gmaa[7]=mean(amch15[18,igmv_aa15])
+
+#mansua angles faibles
+igmv_aa1n1 = igmv_aa1 & (amch1[7,:]<=5) | igmv_aa1 & (amch1[7,:]>=26)
+igmv_aa2n1 = igmv_aa2 & (amch2[7,:]<=5) | igmv_aa2 & (amch2[7,:]>=26)
+igmv_aa3n1 = igmv_aa3 & (amch3[7,:]<=5) | igmv_aa3 & (amch3[7,:]>=26)
+igmv_aa4n1 = igmv_aa4 & (amch4[7,:]<=5) | igmv_aa4 & (amch4[7,:]>=26)
+igmv_aa5n1 = igmv_aa5 & (amch5[7,:]<=5) | igmv_aa5 & (amch5[7,:]>=26)
+igmv_aa6n1 = igmv_aa6 & (amch6[7,:]<=5) | igmv_aa6 & (amch6[7,:]>=26)
+igmv_aa7n1 = igmv_aa7 & (amch7[7,:]<=5) | igmv_aa7 & (amch7[7,:]>=26)
+igmv_aa15n1 = igmv_aa15 & (amch15[7,:]<=5) | igmv_aa15 & (amch15[7,:]>=26)
+
+tup_gmaan1=np.zeros([8],float)
+tup_gmaan1[0]=mean(amch1[18,igmv_aa1n1])
+tup_gmaan1[1]=mean(amch2[18,igmv_aa2n1])
+tup_gmaan1[2]=mean(amch3[18,igmv_aa3n1])
+tup_gmaan1[3]=mean(amch4[18,igmv_aa4n1])
+tup_gmaan1[4]=mean(amch5[18,igmv_aa5n1])
+tup_gmaan1[5]=mean(amch6[18,igmv_aa6n1])
+tup_gmaan1[6]=mean(amch7[18,igmv_aa7n1])
+tup_gmaan1[7]=mean(amch15[18,igmv_aa15n1])
+
+
+#ecart types
+tupet_gmaan1=np.zeros([8],float)
+tupet_gmaan1[0]=sqrt(sum(amch1[18,igmv_aa1n1]**2)/size(amch1[18,igmv_aa1n1])-mean(amch1[18,igmv_aa1n1])**2)
+tupet_gmaan1[1]=sqrt(sum(amch2[18,igmv_aa2n1]**2)/size(amch2[18,igmv_aa2n1])-mean(amch2[18,igmv_aa2n1])**2)
+tupet_gmaan1[2]=sqrt(sum(amch3[18,igmv_aa3n1]**2)/size(amch3[18,igmv_aa3n1])-mean(amch3[18,igmv_aa3n1])**2)
+tupet_gmaan1[3]=sqrt(sum(amch4[18,igmv_aa4n1]**2)/size(amch4[18,igmv_aa4n1])-mean(amch4[18,igmv_aa4n1])**2)
+tupet_gmaan1[4]=sqrt(sum(amch5[18,igmv_aa5n1]**2)/size(amch5[18,igmv_aa5n1])-mean(amch5[18,igmv_aa5n1])**2)
+tupet_gmaan1[5]=sqrt(sum(amch6[18,igmv_aa6n1]**2)/size(amch6[18,igmv_aa6n1])-mean(amch6[18,igmv_aa6n1])**2)
+tupet_gmaan1[6]=sqrt(sum(amch7[18,igmv_aa7n1]**2)/size(amch7[18,igmv_aa7n1])-mean(amch7[18,igmv_aa7n1])**2)
+tupet_gmaan1[7]=sqrt(sum(amch15[18,igmv_aa15n1]**2)/size(amch15[18,igmv_aa15n1])-mean(amch15[18,igmv_aa15n1])**2)
+
+#ssmis
+igmv_ss1=(ssch1[0,:]>=-31) & (ssch1[0,:]<=0) & (ssch1[1,:]<=-64) & (ssch1[1,:]>=-69) | (ssch1[0,:]>=0) & (ssch1[0,:]<=30) & (ssch1[1,:]<=-64) & (ssch1[1,:]>=-69) | (ssch1[0,:]>=-180) & (ssch1[0,:]<=-130) & (ssch1[1,:]<=-67) & (ssch1[1,:]>=-73)
+
+igmv_ss2=(ssch2[0,:]>=-31) & (ssch2[0,:]<=0) & (ssch2[1,:]<=-64) & (ssch2[1,:]>=-69) | (ssch2[0,:]>=0) & (ssch2[0,:]<=30) & (ssch2[1,:]<=-64) & (ssch2[1,:]>=-69) | (ssch2[0,:]>=-180) & (ssch2[0,:]<=-130) & (ssch2[1,:]<=-67) & (ssch2[1,:]>=-73)
+
+igmv_ss3=(ssch3[0,:]>=-31) & (ssch3[0,:]<=0) & (ssch3[1,:]<=-64) & (ssch3[1,:]>=-69) | (ssch3[0,:]>=0) & (ssch3[0,:]<=30) & (ssch3[1,:]<=-64) & (ssch3[1,:]>=-69) | (ssch3[0,:]>=-180) & (ssch3[0,:]<=-130) & (ssch3[1,:]<=-67) & (ssch3[1,:]>=-73)
+
+igmv_ss4=(ssch4[0,:]>=-31) & (ssch4[0,:]<=0) & (ssch4[1,:]<=-64) & (ssch4[1,:]>=-69) | (ssch4[0,:]>=0) & (ssch4[0,:]<=30) & (ssch4[1,:]<=-64) & (ssch4[1,:]>=-69) | (ssch4[0,:]>=-180) & (ssch4[0,:]<=-130) & (ssch4[1,:]<=-67) & (ssch4[1,:]>=-73)
+
+igmv_ss5=(ssch5[0,:]>=-31) & (ssch5[0,:]<=0) & (ssch5[1,:]<=-64) & (ssch5[1,:]>=-69) | (ssch5[0,:]>=0) & (ssch5[0,:]<=30) & (ssch5[1,:]<=-64) & (ssch5[1,:]>=-69) | (ssch5[0,:]>=-180) & (ssch5[0,:]<=-130) & (ssch5[1,:]<=-67) & (ssch5[1,:]>=-73)
+
+igmv_ss8=(ssch8[0,:]>=-31) & (ssch8[0,:]<=0) & (ssch8[1,:]<=-64) & (ssch8[1,:]>=-69) | (ssch8[0,:]>=0) & (ssch8[0,:]<=30) & (ssch8[1,:]<=-64) & (ssch8[1,:]>=-69) | (ssch8[0,:]>=-180) & (ssch8[0,:]<=-130) & (ssch8[1,:]<=-67) & (ssch8[1,:]>=-73)
+
+igmv_ss9=(ssch9[0,:]>=-31) & (ssch9[0,:]<=0) & (ssch9[1,:]<=-64) & (ssch9[1,:]>=-69) | (ssch9[0,:]>=0) & (ssch9[0,:]<=30) & (ssch9[1,:]<=-64) & (ssch9[1,:]>=-69) | (ssch9[0,:]>=-180) & (ssch9[0,:]<=-130) & (ssch9[1,:]<=-67) & (ssch9[1,:]>=-73)
+
+igmv_ss10=(ssch10[0,:]>=-31) & (ssch10[0,:]<=0) & (ssch10[1,:]<=-64) & (ssch10[1,:]>=-69) | (ssch10[0,:]>=0) & (ssch10[0,:]<=30) & (ssch10[1,:]<=-64) & (ssch10[1,:]>=-69) | (ssch10[0,:]>=-180) & (ssch10[0,:]<=-130) & (ssch10[1,:]<=-67) & (ssch10[1,:]>=-73)
+
+igmv_ss11=(ssch11[0,:]>=-31) & (ssch11[0,:]<=0) & (ssch11[1,:]<=-64) & (ssch11[1,:]>=-69) | (ssch11[0,:]>=0) & (ssch11[0,:]<=30) & (ssch11[1,:]<=-64) & (ssch11[1,:]>=-69) | (ssch11[0,:]>=-180) & (ssch11[0,:]<=-130) & (ssch11[1,:]<=-67) & (ssch11[1,:]>=-73)
+
+igmv_ss12=(ssch12[0,:]>=-31) & (ssch12[0,:]<=0) & (ssch12[1,:]<=-64) & (ssch12[1,:]>=-69) | (ssch12[0,:]>=0) & (ssch12[0,:]<=30) & (ssch12[1,:]<=-64) & (ssch12[1,:]>=-69) | (ssch12[0,:]>=-180) & (ssch12[0,:]<=-130) & (ssch12[1,:]<=-67) & (ssch12[1,:]>=-73)
+
+igmv_ss13=(ssch13[0,:]>=-31) & (ssch13[0,:]<=0) & (ssch13[1,:]<=-64) & (ssch13[1,:]>=-69) | (ssch13[0,:]>=0) & (ssch13[0,:]<=30) & (ssch13[1,:]<=-64) & (ssch13[1,:]>=-69) | (ssch13[0,:]>=-180) & (ssch13[0,:]<=-130) & (ssch13[1,:]<=-67) & (ssch13[1,:]>=-73)
+
+igmv_ss14=(ssch14[0,:]>=-31) & (ssch14[0,:]<=0) & (ssch14[1,:]<=-64) & (ssch14[1,:]>=-69) | (ssch14[0,:]>=0) & (ssch14[0,:]<=30) & (ssch14[1,:]<=-64) & (ssch14[1,:]>=-69) | (ssch14[0,:]>=-180) & (ssch14[0,:]<=-130) & (ssch14[1,:]<=-67) & (ssch14[1,:]>=-73)
+
+igmv_ss15=(ssch15[0,:]>=-31) & (ssch15[0,:]<=0) & (ssch15[1,:]<=-64) & (ssch15[1,:]>=-69) | (ssch15[0,:]>=0) & (ssch15[0,:]<=30) & (ssch15[1,:]<=-64) & (ssch15[1,:]>=-69) | (ssch15[0,:]>=-180) & (ssch15[0,:]<=-130) & (ssch15[1,:]<=-67) & (ssch15[1,:]>=-73)
+
+igmv_ss16=(ssch16[0,:]>=-31) & (ssch16[0,:]<=0) & (ssch16[1,:]<=-64) & (ssch16[1,:]>=-69) | (ssch16[0,:]>=0) & (ssch16[0,:]<=30) & (ssch16[1,:]<=-64) & (ssch16[1,:]>=-69) | (ssch16[0,:]>=-180) & (ssch16[0,:]<=-130) & (ssch16[1,:]<=-67) & (ssch16[1,:]>=-73)
+
+igmv_ss17=(ssch17[0,:]>=-31) & (ssch17[0,:]<=0) & (ssch17[1,:]<=-64) & (ssch17[1,:]>=-69) | (ssch17[0,:]>=0) & (ssch17[0,:]<=30) & (ssch17[1,:]<=-64) & (ssch17[1,:]>=-69) | (ssch17[0,:]>=-180) & (ssch17[0,:]<=-130) & (ssch17[1,:]<=-67) & (ssch17[1,:]>=-73)
+
+igmv_ss18=(ssch18[0,:]>=-31) & (ssch18[0,:]<=0) & (ssch18[1,:]<=-64) & (ssch18[1,:]>=-69) | (ssch18[0,:]>=0) & (ssch18[0,:]<=30) & (ssch18[1,:]<=-64) & (ssch18[1,:]>=-69) | (ssch18[0,:]>=-180) & (ssch18[0,:]<=-130) & (ssch18[1,:]<=-67) & (ssch18[1,:]>=-73)
+
+tup_gmss=np.zeros([16],float)
+tup_gmss[0]=mean(ssch1[16,igmv_ss1])
+tup_gmss[1]=mean(ssch2[16,igmv_ss2])
+tup_gmss[2]=mean(ssch3[16,igmv_ss3])
+tup_gmss[3]=mean(ssch4[16,igmv_ss4])
+tup_gmss[4]=mean(ssch5[16,igmv_ss5])
+tup_gmss[5]=mean(ssch8[16,igmv_ss8])
+tup_gmss[6]=mean(ssch9[16,igmv_ss9])
+tup_gmss[7]=mean(ssch10[16,igmv_ss10])
+tup_gmss[8]=mean(ssch11[16,igmv_ss11])
+tup_gmss[9]=mean(ssch12[16,igmv_ss12])
+tup_gmss[10]=mean(ssch13[16,igmv_ss13])
+tup_gmss[11]=mean(ssch14[16,igmv_ss14])
+tup_gmss[12]=mean(ssch15[16,igmv_ss15])
+tup_gmss[13]=mean(ssch16[16,igmv_ss16])
+tup_gmss[14]=mean(ssch17[16,igmv_ss17])
+tup_gmss[15]=mean(ssch18[16,igmv_ss18])
+
+
+#ecart types
+tupet_gmss=np.zeros([16],float)
+tupet_gmss[0]=sqrt(sum(ssch1[16,igmv_ss1]**2)/size(ssch1[16,igmv_ss1])-mean(ssch1[16,igmv_ss1])**2)
+tupet_gmss[1]=sqrt(sum(ssch2[16,igmv_ss2]**2)/size(ssch2[16,igmv_ss2])-mean(ssch2[16,igmv_ss2])**2)
+tupet_gmss[2]=sqrt(sum(ssch3[16,igmv_ss3]**2)/size(ssch3[16,igmv_ss3])-mean(ssch3[16,igmv_ss3])**2)
+tupet_gmss[3]=sqrt(sum(ssch4[16,igmv_ss4]**2)/size(ssch4[16,igmv_ss4])-mean(ssch4[16,igmv_ss4])**2)
+tupet_gmss[4]=sqrt(sum(ssch5[16,igmv_ss5]**2)/size(ssch5[16,igmv_ss5])-mean(ssch5[16,igmv_ss5])**2)
+tupet_gmss[5]=sqrt(sum(ssch8[16,igmv_ss8]**2)/size(ssch8[16,igmv_ss8])-mean(ssch8[16,igmv_ss8])**2)
+tupet_gmss[6]=sqrt(sum(ssch9[16,igmv_ss9]**2)/size(ssch9[16,igmv_ss9])-mean(ssch9[16,igmv_ss9])**2)
+tupet_gmss[7]=sqrt(sum(ssch10[16,igmv_ss10]**2)/size(ssch10[16,igmv_ss10])-mean(ssch10[16,igmv_ss10])**2)
+tupet_gmss[8]=sqrt(sum(ssch11[16,igmv_ss11]**2)/size(ssch11[16,igmv_ss11])-mean(ssch11[16,igmv_ss11])**2)
+tupet_gmss[9]=sqrt(sum(ssch12[16,igmv_ss12]**2)/size(ssch12[16,igmv_ss12])-mean(ssch12[16,igmv_ss12])**2)
+tupet_gmss[10]=sqrt(sum(ssch13[16,igmv_ss13]**2)/size(ssch13[16,igmv_ss13])-mean(ssch13[16,igmv_ss13])**2)
+tupet_gmss[11]=sqrt(sum(ssch14[16,igmv_ss14]**2)/size(ssch14[16,igmv_ss14])-mean(ssch14[16,igmv_ss14])**2)
+tupet_gmss[12]=sqrt(sum(ssch15[16,igmv_ss15]**2)/size(ssch15[16,igmv_ss15])-mean(ssch15[16,igmv_ss15])**2)
+tupet_gmss[13]=sqrt(sum(ssch16[16,igmv_ss16]**2)/size(ssch16[16,igmv_ss16])-mean(ssch16[16,igmv_ss16])**2)
+tupet_gmss[14]=sqrt(sum(ssch17[16,igmv_ss17]**2)/size(ssch17[16,igmv_ss17])-mean(ssch17[16,igmv_ss17])**2)
+tupet_gmss[15]=sqrt(sum(ssch18[16,igmv_ss18]**2)/size(ssch18[16,igmv_ss18])-mean(ssch18[16,igmv_ss18])**2)
+
+
+
+
+
+
+for i in range(0,16):
+    ti=str(ssmisch[i])
+    t='tupet_gmss['+str(i)+']=sqrt(sum(ssch'+ti+'[16,igmv_ss'+ti+']**2)/size(ssch'+ti+'[16,igmv_ss'+ti+'])-mean(ssch'+ti+'[16,igmv_ss'+ti+'])**2)'
+    print t
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+cs=map.pcolor(xii,yii,iaaa)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+plt.title('plateformes)
+
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 1), labels=[0, 0, 0, 1])
+map.drawparallels(np.arange(-90, 90, 11), labels=[1, 0, 0, 0])
+plt.show()
+
+
+
+
+
+#################"
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.5
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+xii, yii = map(*np.meshgrid(xvec,yvec))
+#, clevs, cmap=my_cmap) 
+clevs=arange(100,300,1)#star, stop, step
+map.pcolor(xii,yii,iab)
+cs=map.contour(xii,yii,tbpgrid_ta2, clevs, cmap=cm.s3pcpn_l_r)
+#cmap=cm.s3pcpn_l_r)
+#sstanom)
+#s3pcpn_l_r)
+cbar =colorbar(cs)
+#plt.title(tt1)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 1), labels=[0, 0, 0, 1])
+map.drawparallels(np.arange(-90, 90, 1), labels=[1, 0, 0, 0])
+plt.show()
+plt.savefig(t1)
+close()
Index: /trunk/src/python_script/hist tup.py
===================================================================
--- /trunk/src/python_script/hist tup.py	(revision 6)
+++ /trunk/src/python_script/hist tup.py	(revision 6)
@@ -0,0 +1,59 @@
+############
+#histogrammes moyennÃ©es
+#tup ssmis ch15, ch16 et amsua ch2
+
+
+tupp_ta260=np.reshape(tuppgrid_ta260,-1)
+mmp_ta260=np.reshape(mpgrid_t60,-1)
+
+iant = (mmp_ta260 >= 0.5)
+tupp_ta260ant=tupp_ta260[iant]
+
+bins=arange(2,14,0.2)
+h=plt.hist(tupp_ta260ant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tup moyenne cont amsua ch2')
+#plt.show()
+plt.savefig('hist_tup_moyenne_cont_amsua_ch2.png')
+close()
+
+#ssmis
+
+tupp_t1660=np.reshape(tuppgrid_t1660,-1)
+tupp_t1660ant=tupp_t1660[iant]
+
+bins=arange(7,24,0.2)
+h=plt.hist(tupp_t1660ant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tup moyenne cont ssmis ch16')
+#plt.show()
+plt.savefig('hist_tup_moyenne_cont_ssmis_ch16.png')
+close()
+
+########################
+#hist pas moyennÃ©es
+#amsua ch2
+
+iant60v = (mm_t60 >= 0.5)
+tup_ta2ant=tup_ta260[iant60v]
+
+bins=arange(0,24,0.2)
+h=plt.hist(tup_ta2ant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tup cont amsua ch2')
+#plt.show()
+plt.savefig('hist_tup_cont_amsua_ch2.png')
+close()
+
+#ssmis ch16
+
+iant60v = (mm_t1660 >= 0.5)
+tup_t16ant=tup_t1660[iant60v]
+
+bins=arange(7,30,0.2)
+h=plt.hist(tup_t16ant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tup cont ssmis ch16')
+#plt.show()
+plt.savefig('hist_tup_cont_ssmis_ch16.png')
+close()
Index: /trunk/src/python_script/hist_ssmis_ch15.py
===================================================================
--- /trunk/src/python_script/hist_ssmis_ch15.py	(revision 6)
+++ /trunk/src/python_script/hist_ssmis_ch15.py	(revision 6)
@@ -0,0 +1,90 @@
+#hist tb moyenne smmis ch15
+
+tbp_ts15=np.reshape(tbnngrid_t,-1)
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_ts15, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne ssmis ch15')
+#plt.show()
+plt.savefig('hist_tb_moyenne_ssmis_ch15.png')
+close()
+
+##########################
+#hist tb moyennÃ© ant
+
+#mm_t matrix mask
+
+mzzpgrid_lat60=mzzpgrid_t
+mmvec_lat60=mm_t
+
+tbp_t60=np.reshape(tbpgrid_t60,-1)
+mmp_t60=np.reshape(mzzpgrid_lat60,-1)
+
+iant = (mmp_t60 >= 0.5)
+tbp_t60ant=tbp_t60[iant]
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_t60ant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne cont ssmis ch15')
+#plt.show()
+plt.savefig('hist_tb_moyenne_cont_ssmis_ch15.png')
+close()
+
+##########################
+#hist tb moyennÃ© mer et glace de mer lat 50
+tbp_t50=np.reshape(tbpgrid_t,-1)
+mmp_t50=np.reshape(mzzpgrid_t50,-1)
+
+imer = (mmp_t50 < 0.5)
+tbp_tmer=tbp_t50[imer]
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_tmer, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne mer ssmis ch15')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_ssmis_ch15.png')
+close()
+
+##########################""
+#hist tb moyenne smmis ch15
+
+bins=arange(100,300,2)
+h=plt.hist(tb_t, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb ssmis ch15')
+#plt.show()
+plt.savefig('hist_tb_ssmis_ch15.png')
+close()
+
+##########################
+#hist tb ant
+
+#mm_t matrix mask
+
+iantv= (mmvec_lat60 >= 0.5)
+tb_t60cont= tb_t60[iantv]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_t60cont, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb cont ssmis ch15')
+#plt.show()
+plt.savefig('hist_tb_cont_ssmis_ch15.png')
+close()
+
+##########################
+#hist tb mer et glace de mer lat 50
+
+imerv= (mm_t < 0.5)
+tb_t50merv= tb_t[imerv]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_t50merv, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb mer ssmis ch15')
+#plt.show()
+plt.savefig('hist_tb_mer_ssmis_ch15.png')
+close()
Index: /trunk/src/python_script/hist_ssmis_ch16.py
===================================================================
--- /trunk/src/python_script/hist_ssmis_ch16.py	(revision 6)
+++ /trunk/src/python_script/hist_ssmis_ch16.py	(revision 6)
@@ -0,0 +1,88 @@
+#hist tb moyenne smmis ch15
+
+tbp_ts16=np.reshape(tbnngrid_t,-1)
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_ts16, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne ssmis ch16')
+#plt.show()
+plt.savefig('hist_tb_moyenne_ssmis_ch16.png')
+close()
+
+##########################
+#hist tb moyennÃ© ant
+
+#mm_t matrix mask
+
+
+tbp_t60=np.reshape(tbpgrid_t60,-1)
+mmp_t60=np.reshape(mzzpgrid_t60,-1)
+
+iant = (mmp_t60 >= 0.5)
+tbp_t60ant=tbp_t60[iant]
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_t60ant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne cont ssmis ch16')
+#plt.show()
+plt.savefig('hist_tb_moyenne_cont_ssmis_ch16.png')
+close()
+
+##########################
+#hist tb moyennÃ© mer et glace de mer lat 50
+tbp_t50=np.reshape(tbpgrid_t,-1)
+mmp_t50=np.reshape(mzzpgrid_t50,-1)
+
+imer = (mmp_t50 < 0.5)
+tbp_tmer=tbp_t50[imer]
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_tmer, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne mer ssmis ch16')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_ssmis_ch16.png')
+close()
+
+##########################
+#hist tb
+
+bins=arange(100,300,2)
+h=plt.hist(tb_t, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb ssmis ch16')
+plt.show()
+plt.savefig('hist_tb_ssmis_ch16.png')
+close()
+
+##########################
+#hist tb ant
+
+#mm_t matrix mask
+
+iantv= (mm_t60 >= 0.5)
+tb_t60cont= tb_t60[iantv]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_t60cont, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb cont ssmis ch16')
+#plt.show()
+plt.savefig('hist_tb_cont_ssmis_ch16.png')
+close()
+
+##########################
+#hist tb mer et glace de mer lat 50
+
+imerv= (mm_t50 < 0.5)
+tb_t50merv= tb_t50[imerv]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_t50merv, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb mer ssmis ch16')
+#plt.show()
+plt.savefig('hist_tb_mer_ssmis_ch16.png')
+close()
Index: /trunk/src/python_script/hist_tb_amsua_ch2.py
===================================================================
--- /trunk/src/python_script/hist_tb_amsua_ch2.py	(revision 6)
+++ /trunk/src/python_script/hist_tb_amsua_ch2.py	(revision 6)
@@ -0,0 +1,273 @@
+#hist tb moyenne
+
+tbp_t=np.reshape(tbpgrid_t,-1)
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_t, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne amsua ch2')
+#plt.show()
+plt.savefig('hist_tb_moyenne_amsua_ch2_new.png')
+close()
+
+##########################
+#mer
+mmp_t=np.reshape(mzzpgrid_t,-1)
+imer = (mmp_t < 0.5)
+tbp_tmer=tbp_t[imer]
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_tmer, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb moyenne mer amsua ch2 new')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_amsua_ch2_new.png')
+close()
+#################################################
+#contienente pas moyenne
+iant60 = (mm_t60 >= 0.5)
+tb_tant=tb_t60[iant60]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_tant, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='blue')
+plt.title('histogramme tb cont amsua ch2 new')
+plt.show()
+plt.savefig('hist_tb_cont_amsua_ch2_new.png')
+close()
+
+#solo alt>
+
+alt_tant=alt_t60[iant60]
+ialt1= (alt_tant>=2000)
+tb_talt1=tb_tant[ialt1]
+
+ialt2= (alt_tant<2000)
+tb_talt2=tb_tant[ialt2]
+
+
+fig=figure(1)
+bins=arange(100,300,2)
+h1=plt.hist(tb_talt1, bins=bins,histtype='bar',rwidth=0.4,
+label='>2000m',normed='True',color='red')
+h2=plt.hist(tb_talt2, bins=bins,histtype='bar',rwidth=0.1,
+label='<2000m',normed='True',color='blue')
+plt.legend()
+fig.suptitle('Histogrammes tb alt 2000m AMSUA CH2', fontsize=14)
+plt.savefig('hist_tb_alt2000m_amsua_ch2.png')
+close()
+
+
+alt_tant=alt_t60[iant60]
+ialt11= (alt_tant>=4000)
+tb_talt11=tb_tant[ialt11]
+
+ialt22= (alt_tant>=3000) & (alt_tant<4000)
+tb_talt22=tb_tant[ialt22]
+
+ialt33= (alt_tant>=2000) & (alt_tant<3000)
+tb_talt33=tb_tant[ialt33]
+
+ialt44= (alt_tant>=1000) & (alt_tant<2000)
+tb_talt44=tb_tant[ialt44]
+
+ialt55= (alt_tant<1000)
+tb_talt55=tb_tant[ialt55]
+
+
+fig=figure(1)
+bins=arange(100,300,2)
+h1=plt.hist(tb_talt11, bins=bins,histtype='step',rwidth=0.4,
+label='>400m',normed='True',color='red')
+h2=plt.hist(tb_talt22, bins=bins,histtype='step',rwidth=0.1,
+label='400m - 3000m',normed='True',color='blue')
+h3=plt.hist(tb_talt33, bins=bins,histtype='step',rwidth=0.1,
+label='3000m - 2000m',normed='True',color='green')
+h4=plt.hist(tb_talt44, bins=bins,histtype='step',rwidth=0.1,
+label='2000m - 1000m',normed='True',color='orange')
+h5=plt.hist(tb_talt55, bins=bins,histtype='step',rwidth=0.1,
+label='>1000m',normed='True',color='black')
+fig.suptitle('Histogrammes tb AMSUA CH2', fontsize=14)
+plt.legend()
+#plt.show()
+plt.savefig('hist_tb_dif_alt_amsua_ch2.png')
+close()
+
+
+##############
+
+#hist tb continent
+tbp_tc=np.reshape(tbpgrid_tc,-1)
+
+bins=arange(100,300,2)
+h=plt.hist(tbp_tc, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne cont')
+plt.show()
+plt.savefig('hist_tb_moyenne_cont_amsua_ch2.png')
+close()
+
+#hist tb galce mer
+
+tbp_mer=np.reshape(mertb,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbp_mer, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne mer galce de mer')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_glace_de_mer_amsua_ch2.png')
+close()
+
+#áž§ist tb cont pos1 
+
+tbp_1nc=np.reshape(tbpgrid_1nc,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbp_1nc, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne cont pos1')
+#plt.show()
+plt.savefig('hist_tb_moyenne_cont_pos1_amsua_ch2.png')
+close()
+
+#áž§ist tb cont pos2 
+
+tbp_2nc=np.reshape(tbpgrid_2nc,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbp_2nc, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne cont pos2')
+#plt.show()
+plt.savefig('hist_tb_moyenne_cont_pos2_amsua_ch2.png')
+close()
+
+#áž§ist tb cont pos3 
+
+tbp_3nc=np.reshape(tbpgrid_3nc,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbp_3nc, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne cont pos3')
+#plt.show()
+plt.savefig('hist_tb_moyenne_cont_pos3_amsua_ch2.png')
+close()
+
+
+################################################################
+
+mertb_1n
+
+#áž§ist tb mer pos1 
+
+tbmer_1n=np.reshape(mertb_1n,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbmer_1n, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne mer pos1')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_pos1_amsua_ch2.png')
+close()
+
+#áž§ist tb mer pos2
+
+tbmer_2n=np.reshape(mertb_2n,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbmer_2n, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne mer pos2')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_pos2_amsua_ch2.png')
+close()
+
+#áž§ist tb mer pos3
+
+tbmer_3n=np.reshape(mertb_3n,-1)
+bins=arange(100,300,2)
+h=plt.hist(tbmer_3n, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb moyenne mer pos3')
+#plt.show()
+plt.savefig('hist_tb_moyenne_mer_pos3_amsua_ch2.png')
+close()
+
+#######################################################""
+#hist tb pas moyennÃ© cont
+
+iterre = (mm_t >= 0.5)
+tb_tcnm=tb_t[iterre]
+
+
+
+bins=arange(100,300,2)
+h=plt.hist(tb_tcnm, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb ant')
+#plt.show()
+plt.savefig('hist_tb_ant_amsua_ch2.png')
+close()
+
+
+
+#hist tb mer pas moyennÃ© 
+imer =  (mm_t50 < 0.5)
+tb_tmer=tb_t50[imer]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_tmer, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb mer')
+plt.show()
+plt.savefig('hist_tb_mer_amsua_ch2.png')
+close()
+
+
+
+#glace de mer et plataformes
+iglace = tb_tmer>=190
+tb_tglace= tb_tmer[iglace]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_tglace, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb glace de mer (tb>190)')
+#plt.show()
+plt.savefig('hist_tb_glace_de_mer190_amsua_ch2.png')
+close()
+
+
+
+
+#hist tb ant pas moyennÃ©  pos1
+it_1n = (mm_tl1n >= 0.5)
+tb_1naa=tb_1na[it_1n]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_1naa, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb ant pos1')
+#plt.show()
+plt.savefig('hist_tb_ant_pos1_amsua_ch2.png')
+close()
+
+#hist tb ant pas moyennÃ©  pos2
+it_2n = (mm_tl2n >= 0.5)
+tb_2naa=tb_2na[it_2n]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_2naa, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb ant pos2')
+#plt.show()
+plt.savefig('hist_tb_ant_pos2_amsua_ch2.png')
+close()
+
+#hist tb ant pas moyennÃ©  pos3
+it_3n = (mm_tl3n >= 0.5)
+tb_3naa=tb_3na[it_3n]
+
+bins=arange(100,300,2)
+h=plt.hist(tb_3naa, bins=bins,histtype='bar',rwidth=0.2,
+label='hist',normed='True',color='green')
+plt.title('histogramme tb ant pos3')
+#plt.show()
+plt.savefig('hist_tb_ant_pos3_amsua_ch2.png')
+close()
Index: /trunk/src/python_script/newgrid.py
===================================================================
--- /trunk/src/python_script/newgrid.py	(revision 6)
+++ /trunk/src/python_script/newgrid.py	(revision 6)
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+import bina
+
+def newgrid(xx, yy, zz, vnx):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=0
+    z1=1
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec
Index: /trunk/src/python_script/newgrid1.py
===================================================================
--- /trunk/src/python_script/newgrid1.py	(revision 6)
+++ /trunk/src/python_script/newgrid1.py	(revision 6)
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+import bina
+
+def newgrid(x, y, z, vnx):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=0
+    z1=1
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz
Index: /trunk/src/python_script/newgrid_z.py
===================================================================
--- /trunk/src/python_script/newgrid_z.py	(revision 6)
+++ /trunk/src/python_script/newgrid_z.py	(revision 6)
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, vnx, z0, z1):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz
Index: /trunk/src/python_script/newgrid_zm.py
===================================================================
--- /trunk/src/python_script/newgrid_zm.py	(revision 6)
+++ /trunk/src/python_script/newgrid_zm.py	(revision 6)
@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, mask, vnx, z0, z1):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = mask[inn]
+
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz, mm
Index: /trunk/src/python_script/newgrid_zml.py
===================================================================
--- /trunk/src/python_script/newgrid_zml.py	(revision 6)
+++ /trunk/src/python_script/newgrid_zml.py	(revision 6)
@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, mask, vnx, z0, z1, y11):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+#    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = mask[inn]
+
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz, mm
Index: /trunk/src/python_script/newgridn.py
===================================================================
--- /trunk/src/python_script/newgridn.py	(revision 6)
+++ /trunk/src/python_script/newgridn.py	(revision 6)
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+import bina
+
+def newgridn(xx, yy, zz, vnx, nscan):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=100
+    z1=300
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec
Index: /trunk/src/python_script/newgridns.py
===================================================================
--- /trunk/src/python_script/newgridns.py	(revision 6)
+++ /trunk/src/python_script/newgridns.py	(revision 6)
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+import bina
+
+def newgridns(xx, yy, zz, vnx, nscan, pos):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=0
+    z1=1
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec
Index: /trunk/src/python_script/newgridns1.py
===================================================================
--- /trunk/src/python_script/newgridns1.py	(revision 6)
+++ /trunk/src/python_script/newgridns1.py	(revision 6)
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+import bina
+
+def newgridns(xx, yy, zz, vnx, nscan, pos):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=100
+    z1=300
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec
Index: /trunk/src/python_script/newgridns2.py
===================================================================
--- /trunk/src/python_script/newgridns2.py	(revision 6)
+++ /trunk/src/python_script/newgridns2.py	(revision 6)
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+import bina
+
+def newgridns(xx, yy, zz, vnx, nscan, pos):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    z0=0
+    z1=1
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz
Index: /trunk/src/python_script/newgridns_z.py
===================================================================
--- /trunk/src/python_script/newgridns_z.py	(revision 6)
+++ /trunk/src/python_script/newgridns_z.py	(revision 6)
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+
+def newgridns(xx, yy, zz, vnx, nscan, pos, z0, z1):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz
Index: /trunk/src/python_script/newgridns_zm.py
===================================================================
--- /trunk/src/python_script/newgridns_zm.py	(revision 6)
+++ /trunk/src/python_script/newgridns_zm.py	(revision 6)
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+
+def newgridns(xx, yy, zz, m, vnx, nscan, pos, z0, z1):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = m[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+    dxx=vnx
+    ngrid = zeros([nx, ny], float)# no of obs per grid cell
+    nngrid = zeros([nx, ny], float)
+    zgrid = zeros([nx, ny], float)# z-coordinate
+    zzgrid = zeros([nx, ny], float)# z-coordinate grouped
+    zdgrid = zeros([nx, ny], float)# z-coordinate 2
+    zz2grid = zeros([nx, ny], float)# z-coordinate 2 grouped
+
+    for i in range(0, N):
+        zgrid[iix[i], iiy[i]] = zgrid[iix[i],iiy[i]]+zz[i]
+        zdgrid[iix[i], iiy[i]] = zdgrid[iix[i],iiy[i]]+zz[i]*zz[i]
+        ngrid[iix[i], iiy[i]] = ngrid[iix[i],iiy[i]]+ 1 
+	
+    for i in range(0,ny):
+        jj=round(3600/dxx[i])
+        c=reshape(ngrid[:,i],(jj,dxx[i]))
+        b=c.sum(axis=1)
+        d=reshape(zgrid[:,i],(jj,dxx[i]))
+        e=d.sum(axis=1)
+        f=reshape(zdgrid[:,i],(jj,dxx[i]))
+        g=f.sum(axis=1)  
+        for j in range(0, nx):
+            ii=ceil((j+1)/dxx[i])-1
+            nngrid[j,i]=b[ii]
+            zzgrid[j,i]=e[ii]
+            zz2grid[j,i]=g[ii]
+
+    zzpgrid = zeros([nx, ny], float)    
+    zzpgrid = zzgrid/nngrid
+    sigma_grid=sqrt(zz2grid/nngrid-zzpgrid*zzpgrid)
+    zgrid = np.transpose(zgrid)
+    sigma_grid=np.transpose(sigma_grid)
+    zzpgrid = np.transpose(zzpgrid)
+    ngrid = np.transpose(ngrid)
+    nngrid = np.transpose(nngrid)
+    return zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec, zz, mm
Index: /trunk/src/python_script/newvec_x.py
===================================================================
--- /trunk/src/python_script/newvec_x.py	(revision 6)
+++ /trunk/src/python_script/newvec_x.py	(revision 6)
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, mask, orog, z0, z1, y11):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+#    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = mask[inn]
+    alt = orog[inn]
+    lo = x[inn]
+    la = y[inn]
+
+    N = size(iix)# how many datapoints are left now?
+    
+    return zz, alt, mm, lo, la
Index: /trunk/src/python_script/newvec_zml.py
===================================================================
--- /trunk/src/python_script/newvec_zml.py	(revision 6)
+++ /trunk/src/python_script/newvec_zml.py	(revision 6)
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, mask, z0, z1, y11):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+#    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = mask[inn]
+
+    N = size(iix)# how many datapoints are left now?
+    
+    return zz, mm
Index: /trunk/src/python_script/newvec_zmla.py
===================================================================
--- /trunk/src/python_script/newvec_zmla.py	(revision 6)
+++ /trunk/src/python_script/newvec_zmla.py	(revision 6)
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, mask, orog, z0, z1, y11):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+#    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = mask[inn]
+    alt = orog[inn]
+
+    N = size(iix)# how many datapoints are left now?
+    
+    return zz, alt, mm
Index: /trunk/src/python_script/newvec_zmll.py
===================================================================
--- /trunk/src/python_script/newvec_zmll.py	(revision 6)
+++ /trunk/src/python_script/newvec_zmll.py	(revision 6)
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+def newgrid(x, y, z, mask, z0, z1, y11):
+
+
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+#    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    llat=y[inn]
+    llon=x[inn]
+    mm = mask[inn]
+
+    N = size(iix)# how many datapoints are left now?
+    
+    return zz, mm, llat, llon
Index: /trunk/src/python_script/newvecns_zml.py
===================================================================
--- /trunk/src/python_script/newvecns_zml.py	(revision 6)
+++ /trunk/src/python_script/newvecns_zml.py	(revision 6)
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy as np
+from numpy import *
+
+
+def newgridns(xx, yy, zz, m, vnx, nscan, pos, z0, z1, y11):
+
+    x=xx
+    y=yy
+    z=zz
+    dx=0.1
+    dy=1	
+    dparx=0.05
+    dpary=0.5
+    n0=0
+#    y11= -50
+    x0, x1 = -180, 180
+    y0, y1 = -90, 90
+    dx=0.1
+    dy=1.0
+    n=size(x)    
+    xvec = arange(x0,x1,dx)
+    yvec = arange(y0,y11,dy)
+    nx = size(xvec)
+    ny = size(yvec)
+    ix = zeros(n, float)    
+    iy = zeros(n, float)    
+
+    for kk in range(0,n):
+        if x[kk] == -180:
+           ix[kk] = 3600
+        else:
+           ix[kk] = math.ceil((x[kk] - x0)/dx)-1
+
+    for kk in range(0,n):
+        if y[kk] == -90:
+           iy[kk] = 0
+        else:
+           iy[kk] = math.ceil((y[kk] - y0)/dy)-1
+
+    
+    if nscan==1:
+       ipos = ((pos <=5) | (pos >=26))
+    if nscan==2:    
+       ipos = ((pos >=6) & (pos <=10))| ((pos >=21) & (pos<=25))
+    if nscan==3:
+       ipos = ((pos >=11) & (pos<=20))
+    
+    inx = (ix >= 0) & (ix < nx) 
+    iny = (iy >= 0) & (iy < ny)
+    inz = (z >= z0) & (z <= z1) 
+    inn = inx & iny & inz & ipos
+    iix = ix[inn]
+    iiy = iy[inn]
+    zz = z[inn]
+    mm = m[inn]
+    N = size(iix)# how many datapoints are left now?
+    #calculation of the each arc legth
+
+   
+    return zz, mm
Index: /trunk/src/python_script/read_AMSUA.py
===================================================================
--- /trunk/src/python_script/read_AMSUA.py	(revision 6)
+++ /trunk/src/python_script/read_AMSUA.py	(revision 6)
@@ -0,0 +1,443 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+f1='/net/dedale/usr/dedale/surf/lelod/ANTARC/AMSUA_CH'
+f2='_ANTARC_JUNE2010.DAT'
+amsuach=np.array([1,2,3,4,5,6,7,15])
+am_numlines=np.zeros([8],float)
+
+#for i in range(0,8):
+    #f=f1+str(amsuach[i])+f2
+    #fichier=open(f,'r')
+    #am_numlines[i] = 0
+    #for line in fichier: am_numlines[i] += 1
+
+    #fichier.close
+
+am_numlines=np.array([ 9627069.,  9627471.,  9627063.,  6434316.,  9627391.,  9627424.,8019816.,  9627424.])
+
+amch1=np.zeros([20,am_numlines[0]],float)
+amch2=np.zeros([20,am_numlines[1]],float)
+amch3=np.zeros([20,am_numlines[2]],float)
+amch4=np.zeros([20,am_numlines[3]],float)
+amch5=np.zeros([20,am_numlines[4]],float)
+amch6=np.zeros([20,am_numlines[5]],float)
+amch7=np.zeros([20,am_numlines[6]],float)
+amch15=np.zeros([20,am_numlines[7]],float)
+
+
+#ch1
+i=0
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,9627068):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch1[j,iligne] = float(liste[j])
+        
+
+fichier.close
+
+#ch2
+i=1
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch2[j,iligne] = float(liste[j])
+
+fichier.close
+
+#ch3
+i=2
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch3[j,iligne] = float(liste[j])
+
+fichier.close
+
+#ch4
+i=3
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch4[j,iligne] = float(liste[j])
+
+fichier.close
+
+#ch5
+i=4
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch5[j,iligne] = float(liste[j])
+
+fichier.close
+
+#ch6
+i=5
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch6[j,iligne] = float(liste[j])
+
+fichier.close
+
+#ch7
+i=6
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch7[j,iligne] = float(liste[j])
+
+fichier.close
+
+#ch15
+i=7
+f=f1+str(amsuach[i])+f2
+fichier=open(f,'r')
+
+for iligne in range(0,am_numlines[i]-1):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,20):
+        amch15[j,iligne] = float(liste[j])
+
+fichier.close
+
+####################
+áºb ch5
+
+xx=amch2[0,:]
+yy=amch2[1,:]
+zz=amch2[15,:]
+m=amch2[14,:]
+pos=amch2[7,:]
+z0=0
+z1=300
+y11 = -50
+
+tbgrid_ta2, tbpgrid_ta2, tbngrid_ta2, tbnngrid_ta2, tbsigma_grid_ta2, xvec, yvec, tb_ta2, mm_tba2 = newgrid_zml.newgrid(xx, yy, zz, m, vnx1,z0, z1, y11)
+
+
+
+
+
+#############################"
+áºrans ch5
+
+xx=amch5[0,:]
+yy=amch5[1,:]
+zz=amch5[19,:]
+m=amch5[14,:]
+pos=amch5[7,:]
+z0=0
+z1=0.5
+y11 = -50
+nscan = 1
+import newgridns_z
+trgrida51, trpgrida51, ngrida51, nngrida51, sigma_gridtra51, xvec, yvec, tra51= newgridns_z.newgridns(xx, yy, zz, vnx1, nscan, pos, z0, z1)
+
+nscan = 2
+trgrida52, trpgrida52, ngrida52, nngrida52, sigma_gridtra52, xvec, yvec, tra52= newgridns_z.newgridns(xx, yy, zz, vnx1, nscan, pos, z0, z1)
+
+nscan = 3
+trgrida53, trpgrida53, ngrida53, nngrida53, sigma_gridtra53, xvec, yvec, tra53= newgridns_z.newgridns(xx, yy, zz, vnx1, nscan, pos, z0, z1)
+
+m=amch5[14,:]
+y11 = -50
+
+import newgrid_zml
+trgrid_ta5, trpgrid_ta5, trngrid_ta5, trnngrid_ta5, trsigma_grid_ta5, xvec, yvec, tr_ta5, mm_tra5 = newgrid_zml.newgrid(xx, yy, zz, m, vnx1,z0, z1, y11)
+
+
+z=trpgrida51
+outfile='transmission_amsua_ch5_angles_extÃ©rieurs.png'
+txt='transmission amsua ch5 angles extÃ©rieurs'
+cax1=0
+cax2=0.5
+cax3=0.01
+my_cmap=cm.s3pcpn_l_r
+coef=0.6
+
+import drawmapf
+drawmapf.drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+z=trpgrida52
+outfile='transmission_amsua_ch5_angles_intermÃ©diaires.png'
+txt='transmission amsua ch5 angles intermÃ©diaires'
+drawmapf.drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+z=trpgrida53
+outfile='transmission_amsua_ch5_angles_faibles.png'
+txt='transmission amsua ch5 angles faibles'
+drawmapf.drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+z=trpgrid_ta5
+outfile='transmission_amsua_ch5.png'
+txt='transmission amsua ch5'
+drawmapf.drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+cax1=-0.3
+cax2=0
+cax3=0.001
+z=trpgrida51-trpgrida53
+outfile='diff_transmission_amsua_ch5.png'
+txt='diff transmission amsua ch5 angles exterieurs moins anglesfaibles'
+drawmapf.drawmap(z, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+#tup
+
+#ch1
+
+x=amch1[0,:]
+y=amch1[1,:]
+z=amch1[18,:]
+m=amch1[14,:]
+z0=0
+z1=
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta1, tuppgrid_ta1, tupngrid_ta1, tupnngrid_ta1, tupsigma_grid_ta1, xvec, yvec, tup_ta1, mm_tupa1 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch2
+
+x=amch2[0,:]
+y=amch2[1,:]
+z=amch2[18,:]
+m=amch2[14,:]
+z0=0
+z1=200
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta2, tuppgrid_ta2, tupngrid_ta2, tupnngrid_ta2, tupsigma_grid_ta2, xvec, yvec, tup_ta2, mm_tupa2 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch3
+
+x=amch3[0,:]
+y=amch3[1,:]
+z=amch3[18,:]
+m=amch3[14,:]
+z0=0
+z1=200
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta3, tuppgrid_ta3, tupngrid_ta3, tupnngrid_ta3, tupsigma_grid_ta3, xvec, yvec, tup_ta3, mm_tupa3 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch4
+
+x=amch4[0,:]
+y=amch4[1,:]
+z=amch4[18,:]
+m=amch4[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta4, tuppgrid_ta4, tupngrid_ta4, tupnngrid_ta4, tupsigma_grid_ta4, xvec, yvec, tup_ta4, mm_tupa4 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+
+#ch5
+
+x=amch5[0,:]
+y=amch5[1,:]
+z=amch5[18,:]
+m=amch5[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta5, tuppgrid_ta5, tupngrid_ta5, tupnngrid_ta5, tupsigma_grid_ta5, xvec, yvec, tup_ta5, mm_tupa5 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch6
+
+x=amch6[0,:]
+y=amch6[1,:]
+z=amch6[18,:]
+m=amch6[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta6, tuppgrid_ta6, tupngrid_ta6, tupnngrid_ta6, tupsigma_grid_ta6, xvec, yvec, tup_ta6, mm_tupa6 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch7
+
+x=amch7[0,:]
+y=amch7[1,:]
+z=amch7[18,:]
+m=amch7[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta7, tuppgrid_ta7, tupngrid_ta7, tupnngrid_ta7, tupsigma_grid_ta7, xvec, yvec, tup_ta7, mm_tupa7 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch15
+
+x=amch15[0,:]
+y=amch15[1,:]
+z=amch15[18,:]
+m=amch15[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta15, tuppgrid_ta15, tupngrid_ta15, tupnngrid_ta15, tupsigma_grid_ta15, xvec, yvec, tup_ta15, mm_tupa15 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+###########################################
+#TS
+
+max_amsuaTS=np.array([amch1[10,:].max(),amch2[10,:].max(),amch3[10,:].max(),
+amch4[10,:].max(),amch5[10,:].max(),amch6[10,:].max(),amch7[10,:].max(),amch15[10,:].max()])
+
+
+#ch1
+
+x=amch1[0,:]
+y=amch1[1,:]
+z=amch1[10,:]
+m=amch1[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta1, tspgrid_ta1, tsngrid_ta1, tsnngrid_ta1, tssigma_grid_ta1, xvec, yvec, ts_ta1, mm_tsa1 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch2
+
+x=amch2[0,:]
+y=amch2[1,:]
+z=amch2[10,:]
+m=amch2[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta2, tspgrid_ta2, tsngrid_ta2, tsnngrid_ta2, tssigma_grid_ta2, xvec, yvec, ts_ta2, mm_tsa2 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch3
+
+x=amch3[0,:]
+y=amch3[1,:]
+z=amch3[10,:]
+m=amch3[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta3, tspgrid_ta3, tsngrid_ta3, tsnngrid_ta3, tssigma_grid_ta3, xvec, yvec, ts_ta3, mm_tsa3 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch4
+
+x=amch4[0,:]
+y=amch4[1,:]
+z=amch4[10,:]
+m=amch4[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta4, tspgrid_ta4, tsngrid_ta4, tsnngrid_ta4, tssigma_grid_ta4, xvec, yvec, ts_ta4, mm_tsa4 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+
+#ch5
+
+x=amch5[0,:]
+y=amch5[1,:]
+z=amch5[10,:]
+m=amch5[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta5, tspgrid_ta5, tsngrid_ta5, tsnngrid_ta5, tssigma_grid_ta5, xvec, yvec, ts_ta5, mm_tsa5 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch6
+
+x=amch6[0,:]
+y=amch6[1,:]
+z=amch6[10,:]
+m=amch6[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta6, tspgrid_ta6, tsngrid_ta6, tsnngrid_ta6, tssigma_grid_ta6, xvec, yvec, ts_ta6, mm_tsa6 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch7
+
+x=amch7[0,:]
+y=amch7[1,:]
+z=amch7[10,:]
+m=amch7[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta7, tspgrid_ta7, tsngrid_ta7, tsnngrid_ta7, tssigma_grid_ta7, xvec, yvec, ts_ta7, mm_tsa7 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch15
+
+x=amch15[0,:]
+y=amch15[1,:]
+z=amch15[10,:]
+m=amch15[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta15, tspgrid_ta15, tsngrid_ta15, tsnngrid_ta15, tssigma_grid_ta15, xvec, yvec, ts_ta15, mm_tsa15 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+
+
Index: /trunk/src/python_script/read_AMSUB.py
===================================================================
--- /trunk/src/python_script/read_AMSUB.py	(revision 6)
+++ /trunk/src/python_script/read_AMSUB.py	(revision 6)
@@ -0,0 +1,203 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+f11='/net/dedale/usr/dedale/surf/lelod/ANTARC/AMSUB_CH'
+f2='_ANTARC_JUNE2010.DAT'
+amsubch=np.array([1,2,3,4,5])
+amsub_numlines=np.zeros([5],float)
+
+#for i in range(0,5):
+    #f=f1+str(amsuach[i])+f2
+    #fichier=open(f,'r')
+    #amsub_numlines[i] = 0
+    #for line in fichier: amsub_numlines[i] += 1
+
+    #fichier.close
+
+amsub_numlines=np.array([ 24061450.,  24061453.,  19295174.,  19295173.,  19295172.])
+
+ambch1=np.zeros([20,amsub_numlines[0]],float)
+ambch2=np.zeros([20,amsub_numlines[1]],float)
+ambch3=np.zeros([20,amsub_numlines[2]],float)
+ambch4=np.zeros([20,amsub_numlines[3]],float)
+ambch5=np.zeros([20,amsub_numlines[4]],float)
+
+
+#ch1
+i=0
+f=f11+str(amsubch[i])+f2
+fichier=open(f,'r')
+a=amsub_numlines[i]-1
+
+for iligne in range(0,a):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,19):
+        ambch1[j,iligne] = float(liste[j])
+        
+
+fichier.close
+
+
+#ch2
+i=1
+f=f11+str(amsubch[i])+f2
+fichier=open(f,'r')
+a=amsub_numlines[i]-1
+
+for iligne in range(0,a):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,19):
+        ambch2[j,iligne] = float(liste[j])
+        
+
+fichier.close
+
+#ch3
+i=2
+f=f11+str(amsubch[i])+f2
+fichier=open(f,'r')
+a=amsub_numlines[i]-1
+
+for iligne in range(0,a):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,19):
+        ambch3[j,iligne] = float(liste[j])
+        
+
+fichier.close
+
+#ch4
+i=3
+f=f11+str(amsubch[i])+f2
+fichier=open(f,'r')
+a=amsub_numlines[i]-1
+
+for iligne in range(0,a):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,19):
+        ambch4[j,iligne] = float(liste[j])
+        
+
+fichier.close
+
+#ch5
+i=4
+f=f11+str(amsubch[i])+f2
+fichier=open(f,'r')
+a=amsub_numlines[i]-1
+
+for iligne in range(0,a):
+    line=fichier.readline()
+    liste = line.split()
+    for j in range(0,19):
+        ambch5[j,iligne] = float(liste[j])
+        
+
+fichier.close
+
+#####################################"
+#altitude
+x=ambch1[0,:]
+y=ambch1[1,:]
+z=ambch1[14,:]
+m=ambch1[14,:]
+z0=0
+z1=1
+y11 = -50
+
+import newgrid_zml
+mgrid_tab1, mppgrid_tab1, mngrid_tab1, mnngrid_tab1, msigma_grid_tab1, xvec, yvec, m_tab1, mm_tupab1 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+coef=0.6
+cax1=0
+cax2=1
+cax3=0.01
+my_cmap=cm.s3pcpn_l
+
+mask=mppgrid_tab1.round()
+
+zz=mask
+txt='mask amsub'
+outfile='mask_amsub.png'
+drawmapf.drawmap(zz, xvec, yvec, outfile, txt, cax1,cax2,cax3, my_cmap, coef)
+
+####################
+#tup
+tupamsub_max=np.array([ambch1[18,:].max(),ambch2[18,:].max(),ambch3[18,:].max(),ambch4[18,:].max(),ambch5[18,:].max()])
+
+#ch1
+
+x=ambch1[0,:]
+y=ambch1[1,:]
+z=ambch1[18,:]
+m=ambch1[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_tab1, tuppgrid_tab1, tupngrid_tab1, tupnngrid_tab1, tupsigma_grid_tab1, xvec, yvec, tup_tab1, mm_tupab1 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch2
+
+x=ambch2[0,:]
+y=ambch2[1,:]
+z=ambch2[18,:]
+m=ambch2[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_tab2, tuppgrid_tab2, tupngrid_tab2, tupnngrid_tab2, tupsigma_grid_tab2, xvec, yvec, tup_tab2, mm_tupab2 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch3
+
+x=ambch3[0,:]
+y=ambch3[1,:]
+z=ambch3[18,:]
+m=ambch3[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_tab3, tuppgrid_tab3, tupngrid_tab3, tupnngrid_tab3, tupsigma_grid_tab3, xvec, yvec, tup_tab3, mm_tupab3 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch4
+
+x=ambch4[0,:]
+y=ambch4[1,:]
+z=ambch4[18,:]
+m=ambch4[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_tab4, tuppgrid_tab4, tupngrid_tab4, tupnngrid_tab4, tupsigma_grid_tab4, xvec, yvec, tup_tab4, mm_tupab4 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+#ch5
+
+x=ambch5[0,:]
+y=ambch5[1,:]
+z=ambch5[18,:]
+m=ambch5[14,:]
+z0=0
+z1=300
+y11 = -50
+
+import newgrid_zml
+tupgrid_tab5, tuppgrid_tab5, tupngrid_tab5, tupnngrid_tab5, tupsigma_grid_tab5, xvec, yvec, tup_tab5, mm_tupab5 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
Index: /trunk/src/python_script/read_SSMIS_CH15_june.py
===================================================================
--- /trunk/src/python_script/read_SSMIS_CH15_june.py	(revision 6)
+++ /trunk/src/python_script/read_SSMIS_CH15_june.py	(revision 6)
@@ -0,0 +1,335 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+#import ffgrid2_gc
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH15_ANTARC_JUNE2010.DAT','r')
+numlines = 0
+for line in fichier: numlines += 1
+
+fichier.close
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH15_ANTARC_JUNE2010.DAT','r')
+nbtotal=numlines
+
+iligne=0
+lat=np.zeros([nbtotal],float)
+lon=np.zeros([nbtotal],float)
+jjr=np.zeros([nbtotal],float)
+zen=np.zeros([nbtotal],float)
+fov=np.zeros([nbtotal],float)
+ts=np.zeros([nbtotal],float)
+emis=np.zeros([nbtotal],float)
+tb=np.zeros([nbtotal],float)
+tup=np.zeros([nbtotal],float)
+tdn=np.zeros([nbtotal],float)
+trans=np.zeros([nbtotal],float)
+orog=np.zeros([nbtotal],float)
+mask=np.zeros([nbtotal],float)
+
+while (iligne <= nbtotal-1) :
+         line=fichier.readline()
+         # exemple : line = "0.22 2.3 5.0 6"
+         liste = line.split()
+         # exemple : listeCoord ['0.22', '2.3', '5.0', '6'] (liste de chaine de caract?es)
+         lat[iligne] = float(liste[1])
+         lon[iligne] = float(liste[0])
+         jjr[iligne] = float(liste[4])
+         ts[iligne] = float(liste[8])
+         orog[iligne] = float(liste[11])
+         mask[iligne] = float(liste[12])
+         tb[iligne] = float(liste[13])
+         emis[iligne] = float(liste[14])
+         tdn[iligne] = float(liste[15])
+         tup[iligne] = float(liste[16])
+         trans[iligne] = float(liste[17])
+         iligne=iligne+1
+         
+
+fichier.close
+
+#correr vnx
+###################
+#matrices tb vec mask
+x=lon
+y=lat
+z=tb
+m=mask
+z0=100
+z1=300
+y11 = -50
+
+import newgrid_zml
+tbgrid_t, tbpgrid_t, tbngrid_t, tbnngrid_t, tbsigma_grid_t, xvec, yvec, tb_t, mm_t = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+################################
+
+matrices tup vec mask
+x=lon
+y=lat
+z=tup
+m=mask
+z0=0
+z1=70
+y11 = -50
+
+import newgrid_zml
+tupgrid_t, tuppgrid_t, tupngrid_t, tupnngrid_t, tupsigma_grid_t, xvec, yvec, tup_t, mm_t = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+#############################################################
+x=lon
+y=lat
+z=tb
+m=mask
+z0=100
+z1=300
+y11 = -60
+
+import newgrid_zml
+tbgrid_t60, tbpgrid_t60, tbngrid_t60, tbnngrid_t60, tbsigma_grid_t60, xvec0, yvec60, tb_t60, mm_t60 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+
+
+################################################
+#matrice mask
+
+z0=0
+z1=1
+z=mask
+m=mask
+y11 = -50
+
+import newgrid_zml
+mzgrid_t50, mzzpgrid_t50, mngrid_t50, mnngrid_t, msigma_grid_t, xvec, yvec,mm_t50, mzz_t50 = newgrid_zml.newgrid(x, y, z, m, vnx, z0, z1, y11)
+
+######################################"
+#matrix altitude
+
+x=lon
+y=lat
+z=orog
+m=mask
+z0=0
+z1=500
+y11 = -60
+
+import newgrid_zml
+altgrid_t60, altpgrid_t60, altngrid_t60, altnngrid_t60, altsigma_grid_t60, xvec0, yvec60, alt_t60, amm_t60 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+
+
+
+
+
+
+
+
+x=lon
+y=lat
+z=tb
+zgrid, zzgrid, ngrid, nngrid, sigma_grid, xvec, yvec =ffgrid2_gc.ffgrid(xx,yy,zz)
+
+
+#antes
+
+
+dx=0.1
+dy=1.0
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+
+monthly_outz=np.zeros([40,3600],float)
+monthly_lon=np.zeros([3600])
+monthly_lat=np.zeros([40])
+xx = lon
+yy = lat
+zz = tb
+zz0 = 100
+zz1= 300
+outz, outx, outy, Nil = ffgrid3.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,zz0, zz1)
+x=outx
+y=outy
+z = np.transpose(outz)
+z[Nil]=600
+z=np.transpose(z)
+
+del outz, outx, outy, zz, xx, yy
+
+
+# ici je fais des cartes moyennes en melangeant les polars
+
+xx = lon_ssmis
+yy = lat_ssmis
+zz = 0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+# ici je fais des cartes moyennes des differences des polars
+xx = lon_ssmis
+yy = lat_ssmis
+zz = emis_ssmis[1,:]-emis_ssmis[2,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[4,:]-emis_ssmis[5,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[6,:]-emis_ssmis[7,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+draw_map.draw(monthly_outz_ssmis_polar[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis_diff[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_50V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[3,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_22V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[4,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[5,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[6,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[7,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+
+bins=arange(0.3,1,0.001)
+bb=(lat_ssmis >= 0) 
+ 
+plt.hist(emis_ssmis[0,nonzero(bb)[0]], bins=bins,histtype='step', label='e50V',normed='True',color='#4BB5C1')
+plt.hist(emis_ssmis[1,nonzero(bb)[0]], bins=bins,histtype='step', label='e19V',normed='True',color='black')
+plt.hist(emis_ssmis[3,nonzero(bb)[0]], bins=bins,histtype='step', label='e22V',normed='True',color='#B9121B')
+plt.hist(emis_ssmis[4,nonzero(bb)[0]], bins=bins,histtype='step', label='e37V',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[6,nonzero(bb)[0]], bins=bins,histtype='step', label='e91V',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_V_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(emis_ssmis[2,nonzero(bb)[0]], bins=bins,histtype='step', label='e19H',normed='True',color='black')
+plt.hist(emis_ssmis[5,nonzero(bb)[0]], bins=bins,histtype='step', label='e37H',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[7,nonzero(bb)[0]], bins=bins,histtype='step', label='e91H',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_H_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(0.5*(emis_ssmis[1,nonzero(bb)[0]]+emis_ssmis[2,nonzero(bb)[0]]), bins=bins,histtype='step', label='e19',normed='True',color='black')
+plt.hist(0.5*(emis_ssmis[4,nonzero(bb)[0]]+emis_ssmis[5,nonzero(bb)[0]]), bins=bins,histtype='step', label='e37',normed='True',color='#9748D4')
+plt.hist(0.5*(emis_ssmis[6,nonzero(bb)[0]]+emis_ssmis[7,nonzero(bb)[0]]), bins=bins,histtype='step', label='e91',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_mpolar_NH_'+le_mois+'.png')
+close()
+
+
+# stats quotidienne autour de la station ThulÃ©
+lat_stations=[76.32, 74.43, 78.13, 58.45, 68.6, 64.58]
+lon_stations=[-68.3, -94.59, 15.35, -78.08, 33.1, 40.5]
+nom_stations=['Thule', 'Resolute', 'Longyearbyen', 'Iqaluit', 'Murmansk', 'Arkhangelsk']
+
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat_jour=np.zeros([8,7,31],float)
+    clear bb
+    for canal in range(0,8):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat_jour[canal,0,jjr]=mean(emis_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,1,jjr]=std(emis_ssmis[canal,nonzero(bb)[0]])            stat_jour[canal,2,jjr]=size(nonzero(bb))
+            stat_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+mpolar_ssmis=np.zeros([3,nbtotal],float)
+mpolar_ssmis[0,:]=0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+mpolar_ssmis[1,:]=0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+mpolar_ssmis[2,:]=0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+
+mpolarTB_ssmis=np.zeros([3,nbtotal],float)
+mpolarTB_ssmis[0,:]=0.5*(tb_ssmis[1,:]+tb_ssmis[2,:])
+mpolarTB_ssmis[1,:]=0.5*(tb_ssmis[4,:]+tb_ssmis[5,:])
+mpolarTN_ssmis[2,:]=0.5*(tb_ssmis[6,:]+tb_ssmis[7,:])
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat2_jour=np.zeros([3,7,31],float)
+    clear bb
+    for canal in range(0,3):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat2_jour[canal,0,jjr]=mean(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,1,jjr]=std(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,2,jjr]=size(nonzero(bb))
+            stat2_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])            stat2_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS-MPOLAR_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+# ecriture sous format nc
+from netCDF4 import Dataset
+rootgrp = Dataset('..\EMIS\EMIS_SSMIS_'+le_mois+'.nc', 'w', format='NETCDF4')
+ 
+rootgrp.createDimension('longitude', len(monthly_lon_ssmis))
+rootgrp.createDimension('latitude', len(monthly_lat_ssmis))
+rootgrp.createDimension('channels', 8)
+rootgrp.createDimension('bchannels', 3)
+
+# createVariable (nom de la variable, type, dimensions)
+# Si 1 dimension, ne pas oublier la virgule
+nclon = rootgrp.createVariable('longitude', 'f8', ('longitude',))
+nclat = rootgrp.createVariable('latitude', 'f8', ('latitude',))
+ncchan=rootgrp.createVariable('channels', 'f', ('channels',))
+ncchan2=rootgrp.createVariable('bchannels', 'f', ('bchannels',))
+nctemp = rootgrp.createVariable('emissivity', 'f8', ('channels','latitude', 'longitude'))
+nctemp2 = rootgrp.createVariable('emissivity melange polar', 'f8', ('bchannels','latitude', 'longitude'))
+
+nclon[:] = monthly_lon_ssmis
+nclat[:] = monthly_lat_ssmis
+ncchan[:]=[50,19.1,19.2,22,37.1,37.2,91.1,91.2]
+ncchan2[:]=[19,37,91]
+nctemp[:] = monthly_outz_ssmis
+nctemp2[:] = monthly_outz_ssmis_polar
+
+rootgrp.close()
+
+
Index: /trunk/src/python_script/read_SSMIS_CH16_june.py
===================================================================
--- /trunk/src/python_script/read_SSMIS_CH16_june.py	(revision 6)
+++ /trunk/src/python_script/read_SSMIS_CH16_june.py	(revision 6)
@@ -0,0 +1,335 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+#import ffgrid2_gc
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH16_ANTARC_JUNE2010.DAT','r')
+numlines = 0
+for line in fichier: numlines += 1
+
+fichier.close
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH16_ANTARC_JUNE2010.DAT','r')
+nbtotal=numlines
+
+iligne=0
+lat16=np.zeros([nbtotal],float)
+lon16=np.zeros([nbtotal],float)
+jjr16=np.zeros([nbtotal],float)
+zen16=np.zeros([nbtotal],float)
+fov16=np.zeros([nbtotal],float)
+ts16=np.zeros([nbtotal],float)
+emis16=np.zeros([nbtotal],float)
+tb16=np.zeros([nbtotal],float)
+tup16=np.zeros([nbtotal],float)
+tdn16=np.zeros([nbtotal],float)
+trans16=np.zeros([nbtotal],float)
+orog16=np.zeros([nbtotal],float)
+mask16=np.zeros([nbtotal],float)
+
+while (iligne <= nbtotal-1) :
+         line=fichier.readline()
+         # exemple : line = "0.22 2.3 5.0 6"
+         liste = line.split()
+         # exemple : listeCoord ['0.22', '2.3', '5.0', '6'] (liste de chaine de caract?es)
+         lat16[iligne] = float(liste[1])
+         lon16[iligne] = float(liste[0])
+         jjr16[iligne] = float(liste[4])
+         ts16[iligne] = float(liste[8])
+         orog16[iligne] = float(liste[11])
+         mask16[iligne] = float(liste[12])
+         tb16[iligne] = float(liste[13])
+         emis16[iligne] = float(liste[14])
+         tdn16[iligne] = float(liste[15])
+         tup16[iligne] = float(liste[16])
+         trans16[iligne] = float(liste[17])
+         iligne=iligne+1
+         
+
+fichier.close
+
+#correr vnx
+###################
+#matrices tb vec mask
+x=lon16
+y=lat16
+z=tb16
+m=mask16
+z0=100
+z1=300
+y11 = -50
+
+import newgrid_zml
+tbgrid_t16, tbpgrid_t16, tbngrid_t16, tbnngrid_t16, tbsigma_grid_t16, xvec, yvec, tb_t16, mm_t16 = newgrid_zml.newgrid(x, y, z, m, vnx1,z0, z1, y11)
+
+
+##########################"""
+###################
+#matrices tb vec mask
+x=lon16
+y=lat16
+z=tup16
+m=mask
+z0=0
+z1=70
+y11 = -60
+
+import newgrid_zml
+tupgrid_t1660, tuppgrid_t1660, tupngrid_t1660, tupnngrid_t1660, tupsigma_grid_t1660, xvec60, yvec60, tup_t1660, mm_t1660 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+#############################################################
+x=lon16
+y=lat16
+z=tup16
+m=mask16
+z0=0
+z1=70
+y11 = -50
+
+import newgrid_zml
+tupgrid_t16, tuppgrid_t16, tupngrid_t16, tupnngrid_t16, tupsigma_grid_t16, xvec, yvec, tup_t16, mm_t16 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+
+
+################################################
+#matrice mask
+
+z0=0
+z1=1
+z=mask
+m=mask
+y11 = -60
+
+import newgrid_zml
+mzgrid_t50, mzzpgrid_t60, mngrid_t60, mnngrid_t, msigma_grid_t, xvec, yvec,mm_t60, mzz_t60 = newgrid_zml.newgrid(x, y, z, m, vnx, z0, z1, y11)
+
+######################################"
+#matrix altitude
+
+x=lon
+y=lat
+z=orog
+m=mask
+z0=0
+z1=500
+y11 = -60
+
+import newgrid_zml
+altgrid_t60, altpgrid_t60, altngrid_t60, altnngrid_t60, altsigma_grid_t60, xvec0, yvec60, alt_t60, amm_t60 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+
+
+
+
+
+
+
+
+x=lon
+y=lat
+z=tb
+zgrid, zzgrid, ngrid, nngrid, sigma_grid, xvec, yvec =ffgrid2_gc.ffgrid(xx,yy,zz)
+
+
+#antes
+
+
+dx=0.1
+dy=1.0
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+
+monthly_outz=np.zeros([40,3600],float)
+monthly_lon=np.zeros([3600])
+monthly_lat=np.zeros([40])
+xx = lon
+yy = lat
+zz = tb
+zz0 = 100
+zz1= 300
+outz, outx, outy, Nil = ffgrid3.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,zz0, zz1)
+x=outx
+y=outy
+z = np.transpose(outz)
+z[Nil]=600
+z=np.transpose(z)
+
+del outz, outx, outy, zz, xx, yy
+
+
+# ici je fais des cartes moyennes en melangeant les polars
+
+xx = lon_ssmis
+yy = lat_ssmis
+zz = 0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+# ici je fais des cartes moyennes des differences des polars
+xx = lon_ssmis
+yy = lat_ssmis
+zz = emis_ssmis[1,:]-emis_ssmis[2,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[4,:]-emis_ssmis[5,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[6,:]-emis_ssmis[7,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+draw_map.draw(monthly_outz_ssmis_polar[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis_diff[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_50V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[3,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_22V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[4,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[5,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[6,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[7,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+
+bins=arange(0.3,1,0.001)
+bb=(lat_ssmis >= 0) 
+ 
+plt.hist(emis_ssmis[0,nonzero(bb)[0]], bins=bins,histtype='step', label='e50V',normed='True',color='#4BB5C1')
+plt.hist(emis_ssmis[1,nonzero(bb)[0]], bins=bins,histtype='step', label='e19V',normed='True',color='black')
+plt.hist(emis_ssmis[3,nonzero(bb)[0]], bins=bins,histtype='step', label='e22V',normed='True',color='#B9121B')
+plt.hist(emis_ssmis[4,nonzero(bb)[0]], bins=bins,histtype='step', label='e37V',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[6,nonzero(bb)[0]], bins=bins,histtype='step', label='e91V',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_V_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(emis_ssmis[2,nonzero(bb)[0]], bins=bins,histtype='step', label='e19H',normed='True',color='black')
+plt.hist(emis_ssmis[5,nonzero(bb)[0]], bins=bins,histtype='step', label='e37H',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[7,nonzero(bb)[0]], bins=bins,histtype='step', label='e91H',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_H_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(0.5*(emis_ssmis[1,nonzero(bb)[0]]+emis_ssmis[2,nonzero(bb)[0]]), bins=bins,histtype='step', label='e19',normed='True',color='black')
+plt.hist(0.5*(emis_ssmis[4,nonzero(bb)[0]]+emis_ssmis[5,nonzero(bb)[0]]), bins=bins,histtype='step', label='e37',normed='True',color='#9748D4')
+plt.hist(0.5*(emis_ssmis[6,nonzero(bb)[0]]+emis_ssmis[7,nonzero(bb)[0]]), bins=bins,histtype='step', label='e91',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_mpolar_NH_'+le_mois+'.png')
+close()
+
+
+# stats quotidienne autour de la station ThulÃ©
+lat_stations=[76.32, 74.43, 78.13, 58.45, 68.6, 64.58]
+lon_stations=[-68.3, -94.59, 15.35, -78.08, 33.1, 40.5]
+nom_stations=['Thule', 'Resolute', 'Longyearbyen', 'Iqaluit', 'Murmansk', 'Arkhangelsk']
+
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat_jour=np.zeros([8,7,31],float)
+    clear bb
+    for canal in range(0,8):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat_jour[canal,0,jjr]=mean(emis_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,1,jjr]=std(emis_ssmis[canal,nonzero(bb)[0]])            stat_jour[canal,2,jjr]=size(nonzero(bb))
+            stat_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+mpolar_ssmis=np.zeros([3,nbtotal],float)
+mpolar_ssmis[0,:]=0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+mpolar_ssmis[1,:]=0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+mpolar_ssmis[2,:]=0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+
+mpolarTB_ssmis=np.zeros([3,nbtotal],float)
+mpolarTB_ssmis[0,:]=0.5*(tb_ssmis[1,:]+tb_ssmis[2,:])
+mpolarTB_ssmis[1,:]=0.5*(tb_ssmis[4,:]+tb_ssmis[5,:])
+mpolarTN_ssmis[2,:]=0.5*(tb_ssmis[6,:]+tb_ssmis[7,:])
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat2_jour=np.zeros([3,7,31],float)
+    clear bb
+    for canal in range(0,3):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat2_jour[canal,0,jjr]=mean(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,1,jjr]=std(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,2,jjr]=size(nonzero(bb))
+            stat2_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])            stat2_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS-MPOLAR_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+# ecriture sous format nc
+from netCDF4 import Dataset
+rootgrp = Dataset('..\EMIS\EMIS_SSMIS_'+le_mois+'.nc', 'w', format='NETCDF4')
+ 
+rootgrp.createDimension('longitude', len(monthly_lon_ssmis))
+rootgrp.createDimension('latitude', len(monthly_lat_ssmis))
+rootgrp.createDimension('channels', 8)
+rootgrp.createDimension('bchannels', 3)
+
+# createVariable (nom de la variable, type, dimensions)
+# Si 1 dimension, ne pas oublier la virgule
+nclon = rootgrp.createVariable('longitude', 'f8', ('longitude',))
+nclat = rootgrp.createVariable('latitude', 'f8', ('latitude',))
+ncchan=rootgrp.createVariable('channels', 'f', ('channels',))
+ncchan2=rootgrp.createVariable('bchannels', 'f', ('bchannels',))
+nctemp = rootgrp.createVariable('emissivity', 'f8', ('channels','latitude', 'longitude'))
+nctemp2 = rootgrp.createVariable('emissivity melange polar', 'f8', ('bchannels','latitude', 'longitude'))
+
+nclon[:] = monthly_lon_ssmis
+nclat[:] = monthly_lat_ssmis
+ncchan[:]=[50,19.1,19.2,22,37.1,37.2,91.1,91.2]
+ncchan2[:]=[19,37,91]
+nctemp[:] = monthly_outz_ssmis
+nctemp2[:] = monthly_outz_ssmis_polar
+
+rootgrp.close()
+
+
Index: /trunk/src/python_script/read_SSMIS_CH2_ANTARC_JUNE2010.DAT_gc.py
===================================================================
--- /trunk/src/python_script/read_SSMIS_CH2_ANTARC_JUNE2010.DAT_gc.py	(revision 6)
+++ /trunk/src/python_script/read_SSMIS_CH2_ANTARC_JUNE2010.DAT_gc.py	(revision 6)
@@ -0,0 +1,254 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+#import ffgrid2_gc
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH2_ANTARC_JUNE2010.DAT','r')
+numlines = 0
+for line in fichier: numlines += 1
+
+fichier.close
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH2_ANTARC_JUNE2010.DAT','r')
+nbtotal=numlines
+
+iligne=0
+lat=np.zeros([nbtotal],float)
+lon=np.zeros([nbtotal],float)
+jjr=np.zeros([nbtotal],float)
+zen=np.zeros([nbtotal],float)
+fov=np.zeros([nbtotal],float)
+ts=np.zeros([nbtotal],float)
+emis=np.zeros([nbtotal],float)
+tb=np.zeros([nbtotal],float)
+tup=np.zeros([nbtotal],float)
+tdn=np.zeros([nbtotal],float)
+trans=np.zeros([nbtotal],float)
+orog=np.zeros([nbtotal],float)
+
+while (iligne <= nbtotal-1) :
+         line=fichier.readline()
+         # exemple : line = "0.22 2.3 5.0 6"
+         liste = line.split()
+         # exemple : listeCoord ['0.22', '2.3', '5.0', '6'] (liste de chaine de caract?es)
+         lat[iligne] = float(liste[1])
+         lon[iligne] = float(liste[0])
+         jjr[iligne] = float(liste[4])
+         ts[iligne] = float(liste[8])
+         tb[iligne] = float(liste[13])
+         emis[iligne] = float(liste[14])
+         orog[iligne] = float(liste[11])
+         iligne=iligne+1
+         
+
+fichier.close
+
+x=lon
+y=lat
+z=tb
+zgrid, zzgrid, ngrid, nngrid, sigma_grid, xvec, yvec =ffgrid2_gc.ffgrid(xx,yy,zz)
+
+
+#antes
+
+
+dx=0.1
+dy=1.0
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+
+monthly_outz=np.zeros([40,3600],float)
+monthly_lon=np.zeros([3600])
+monthly_lat=np.zeros([40])
+xx = lon
+yy = lat
+zz = tb
+zz0 = 100
+zz1= 300
+outz, outx, outy, Nil = ffgrid3.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,zz0, zz1)
+x=outx
+y=outy
+z = np.transpose(outz)
+z[Nil]=600
+z=np.transpose(z)
+
+del outz, outx, outy, zz, xx, yy
+
+
+# ici je fais des cartes moyennes en melangeant les polars
+
+xx = lon_ssmis
+yy = lat_ssmis
+zz = 0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+# ici je fais des cartes moyennes des differences des polars
+xx = lon_ssmis
+yy = lat_ssmis
+zz = emis_ssmis[1,:]-emis_ssmis[2,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[4,:]-emis_ssmis[5,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[6,:]-emis_ssmis[7,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+draw_map.draw(monthly_outz_ssmis_polar[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis_diff[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_50V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[3,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_22V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[4,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[5,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[6,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[7,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+
+bins=arange(0.3,1,0.001)
+bb=(lat_ssmis >= 0) 
+ 
+plt.hist(emis_ssmis[0,nonzero(bb)[0]], bins=bins,histtype='step', label='e50V',normed='True',color='#4BB5C1')
+plt.hist(emis_ssmis[1,nonzero(bb)[0]], bins=bins,histtype='step', label='e19V',normed='True',color='black')
+plt.hist(emis_ssmis[3,nonzero(bb)[0]], bins=bins,histtype='step', label='e22V',normed='True',color='#B9121B')
+plt.hist(emis_ssmis[4,nonzero(bb)[0]], bins=bins,histtype='step', label='e37V',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[6,nonzero(bb)[0]], bins=bins,histtype='step', label='e91V',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_V_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(emis_ssmis[2,nonzero(bb)[0]], bins=bins,histtype='step', label='e19H',normed='True',color='black')
+plt.hist(emis_ssmis[5,nonzero(bb)[0]], bins=bins,histtype='step', label='e37H',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[7,nonzero(bb)[0]], bins=bins,histtype='step', label='e91H',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_H_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(0.5*(emis_ssmis[1,nonzero(bb)[0]]+emis_ssmis[2,nonzero(bb)[0]]), bins=bins,histtype='step', label='e19',normed='True',color='black')
+plt.hist(0.5*(emis_ssmis[4,nonzero(bb)[0]]+emis_ssmis[5,nonzero(bb)[0]]), bins=bins,histtype='step', label='e37',normed='True',color='#9748D4')
+plt.hist(0.5*(emis_ssmis[6,nonzero(bb)[0]]+emis_ssmis[7,nonzero(bb)[0]]), bins=bins,histtype='step', label='e91',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_mpolar_NH_'+le_mois+'.png')
+close()
+
+
+# stats quotidienne autour de la station ThulÃ©
+lat_stations=[76.32, 74.43, 78.13, 58.45, 68.6, 64.58]
+lon_stations=[-68.3, -94.59, 15.35, -78.08, 33.1, 40.5]
+nom_stations=['Thule', 'Resolute', 'Longyearbyen', 'Iqaluit', 'Murmansk', 'Arkhangelsk']
+
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat_jour=np.zeros([8,7,31],float)
+    clear bb
+    for canal in range(0,8):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat_jour[canal,0,jjr]=mean(emis_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,1,jjr]=std(emis_ssmis[canal,nonzero(bb)[0]])            stat_jour[canal,2,jjr]=size(nonzero(bb))
+            stat_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+mpolar_ssmis=np.zeros([3,nbtotal],float)
+mpolar_ssmis[0,:]=0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+mpolar_ssmis[1,:]=0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+mpolar_ssmis[2,:]=0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+
+mpolarTB_ssmis=np.zeros([3,nbtotal],float)
+mpolarTB_ssmis[0,:]=0.5*(tb_ssmis[1,:]+tb_ssmis[2,:])
+mpolarTB_ssmis[1,:]=0.5*(tb_ssmis[4,:]+tb_ssmis[5,:])
+mpolarTN_ssmis[2,:]=0.5*(tb_ssmis[6,:]+tb_ssmis[7,:])
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat2_jour=np.zeros([3,7,31],float)
+    clear bb
+    for canal in range(0,3):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat2_jour[canal,0,jjr]=mean(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,1,jjr]=std(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,2,jjr]=size(nonzero(bb))
+            stat2_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])            stat2_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS-MPOLAR_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+# ecriture sous format nc
+from netCDF4 import Dataset
+rootgrp = Dataset('..\EMIS\EMIS_SSMIS_'+le_mois+'.nc', 'w', format='NETCDF4')
+ 
+rootgrp.createDimension('longitude', len(monthly_lon_ssmis))
+rootgrp.createDimension('latitude', len(monthly_lat_ssmis))
+rootgrp.createDimension('channels', 8)
+rootgrp.createDimension('bchannels', 3)
+
+# createVariable (nom de la variable, type, dimensions)
+# Si 1 dimension, ne pas oublier la virgule
+nclon = rootgrp.createVariable('longitude', 'f8', ('longitude',))
+nclat = rootgrp.createVariable('latitude', 'f8', ('latitude',))
+ncchan=rootgrp.createVariable('channels', 'f', ('channels',))
+ncchan2=rootgrp.createVariable('bchannels', 'f', ('bchannels',))
+nctemp = rootgrp.createVariable('emissivity', 'f8', ('channels','latitude', 'longitude'))
+nctemp2 = rootgrp.createVariable('emissivity melange polar', 'f8', ('bchannels','latitude', 'longitude'))
+
+nclon[:] = monthly_lon_ssmis
+nclat[:] = monthly_lat_ssmis
+ncchan[:]=[50,19.1,19.2,22,37.1,37.2,91.1,91.2]
+ncchan2[:]=[19,37,91]
+nctemp[:] = monthly_outz_ssmis
+nctemp2[:] = monthly_outz_ssmis_polar
+
+rootgrp.close()
+
+
Index: /trunk/src/python_script/read_amsua_ch2_gc.py
===================================================================
--- /trunk/src/python_script/read_amsua_ch2_gc.py	(revision 6)
+++ /trunk/src/python_script/read_amsua_ch2_gc.py	(revision 6)
@@ -0,0 +1,495 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/AMSUA_CH2_ANTARC_JUNE2010.DAT','r')
+numlines = 0
+for line in fichier: numlines += 1
+
+fichier.close
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/AMSUA_CH2_ANTARC_JUNE2010.DAT','r')
+nbtotal=numlines
+
+iligne=0
+lat_a2=np.zeros([nbtotal],float)
+lon_a2=np.zeros([nbtotal],float)
+jjr_a2=np.zeros([nbtotal],float)
+zen_a2=np.zeros([nbtotal],float)
+fov_a2=np.zeros([nbtotal],float)
+ts_a2=np.zeros([nbtotal],float)
+emis_a2=np.zeros([nbtotal],float)
+tb_a2=np.zeros([nbtotal],float)
+tup_a2=np.zeros([nbtotal],float)
+tdn_a2=np.zeros([nbtotal],float)
+trans_a2=np.zeros([nbtotal],float)
+orog_a2=np.zeros([nbtotal],float)
+mask_a2=np.zeros([nbtotal],float)
+pos_a2=np.zeros([nbtotal],float)
+
+while (iligne <= nbtotal-1) :
+         line=fichier.readline()
+         # exemple : line = "0.22 2.3 5.0 6"
+         liste = line.split()
+         # exemple : listeCoord ['0.22', '2.3', '5.0', '6'] (liste de chaine de caract?es)
+         lon_a2[iligne] = float(liste[0])
+         lat_a2[iligne] = float(liste[1])
+         jjr_a2[iligne] = float(liste[4])
+         pos_a2[iligne] = float(liste[7])
+         zen_a2[iligne] = float(liste[8])
+         ts_a2[iligne] = float(liste[10])
+         orog_a2[iligne] = float(liste[13])
+         mask_a2[iligne] = float(liste[14])
+         tb_a2[iligne] = float(liste[15])
+         emis_a2[iligne] = float(liste[16])
+         tdn_a2[iligne] = float(liste[17])
+         tup_a2[iligne] = float(liste[18])
+         trans_a2[iligne] = float(liste[19])
+         iligne=iligne+1
+         
+
+fichier.close
+
+
+vnx=np.array([ 200.,  100.,   60.,   50.,   40.,   30.,   25.,   25.,   20.,20.,   18.,   16.,   15.,   12.,   12.,   12.,   12.,   12.,
+12.,   12.,   12.,   12.,   12.,   12.,   12.,   12.,   12.,
+12.,   12.,   12.,   12.,   12.,   12.,   12.,   12.,   12.,
+12.,   12.,   12.,   12.])
+
+#correr vnx
+###################""
+#matrices altitude
+x=lon_a2
+y=lat_a2
+z=orog_a2
+z0=0
+z1=5000
+
+agrid_t, apgrid_t, angrid_t, anngrid_t, asigma_grid_t, xvec, yvec, a_t = newgrid_z.newgrid(x, y, z, vnx,z0, z1)
+
+#matrices ts mask
+x=lon_a2
+y=lat_a2
+z=ts_a2
+m=mask_a2
+z0=100
+z1=400
+y11 = -60
+
+import newgrid_zml
+tsgrid_ta260, tspgrid_ta260, tsngrid_ta260, tsnngrid_ta260, tssigma_grid_ta260, xvec, yvec, ts_ta260, mm_ta260 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+#matrices ts mask
+x=lon_a2
+y=lat_a2
+z=ts_a2
+m=mask_a2
+z0=100
+z1=400
+y11 = -50
+
+import newgrid_zml
+tsgrid_ta2, tspgrid_ta2, tsngrid_ta2, tsnngrid_ta2, tssigma_grid_ta2, xvec, yvec, ts_ta2, mm_ta2 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+
+#################################################"
+#matrices tb mask
+x=lon_a2
+y=lat_a2
+z=tb_a2
+m=mask_a2
+z0=100
+z1=300
+y11 = -60
+
+import newgrid_zml
+tbgrid_ta260, tbpgrid_ta260, tbngrid_ta260, tbnngrid_ta260, tbsigma_grid_ta260, xvec60, yvec60, tb_ta260, mm_ta260 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+#################################################"
+#matrices tb mask
+x=lon_a2
+y=lat_a2
+z=tb_a2
+m=mask_a2
+z0=100
+z1=300
+y11 = -50
+
+import newgrid_zml
+tbgrid_t, tbpgrid_t, tbngrid_t, tbnngrid_t, tbsigma_grid_t, xvec, yvec, tb_t, mm_t = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+nscan = 1
+import newgridns_zm
+tbgrid_1n, tbpgrid_1n, tbngrid_1n, tbnngrid_1n, tbsigma_grid_1n, xvec, yvec, tb_1n, mm_1n = newgridns_z.newgridns(x, y, z, m, vnx, nscan, pos, z0, z1)
+
+nscan = 2
+tbgrid_2n, tbpgrid_2n, tbngrid_2n, tbnngrid_2n, tbsigma_grid_2n, xvec, yvec, tb_2n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+nscan = 3
+tbgrid_3n, tbpgrid_3n, tbngrid_3n, tbnngrid_3n, tbsigma_grid_3n, xvec, yvec,tb_3n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+
+######################################################################
+x=lon_a2
+y=lat_a2
+z=tup_a2
+m=mask_a2
+z0=0
+z1=70
+y11 = -50
+
+import newgrid_zml
+tupgrid_ta2, tuppgrid_ta2, tupngrid_ta2, tupnngrid_ta2, tupsigma_grid_ta2, xvec, yvec, tup_ta2, mm_ta2 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+##################################################################
+x=lon_a2
+y=lat_a2
+z=tup_a2
+m=mask_a2
+z0=0
+z1=70
+y11 = -60
+
+import newgrid_zml
+tupgrid_ta260, tuppgrid_ta260, tupngrid_ta260, tupnngrid_ta260, tupsigma_grid_ta260, xvec60, yvec60, tup_ta260, mm_ta260 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+#matrix mask
+x=lon_a2
+y=lat_a2
+z=mask_a2
+m=mask_a2
+z0=0
+z1=1
+y11 = -60
+
+import newgrid_zml
+mgrid_t60, mpgrid_t60, mngrid_t60, mnngrid_t60, msigma_grid_t60, xvec60, yvec60, m_t60, mm_t60 = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+nscan = 1
+import newgridns_zm
+tbgrid_1n, tbpgrid_1n, tbngrid_1n, tbnngrid_1n, tbsigma_grid_1n, xvec, yvec, tb_1n, mm_1n = newgridns_z.newgridns(x, y, z, m, vnx, nscan, pos, z0, z1)
+
+nscan = 2
+tbgrid_2n, tbpgrid_2n, tbngrid_2n, tbnngrid_2n, tbsigma_grid_2n, xvec, yvec, tb_2n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+nscan = 3
+tbgrid_3n, tbpgrid_3n, tbngrid_3n, tbnngrid_3n, tbsigma_grid_3n, xvec, yvec,tb_3n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+##################################################
+
+#matrices tr
+x=lon
+y=lat
+z=trans
+z0=0
+z1=1
+
+
+import newgrid_z
+trgrid_t, trpgrid_t, trngrid_t, trnngrid_t, trsigma_grid_t, xvec, yvec, tr_t = newgrid_z.newgrid(x, y, z, vnx,z0, z1)
+
+nscan = 1
+import newgridns_z
+trgrid_1n, trpgrid_1n, trngrid_1n, trnngrid_1n, trsigma_grid_1n, xvec, yvec, tr_1n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+nscan = 2
+trgrid_2n, trpgrid_2n, trngrid_2n, trnngrid_2n, trsigma_grid_2n, xvec, yvec, tr_2n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+nscan = 3
+trgrid_3n, trpgrid_3n, trngrid_3n, trnngrid_3n, trsigma_grid_3n, xvec, yvec,tr_3n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+########
+#matrices z=emis
+
+z=emis
+egrid_t, eepgrid_t, engrid_t, enngrid_t, esigma_grid_t, xvec, yvec = newgrid.newgrid(x, y, z, vnx)
+
+nscan = 1
+egrid_1n, eepgrid_1n, engrid_1n, enngrid_1n, esigma_grid_1n, xvec, yvec = newgridns.newgridns(x, y, z, vnx, nscan, pos)
+
+nscan = 2
+egrid_2n, eepgrid_2n, engrid_2n, enngrid_2n, esigma_grid_2n, xvec, yvec = newgridns.newgridns(x, y, z, vnx, nscan, pos)
+
+nscan = 3
+egrid_3n, eepgrid_3n, engrid_3n, enngrid_3n, esigma_grid_3n, xvec, yvec = newgridns.newgridns(x, y, z, vnx, nscan, pos)
+
+#######################################################
+# tb terre
+
+z0=0
+z1=1
+z=mask
+
+import newgrid_z
+mzgrid_t, mzzpgrid_t, mngrid_t, mnngrid_t, msigma_grid_t, xvec, yvec,mzz_t = newgrid_z.newgrid(x, y, z, vnx, z0, z1)
+
+mpgrid=np.round(mzzpgrid_t)
+mer=mpgrid
+mer[mer==0]=2
+mer=mer-1
+
+mertb=tbpgrid_t*mer #tb mer et glace de mer
+mertb_1n=tbpgrid_1n*mer #tb mer et glace de mer pos1
+mertb_2n=tbpgrid_2n*mer #tb mer et glace de mer pos2
+mertb_3n=tbpgrid_3n*mer #tb mer et glace de mer pos3
+
+
+
+tbpgrid_tc=tbpgrid_t*mpgrid #tb continent
+tbpgrid_1nc=tbpgrid_1n*mpgrid #tb continent pos1
+tbpgrid_2nc=tbpgrid_2n*mpgrid #tb continent pos2
+tbpgrid_3nc=tbpgrid_3n*mpgrid #tb continent pos3
+
+
+#################################################"
+#vec 
+import newvec_zml
+x=lon
+y=lat
+z=tb
+m=mask
+z0=100
+z1=300
+y11 = -50
+import newvec_x
+tb_t50, alt_t50, mm_t50, lo_t50, la_t50 =newvec_x.newgrid(x, y, z, mask, orog, z0, z1, y11)
+
+
+y11 = -60
+import newvecns_zml
+nscan = 1
+tb_1na, mm_tl1n = newvecns_zml.newgridns(x, y, z, m, vnx, nscan, pos, z0, z1, y11)
+
+nscan = 2
+tb_2na, mm_tl2n = newvecns_zml.newgridns(x, y, z, m, vnx, nscan, pos, z0, z1, y11)
+
+nscan = 3
+tb_3na, mm_tl3n = newvecns_zml.newgridns(x, y, z, m, vnx, nscan, pos, z0, z1, y11)
+
+
+##################################
+#matrices tb mask
+x=lon
+y=lat
+z=ts
+m=mask
+z0=100
+z1=305
+y11 = -50
+
+import newgrid_zml
+tsgrid_t, tspgrid_t, tsngrid_t, tsnngrid_t, tssigma_grid_t, xvec, yvec, ts_t, mmts_t = newgrid_zml.newgrid(x, y, z, m, vnx,z0, z1, y11)
+
+nscan = 1
+import newgridns_zm
+tbgrid_1n, tbpgrid_1n, tbngrid_1n, tbnngrid_1n, tbsigma_grid_1n, xvec, yvec, tb_1n, mm_1n = newgridns_z.newgridns(x, y, z, m, vnx, nscan, pos, z0, z1)
+
+nscan = 2
+tbgrid_2n, tbpgrid_2n, tbngrid_2n, tbnngrid_2n, tbsigma_grid_2n, xvec, yvec, tb_2n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+nscan = 3
+tbgrid_3n, tbpgrid_3n, tbngrid_3n, tbnngrid_3n, tbsigma_grid_3n, xvec, yvec,tb_3n = newgridns_z.newgridns(x, y, z, vnx, nscan, pos, z0, z1)
+
+
+#####################
+
+dx=0.1
+dy=1.0
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+
+monthly_outz=np.zeros([40,3600],float)
+monthly_lon=np.zeros([3600])
+monthly_lat=np.zeros([40])
+xx = lon
+yy = lat
+zz = tb
+zz0 = 100
+zz1= 300
+outz, outx, outy, Nil = ffgrid3.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,zz0, zz1)
+x=outx
+y=outy
+z = np.transpose(outz)
+z[Nil]=600
+z=np.transpose(z)
+
+del outz, outx, outy, zz, xx, yy
+
+
+# ici je fais des cartes moyennes en melangeant les polars
+
+xx = lon_ssmis
+yy = lat_ssmis
+zz = 0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+# ici je fais des cartes moyennes des differences des polars
+xx = lon_ssmis
+yy = lat_ssmis
+zz = emis_ssmis[1,:]-emis_ssmis[2,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[4,:]-emis_ssmis[5,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[6,:]-emis_ssmis[7,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+draw_map.draw(monthly_outz_ssmis_polar[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis_diff[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_50V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[3,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_22V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[4,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[5,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[6,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[7,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+
+bins=arange(0.3,1,0.001)
+bb=(lat_ssmis >= 0) 
+ 
+plt.hist(emis_ssmis[0,nonzero(bb)[0]], bins=bins,histtype='step', label='e50V',normed='True',color='#4BB5C1')
+plt.hist(emis_ssmis[1,nonzero(bb)[0]], bins=bins,histtype='step', label='e19V',normed='True',color='black')
+plt.hist(emis_ssmis[3,nonzero(bb)[0]], bins=bins,histtype='step', label='e22V',normed='True',color='#B9121B')
+plt.hist(emis_ssmis[4,nonzero(bb)[0]], bins=bins,histtype='step', label='e37V',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[6,nonzero(bb)[0]], bins=bins,histtype='step', label='e91V',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_V_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(emis_ssmis[2,nonzero(bb)[0]], bins=bins,histtype='step', label='e19H',normed='True',color='black')
+plt.hist(emis_ssmis[5,nonzero(bb)[0]], bins=bins,histtype='step', label='e37H',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[7,nonzero(bb)[0]], bins=bins,histtype='step', label='e91H',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_H_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(0.5*(emis_ssmis[1,nonzero(bb)[0]]+emis_ssmis[2,nonzero(bb)[0]]), bins=bins,histtype='step', label='e19',normed='True',color='black')
+plt.hist(0.5*(emis_ssmis[4,nonzero(bb)[0]]+emis_ssmis[5,nonzero(bb)[0]]), bins=bins,histtype='step', label='e37',normed='True',color='#9748D4')
+plt.hist(0.5*(emis_ssmis[6,nonzero(bb)[0]]+emis_ssmis[7,nonzero(bb)[0]]), bins=bins,histtype='step', label='e91',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_mpolar_NH_'+le_mois+'.png')
+close()
+
+
+# stats quotidienne autour de la station ThulÃ©
+lat_stations=[76.32, 74.43, 78.13, 58.45, 68.6, 64.58]
+lon_stations=[-68.3, -94.59, 15.35, -78.08, 33.1, 40.5]
+nom_stations=['Thule', 'Resolute', 'Longyearbyen', 'Iqaluit', 'Murmansk', 'Arkhangelsk']
+
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat_jour=np.zeros([8,7,31],float)
+    clear bb
+    for canal in range(0,8):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat_jour[canal,0,jjr]=mean(emis_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,1,jjr]=std(emis_ssmis[canal,nonzero(bb)[0]])            stat_jour[canal,2,jjr]=size(nonzero(bb))
+            stat_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+mpolar_ssmis=np.zeros([3,nbtotal],float)
+mpolar_ssmis[0,:]=0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+mpolar_ssmis[1,:]=0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+mpolar_ssmis[2,:]=0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+
+mpolarTB_ssmis=np.zeros([3,nbtotal],float)
+mpolarTB_ssmis[0,:]=0.5*(tb_ssmis[1,:]+tb_ssmis[2,:])
+mpolarTB_ssmis[1,:]=0.5*(tb_ssmis[4,:]+tb_ssmis[5,:])
+mpolarTN_ssmis[2,:]=0.5*(tb_ssmis[6,:]+tb_ssmis[7,:])
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat2_jour=np.zeros([3,7,31],float)
+    clear bb
+    for canal in range(0,3):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat2_jour[canal,0,jjr]=mean(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,1,jjr]=std(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,2,jjr]=size(nonzero(bb))
+            stat2_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])            stat2_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS-MPOLAR_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+# ecriture sous format nc
+from netCDF4 import Dataset
+rootgrp = Dataset('..\EMIS\EMIS_SSMIS_'+le_mois+'.nc', 'w', format='NETCDF4')
+ 
+rootgrp.createDimension('longitude', len(monthly_lon_ssmis))
+rootgrp.createDimension('latitude', len(monthly_lat_ssmis))
+rootgrp.createDimension('channels', 8)
+rootgrp.createDimension('bchannels', 3)
+
+# createVariable (nom de la variable, type, dimensions)
+# Si 1 dimension, ne pas oublier la virgule
+nclon = rootgrp.createVariable('longitude', 'f8', ('longitude',))
+nclat = rootgrp.createVariable('latitude', 'f8', ('latitude',))
+ncchan=rootgrp.createVariable('channels', 'f', ('channels',))
+ncchan2=rootgrp.createVariable('bchannels', 'f', ('bchannels',))
+nctemp = rootgrp.createVariable('emissivity', 'f8', ('channels','latitude', 'longitude'))
+nctemp2 = rootgrp.createVariable('emissivity melange polar', 'f8', ('bchannels','latitude', 'longitude'))
+
+nclon[:] = monthly_lon_ssmis
+nclat[:] = monthly_lat_ssmis
+ncchan[:]=[50,19.1,19.2,22,37.1,37.2,91.1,91.2]
+ncchan2[:]=[19,37,91]
+nctemp[:] = monthly_outz_ssmis
+nctemp2[:] = monthly_outz_ssmis_polar
+
+rootgrp.close()
+
+
Index: /trunk/src/python_script/read_amsua_ch2_n.py
===================================================================
--- /trunk/src/python_script/read_amsua_ch2_n.py	(revision 6)
+++ /trunk/src/python_script/read_amsua_ch2_n.py	(revision 6)
@@ -0,0 +1,264 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import string
+import numpy as np
+import matplotlib.pyplot as plt
+from pylab import *
+from mpl_toolkits.basemap import Basemap
+from mpl_toolkits.basemap import shiftgrid, cm
+import netCDF4
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/AMSUA_CH2_ANTARC_JUNE2010.DAT','r')
+numlines = 0
+for line in fichier: numlines += 1
+
+fichier.close
+
+
+fichier=open('/net/dedale/usr/dedale/surf/lelod/ANTARC/AMSUA_CH2_ANTARC_JUNE2010.DAT','r')
+nbtotal=numlines
+
+iligne=0
+lat=np.zeros([nbtotal],float)
+lon=np.zeros([nbtotal],float)
+jjr=np.zeros([nbtotal],float)
+zen=np.zeros([nbtotal],float)
+fov=np.zeros([nbtotal],float)
+ts=np.zeros([nbtotal],float)
+emis=np.zeros([nbtotal],float)
+tb=np.zeros([nbtotal],float)
+tup=np.zeros([nbtotal],float)
+tdn=np.zeros([nbtotal],float)
+trans=np.zeros([nbtotal],float)
+orog=np.zeros([nbtotal],float)
+pos=np.zeros([nbtotal],float)
+
+while (iligne <= nbtotal-1) :
+         line=fichier.readline()
+         # exemple : line = "0.22 2.3 5.0 6"
+         liste = line.split()
+         # exemple : listeCoord ['0.22', '2.3', '5.0', '6'] (liste de chaine de caract?es)
+         lat[iligne] = float(liste[1])
+         lon[iligne] = float(liste[0])
+         jjr[iligne] = float(liste[4])
+         ts[iligne] = float(liste[10])
+         tb[iligne] = float(liste[15])
+         emis[iligne] = float(liste[16])
+         orog[iligne] = float(liste[13])
+         pos[iligne] = float(liste[7])
+         iligne=iligne+1
+         
+
+fichier.close
+
+
+x=lon
+y=lat
+z=tb
+nscan = 3
+
+zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec = newgridns.newgridns(x, y, z, vnx, nscan, pos)
+
+zgrid_3n=zgrid
+zzpgrid_3n=zzpgrid
+ngrid_3n=ngrid
+nngrid_3n=nngrid
+sigma_grid_3n=sigma_grid
+dif_zzpgrid=sigma_grid_t-sigma_grid_2n
+
+del zgrid, zzpgrid, ngrid, nngrid, sigma_grid, xvec, yvec
+
+
+dx=0.1
+dy=1.0
+x0, x1 = -180, 180
+y0, y1 = -90, 90
+
+monthly_outz=np.zeros([40,3600],float)
+monthly_lon=np.zeros([3600])
+monthly_lat=np.zeros([40])
+xx = lon
+yy = lat
+zz = tb
+zz0 = 100
+zz1= 300
+outz, outx, outy, Nil = ffgrid3.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,zz0, zz1)
+x=outx
+y=outy
+z = np.transpose(outz)
+z[Nil]=600
+z=np.transpose(z)
+
+del outz, outx, outy, zz, xx, yy
+
+
+# ici je fais des cartes moyennes en melangeant les polars
+
+xx = lon_ssmis
+yy = lat_ssmis
+zz = 0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = 0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,0.1, 1)
+monthly_outz_ssmis_polar[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+# ici je fais des cartes moyennes des differences des polars
+xx = lon_ssmis
+yy = lat_ssmis
+zz = emis_ssmis[1,:]-emis_ssmis[2,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[0,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[4,:]-emis_ssmis[5,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[1,:,:]=outz    
+del outz, outx, outy, zz
+
+zz = emis_ssmis[6,:]-emis_ssmis[7,:]
+outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0,x1,y0,y1,-0.05, 0.2)
+monthly_outz_ssmis_diff[2,:,:]=outz    
+del outz, outx, outy, zz, xx, yy
+
+draw_map.draw(monthly_outz_ssmis_polar[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_polar[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85GHzmpolar_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis_diff[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis_diff[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V-H_HN_'+le_mois+'.png', '',0,0.2,0.002,cm.s3pcpn_l_r)
+
+draw_map.draw(monthly_outz_ssmis[0,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_50V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[1,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[2,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_19H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[3,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_22V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[4,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[5,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_37H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[6,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85V_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+draw_map.draw(monthly_outz_ssmis[7,:], monthly_lon_ssmis, monthly_lat_ssmis, '..\FIG\mean_ssmis_85H_HN_'+le_mois+'.png', '',0.6,1.01,0.002,cm.s3pcpn_l_r)
+
+
+bins=arange(0.3,1,0.001)
+bb=(lat_ssmis >= 0) 
+ 
+plt.hist(emis_ssmis[0,nonzero(bb)[0]], bins=bins,histtype='step', label='e50V',normed='True',color='#4BB5C1')
+plt.hist(emis_ssmis[1,nonzero(bb)[0]], bins=bins,histtype='step', label='e19V',normed='True',color='black')
+plt.hist(emis_ssmis[3,nonzero(bb)[0]], bins=bins,histtype='step', label='e22V',normed='True',color='#B9121B')
+plt.hist(emis_ssmis[4,nonzero(bb)[0]], bins=bins,histtype='step', label='e37V',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[6,nonzero(bb)[0]], bins=bins,histtype='step', label='e91V',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_V_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(emis_ssmis[2,nonzero(bb)[0]], bins=bins,histtype='step', label='e19H',normed='True',color='black')
+plt.hist(emis_ssmis[5,nonzero(bb)[0]], bins=bins,histtype='step', label='e37H',normed='True',color='#9748D4')
+plt.hist(emis_ssmis[7,nonzero(bb)[0]], bins=bins,histtype='step', label='e91H',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_H_NH_'+le_mois+'.png')
+close()
+
+bins=arange(0.3,1,0.001)
+plt.hist(0.5*(emis_ssmis[1,nonzero(bb)[0]]+emis_ssmis[2,nonzero(bb)[0]]), bins=bins,histtype='step', label='e19',normed='True',color='black')
+plt.hist(0.5*(emis_ssmis[4,nonzero(bb)[0]]+emis_ssmis[5,nonzero(bb)[0]]), bins=bins,histtype='step', label='e37',normed='True',color='#9748D4')
+plt.hist(0.5*(emis_ssmis[6,nonzero(bb)[0]]+emis_ssmis[7,nonzero(bb)[0]]), bins=bins,histtype='step', label='e91',normed='True',color='#060DE5')
+plt.legend(loc='upper left')
+plt.show()
+plt.savefig('..\FIG\hist_ssmis_mpolar_NH_'+le_mois+'.png')
+close()
+
+
+# stats quotidienne autour de la station ThulÃ©
+lat_stations=[76.32, 74.43, 78.13, 58.45, 68.6, 64.58]
+lon_stations=[-68.3, -94.59, 15.35, -78.08, 33.1, 40.5]
+nom_stations=['Thule', 'Resolute', 'Longyearbyen', 'Iqaluit', 'Murmansk', 'Arkhangelsk']
+
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat_jour=np.zeros([8,7,31],float)
+    clear bb
+    for canal in range(0,8):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat_jour[canal,0,jjr]=mean(emis_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,1,jjr]=std(emis_ssmis[canal,nonzero(bb)[0]])            stat_jour[canal,2,jjr]=size(nonzero(bb))
+            stat_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])
+            stat_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+mpolar_ssmis=np.zeros([3,nbtotal],float)
+mpolar_ssmis[0,:]=0.5*(emis_ssmis[1,:]+emis_ssmis[2,:])
+mpolar_ssmis[1,:]=0.5*(emis_ssmis[4,:]+emis_ssmis[5,:])
+mpolar_ssmis[2,:]=0.5*(emis_ssmis[6,:]+emis_ssmis[7,:])
+
+mpolarTB_ssmis=np.zeros([3,nbtotal],float)
+mpolarTB_ssmis[0,:]=0.5*(tb_ssmis[1,:]+tb_ssmis[2,:])
+mpolarTB_ssmis[1,:]=0.5*(tb_ssmis[4,:]+tb_ssmis[5,:])
+mpolarTN_ssmis[2,:]=0.5*(tb_ssmis[6,:]+tb_ssmis[7,:])
+
+for sta in range(0,6):
+    lat0=lat_stations[sta]
+    lon0=lon_stations[sta]
+    stat2_jour=np.zeros([3,7,31],float)
+    clear bb
+    for canal in range(0,3):
+        for jjr in range(0,31):
+            jour_obs=jjr+1
+            bb=(jjr_ssmis == jour_obs) & (abs(lat_ssmis-lat0) < 2.) & (abs(lon_ssmis-lon0) < 2.)
+            stat2_jour[canal,0,jjr]=mean(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,1,jjr]=std(mpolar_ssmis[canal,nonzero(bb)[0]])
+            stat2_jour[canal,2,jjr]=size(nonzero(bb))
+            stat2_jour[canal,3,jjr]=mean(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,4,jjr]=std(ts_ssmis[nonzero(bb)[0]])
+            stat2_jour[canal,5,jjr]=mean(tb_ssmis[canal,nonzero(bb)[0]])            stat2_jour[canal,6,jjr]=std(tb_ssmis[canal,nonzero(bb)[0]])
+            del bb
+    np.save('STAT_SSMIS-MPOLAR_'+nom_stations[sta]+'_'+le_mois+'.dat', stat_jour)
+    del stat_jour
+
+# ecriture sous format nc
+from netCDF4 import Dataset
+rootgrp = Dataset('..\EMIS\EMIS_SSMIS_'+le_mois+'.nc', 'w', format='NETCDF4')
+ 
+rootgrp.createDimension('longitude', len(monthly_lon_ssmis))
+rootgrp.createDimension('latitude', len(monthly_lat_ssmis))
+rootgrp.createDimension('channels', 8)
+rootgrp.createDimension('bchannels', 3)
+
+# createVariable (nom de la variable, type, dimensions)
+# Si 1 dimension, ne pas oublier la virgule
+nclon = rootgrp.createVariable('longitude', 'f8', ('longitude',))
+nclat = rootgrp.createVariable('latitude', 'f8', ('latitude',))
+ncchan=rootgrp.createVariable('channels', 'f', ('channels',))
+ncchan2=rootgrp.createVariable('bchannels', 'f', ('bchannels',))
+nctemp = rootgrp.createVariable('emissivity', 'f8', ('channels','latitude', 'longitude'))
+nctemp2 = rootgrp.createVariable('emissivity melange polar', 'f8', ('bchannels','latitude', 'longitude'))
+
+nclon[:] = monthly_lon_ssmis
+nclat[:] = monthly_lat_ssmis
+ncchan[:]=[50,19.1,19.2,22,37.1,37.2,91.1,91.2]
+ncchan2[:]=[19,37,91]
+nctemp[:] = monthly_outz_ssmis
+nctemp2[:] = monthly_outz_ssmis_polar
+
+rootgrp.close()
+
+
Index: /trunk/src/python_script/reg_lin1.py
===================================================================
--- /trunk/src/python_script/reg_lin1.py	(revision 6)
+++ /trunk/src/python_script/reg_lin1.py	(revision 6)
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import numpy
+
+# Polynomial Regression
+def reg_lin1(x, y, degree):
+    results = {}
+
+    m, c = numpy.polyfit(x, y, degree)
+
+    # r-squared
+    p = numpy.poly1d(m,c)
+    # fit values, and mean
+    yhat = [p(z) for z in x]
+    ybar = sum(y)/len(y)
+    ssreg = sum([ (yihat - ybar)**2 for yihat in yhat])
+    sstot = sum([ (yi - ybar)**2 for yi in y])
+    r = ssreg / sstot
+
+    return m,c, r
Index: /trunk/src/python_script/tup_moy_par_zone.py
===================================================================
--- /trunk/src/python_script/tup_moy_par_zone.py	(revision 6)
+++ /trunk/src/python_script/tup_moy_par_zone.py	(revision 6)
@@ -0,0 +1,180 @@
+#amsub
+ialt34_abch1=(ambch1[13,:]>=3000)&(ambch1[13,:]<=4000)
+ialt34_abch2=(ambch2[13,:]>=3000)&(ambch2[13,:]<=4000)
+ialt34_abch3=(ambch3[13,:]>=3000)&(ambch3[13,:]<=4000)
+ialt34_abch4=(ambch4[13,:]>=3000)&(ambch4[13,:]<=4000)
+ialt34_abch5=(ambch5[13,:]>=3000)&(ambch5[13,:]<=4000)
+
+tup_ab1_alt34=mean(ambch1[18,ialt34_abch1])
+tup_ab2_alt34=mean(ambch2[18,ialt34_abch2])
+tup_ab3_alt34=mean(ambch3[18,ialt34_abch3])
+tup_ab4_alt34=mean(ambch4[18,ialt34_abch4])
+tup_ab5_alt34=mean(ambch5[18,ialt34_abch5])
+
+#amsub angles faibles
+ialt34_abch1n1=ialt34_abch1 & (ambch1[7,:]<=13) | ialt34_abch1 & (ambch1[7,:]>=78)
+ialt34_abch2n1=ialt34_abch2 & (ambch2[7,:]<=13) | ialt34_abch2 & (ambch2[7,:]>=78)
+ialt34_abch3n1=ialt34_abch3 & (ambch3[7,:]<=13) | ialt34_abch3 & (ambch3[7,:]>=78)
+ialt34_abch4n1=ialt34_abch4 & (ambch4[7,:]<=13) | ialt34_abch4 & (ambch4[7,:]>=78)
+ialt34_abch5n1=ialt34_abch5 & (ambch5[7,:]<=13) | ialt34_abch5 & (ambch5[7,:]>=78)
+
+tup_ab_alt34n1=np.zeros([5],float)
+tup_ab_alt34n1[0]=mean(ambch1[18,ialt34_abch1n1])
+tup_ab_alt34n1[1]=mean(ambch2[18,ialt34_abch2n1])
+tup_ab_alt34n1[2]=mean(ambch3[18,ialt34_abch3n1])
+tup_ab_alt34n1[3]=mean(ambch4[18,ialt34_abch4n1])
+tup_ab_alt34n1[4]=mean(ambch5[18,ialt34_abch5n1])
+
+#ecart type
+tupet_ab_alt34n1=np.zeros([5],float)
+tupet_ab_alt34n1[0]=sqrt(sum(ambch1[18,ialt34_abch1n1]**2)/size(ambch1[18,ialt34_abch1n1])-mean(ambch1[18,ialt34_abch1n1])**2)
+tupet_ab_alt34n1[1]=sqrt(sum(ambch2[18,ialt34_abch2n1]**2)/size(ambch2[18,ialt34_abch2n1])-mean(ambch2[18,ialt34_abch2n1])**2)
+tupet_ab_alt34n1[2]=sqrt(sum(ambch3[18,ialt34_abch3n1]**2)/size(ambch3[18,ialt34_abch3n1])-mean(ambch3[18,ialt34_abch3n1])**2)
+tupet_ab_alt34n1[3]=sqrt(sum(ambch4[18,ialt34_abch4n1]**2)/size(ambch4[18,ialt34_abch4n1])-mean(ambch4[18,ialt34_abch4n1])**2)
+tupet_ab_alt34n1[4]=sqrt(sum(ambch5[18,ialt34_abch5n1]**2)/size(ambch5[18,ialt34_abch5n1])-mean(ambch5[18,ialt34_abch5n1])**2)
+
+
+#amsua
+ialt34_ach1=(amch1[13,:]>=3000)&(amch1[13,:]<=4000)
+ialt34_ach2=(amch2[13,:]>=3000)&(amch2[13,:]<=4000)
+ialt34_ach3=(amch3[13,:]>=3000)&(amch3[13,:]<=4000)
+ialt34_ach4=(amch4[13,:]>=3000)&(amch4[13,:]<=4000)
+ialt34_ach5=(amch5[13,:]>=3000)&(amch5[13,:]<=4000)
+ialt34_ach6=(amch6[13,:]>=3000)&(amch6[13,:]<=4000)
+ialt34_ach7=(amch7[13,:]>=3000)&(amch7[13,:]<=4000)
+ialt34_ach15=(amch15[13,:]>=3000)&(amch15[13,:]<=4000)
+
+tup_a1_alt34=mean(amch1[18,ialt34_ach1])
+tup_a2_alt34=mean(amch2[18,ialt34_ach2])
+tup_a3_alt34=mean(amch3[18,ialt34_ach3])
+tup_a4_alt34=mean(amch4[18,ialt34_ach4])
+tup_a5_alt34=mean(amch5[18,ialt34_ach5])
+tup_a6_alt34=mean(amch6[18,ialt34_ach6])
+tup_a7_alt34=mean(amch7[18,ialt34_ach7])
+tup_a15_alt34=mean(amch15[18,ialt34_ach15])
+
+#amsua angles faibles
+ialt34_ach1n1=ialt34_ach1 & (amch1[7,:]<=5) | ialt34_ach1 & (amch1[7,:]>=26)
+ialt34_ach2n1=ialt34_ach2 & (amch2[7,:]<=5) | ialt34_ach2 & (amch2[7,:]>=26)
+ialt34_ach3n1=ialt34_ach3 & (amch3[7,:]<=5) | ialt34_ach3 & (amch3[7,:]>=26)
+ialt34_ach4n1=ialt34_ach4 & (amch4[7,:]<=5) | ialt34_ach4 & (amch4[7,:]>=26)
+ialt34_ach5n1=ialt34_ach5 & (amch5[7,:]<=5) | ialt34_ach5 & (amch5[7,:]>=26)
+ialt34_ach6n1=ialt34_ach6 & (amch6[7,:]<=5) | ialt34_ach6 & (amch6[7,:]>=26)
+ialt34_ach7n1=ialt34_ach7 & (amch7[7,:]<=5) | ialt34_ach7 & (amch7[7,:]>=26)
+ialt34_ach15n1=ialt34_ach15 & (amch15[7,:]<=5) | ialt34_ach15 & (amch15[7,:]>=26)
+
+tup_aa_alt34n1=np.zeros([8],float)
+tup_aa_alt34n1[0]=mean(amch1[18,ialt34_ach1n1])
+tup_aa_alt34n1[1]=mean(amch2[18,ialt34_ach2n1])
+tup_aa_alt34n1[2]=mean(amch3[18,ialt34_ach3n1])
+tup_aa_alt34n1[3]=mean(amch4[18,ialt34_ach4n1])
+tup_aa_alt34n1[4]=mean(amch5[18,ialt34_ach5n1])
+tup_aa_alt34n1[5]=mean(amch6[18,ialt34_ach6n1])
+tup_aa_alt34n1[6]=mean(amch7[18,ialt34_ach7n1])
+tup_aa_alt34n1[7]=mean(amch15[18,ialt34_ach15n1])
+
+#ecart type
+tupet_aa_alt34n1=np.zeros([8],float)
+tupet_aa_alt34n1[0]=sqrt(sum(amch1[18,ialt34_ach1n1]**2)/size(amch1[18,ialt34_ach1n1])-mean(amch1[18,ialt34_ach1n1])**2)
+tupet_aa_alt34n1[1]=sqrt(sum(amch2[18,ialt34_ach2n1]**2)/size(amch2[18,ialt34_ach2n1])-mean(amch2[18,ialt34_ach2n1])**2)
+tupet_aa_alt34n1[2]=sqrt(sum(amch3[18,ialt34_ach3n1]**2)/size(amch3[18,ialt34_ach3n1])-mean(amch3[18,ialt34_ach3n1])**2)
+tupet_aa_alt34n1[3]=sqrt(sum(amch4[18,ialt34_ach4n1]**2)/size(amch4[18,ialt34_ach4n1])-mean(amch4[18,ialt34_ach4n1])**2)
+tupet_aa_alt34n1[4]=sqrt(sum(amch5[18,ialt34_ach5n1]**2)/size(amch5[18,ialt34_ach5n1])-mean(amch5[18,ialt34_ach5n1])**2)
+tupet_aa_alt34n1[5]=sqrt(sum(amch6[18,ialt34_ach6n1]**2)/size(amch6[18,ialt34_ach6n1])-mean(amch6[18,ialt34_ach6n1])**2)
+tupet_aa_alt34n1[6]=sqrt(sum(amch7[18,ialt34_ach7n1]**2)/size(amch7[18,ialt34_ach7n1])-mean(amch7[18,ialt34_ach7n1])**2)
+tupet_aa_alt34n1[7]=sqrt(sum(amch15[18,ialt34_ach15n1]**2)/size(amch15[18,ialt34_ach15n1])-mean(amch15[18,ialt34_ach15n1])**2)
+
+#ssmis
+ialt34_ssch1=(ssch1[11,:]>=3000)&(ssch1[11,:]<=4000)
+ialt34_ssch2=(ssch2[11,:]>=3000)&(ssch2[11,:]<=4000)
+ialt34_ssch3=(ssch3[11,:]>=3000)&(ssch3[11,:]<=4000)
+ialt34_ssch4=(ssch4[11,:]>=3000)&(ssch4[11,:]<=4000)
+ialt34_ssch5=(ssch5[11,:]>=3000)&(ssch5[11,:]<=4000)
+ialt34_ssch8=(ssch8[11,:]>=3000)&(ssch8[11,:]<=4000)
+ialt34_ssch9=(ssch9[11,:]>=3000)&(ssch9[11,:]<=4000)
+ialt34_ssch10=(ssch10[11,:]>=3000)&(ssch10[11,:]<=4000)
+ialt34_ssch11=(ssch11[11,:]>=3000)&(ssch11[11,:]<=4000)
+ialt34_ssch12=(ssch12[11,:]>=3000)&(ssch12[11,:]<=4000)
+ialt34_ssch13=(ssch13[11,:]>=3000)&(ssch13[11,:]<=4000)
+ialt34_ssch14=(ssch14[11,:]>=3000)&(ssch14[11,:]<=4000)
+ialt34_ssch15=(ssch15[11,:]>=3000)&(ssch15[11,:]<=4000)
+ialt34_ssch16=(ssch16[11,:]>=3000)&(ssch16[11,:]<=4000)
+ialt34_ssch17=(ssch17[11,:]>=3000)&(ssch17[11,:]<=4000)
+ialt34_ssch18=(ssch18[11,:]>=3000)&(ssch18[11,:]<=4000)
+
+tup_ss1_alt34=mean(ssch1[16,ialt34_ssch1])
+tup_ss2_alt34=mean(ssch2[16,ialt34_ssch2])
+tup_ss3_alt34=mean(ssch3[16,ialt34_ssch3])
+tup_ss4_alt34=mean(ssch4[16,ialt34_ssch4])
+tup_ss5_alt34=mean(ssch5[16,ialt34_ssch5])
+tup_ss8_alt34=mean(ssch8[16,ialt34_ssch8])
+tup_ss9_alt34=mean(ssch9[16,ialt34_ssch9])
+tup_ss10_alt34=mean(ssch10[16,ialt34_ssch10])
+tup_ss11_alt34=mean(ssch11[16,ialt34_ssch11])
+tup_ss12_alt34=mean(ssch12[16,ialt34_ssch12])
+tup_ss13_alt34=mean(ssch13[16,ialt34_ssch13])
+tup_ss14_alt34=mean(ssch14[16,ialt34_ssch14])
+tup_ss15_alt34=mean(ssch15[16,ialt34_ssch15])
+tup_ss16_alt34=mean(ssch16[16,ialt34_ssch16])
+tup_ss17_alt34=mean(ssch17[16,ialt34_ssch17])
+tup_ss18_alt34=mean(ssch18[16,ialt34_ssch18])
+
+#ecart type
+tupet_ss_alt34=np.zeros([16],float)
+tupet_ss_alt34[0]=sqrt(sum(ssch1[16,ialt34_ssch1]**2)/size(ssch1[16,ialt34_ssch1])-mean(ssch1[16,ialt34_ssch1])**2)
+tupet_ss_alt34[1]=sqrt(sum(ssch2[16,ialt34_ssch2]**2)/size(ssch2[16,ialt34_ssch2])-mean(ssch2[16,ialt34_ssch2])**2)
+tupet_ss_alt34[2]=sqrt(sum(ssch3[16,ialt34_ssch3]**2)/size(ssch3[16,ialt34_ssch3])-mean(ssch3[16,ialt34_ssch3])**2)
+tupet_ss_alt34[3]=sqrt(sum(ssch4[16,ialt34_ssch4]**2)/size(ssch4[16,ialt34_ssch4])-mean(ssch4[16,ialt34_ssch4])**2)
+tupet_ss_alt34[4]=sqrt(sum(ssch5[16,ialt34_ssch5]**2)/size(ssch5[16,ialt34_ssch5])-mean(ssch5[16,ialt34_ssch5])**2)
+tupet_ss_alt34[5]=sqrt(sum(ssch8[16,ialt34_ssch8]**2)/size(ssch8[16,ialt34_ssch8])-mean(ssch8[16,ialt34_ssch8])**2)
+tupet_ss_alt34[6]=sqrt(sum(ssch9[16,ialt34_ssch9]**2)/size(ssch9[16,ialt34_ssch9])-mean(ssch9[16,ialt34_ssch9])**2)
+tupet_ss_alt34[7]=sqrt(sum(ssch10[16,ialt34_ssch10]**2)/size(ssch10[16,ialt34_ssch10])-mean(ssch10[16,ialt34_ssch10])**2)
+tupet_ss_alt34[8]=sqrt(sum(ssch11[16,ialt34_ssch11]**2)/size(ssch11[16,ialt34_ssch11])-mean(ssch11[16,ialt34_ssch11])**2)
+tupet_ss_alt34[9]=sqrt(sum(ssch12[16,ialt34_ssch12]**2)/size(ssch12[16,ialt34_ssch12])-mean(ssch12[16,ialt34_ssch12])**2)
+tupet_ss_alt34[10]=sqrt(sum(ssch13[16,ialt34_ssch13]**2)/size(ssch13[16,ialt34_ssch13])-mean(ssch13[16,ialt34_ssch13])**2)
+tupet_ss_alt34[11]=sqrt(sum(ssch14[16,ialt34_ssch14]**2)/size(ssch14[16,ialt34_ssch14])-mean(ssch14[16,ialt34_ssch14])**2)
+tupet_ss_alt34[12]=sqrt(sum(ssch15[16,ialt34_ssch15]**2)/size(ssch15[16,ialt34_ssch15])-mean(ssch15[16,ialt34_ssch15])**2)
+tupet_ss_alt34[13]=sqrt(sum(ssch16[16,ialt34_ssch16]**2)/size(ssch16[16,ialt34_ssch16])-mean(ssch16[16,ialt34_ssch16])**2)
+tupet_ss_alt34[14]=sqrt(sum(ssch17[16,ialt34_ssch17]**2)/size(ssch17[16,ialt34_ssch17])-mean(ssch17[16,ialt34_ssch17])**2)
+tupet_ss_alt34[15]=sqrt(sum(ssch18[16,ialt34_ssch18]**2)/size(ssch18[16,ialt34_ssch18])-mean(ssch18[16,ialt34_ssch18])**2)
+
+tupnd_ss_alt34=np.zeros([16],float)
+tupet_ss_alt34[0]=sum(ialt34_ssch1)
+tupet_ss_alt34[1]=sum(ialt34_ssch2)
+tupet_ss_alt34[2]=sum(ialt34_ssch3)
+tupet_ss_alt34[3]=sum(ialt34_ssch4)
+tupet_ss_alt34[4]=sum(ialt34_ssch5)
+tupet_ss_alt34[5]=sum(ialt34_ssch8)
+tupet_ss_alt34[6]=sum(ialt34_ssch9)
+tupet_ss_alt34[7]=sum(ialt34_ssch10)
+tupet_ss_alt34[8]=sum(ialt34_ssch11)
+tupet_ss_alt34[9]=sum(ialt34_ssch12)
+tupet_ss_alt34[10]=sum(ialt34_ssch13)
+tupet_ss_alt34[11]=sum(ialt34_ssch14)
+tupet_ss_alt34[12]=sum(ialt34_ssch15)
+tupet_ss_alt34[13]=sum(ialt34_ssch16)
+tupet_ss_alt34[14]=sum(ialt34_ssch17)
+tupet_ss_alt34[15]=sum(ialt34_ssch18)
+
+
+
+
+for i in range(0,16):
+    ti=str(ssmisch[i])
+    t='tupet_ss_alt34['+str(i)+']=sum(ialt34_ssch'+ti+')'
+    print t
+
+
+
+ssmisch=np.array([1,2,3,4,5,8,9,10,11,12,13,14,15,16,17,18])
+for i in range(0,16):
+    ti=str(ssmisch[i])
+    t='tup_ss_alt34['+str(i)+']=sqrt(sum(ssch'+ti+'[16,ialt34_ssch'+ti+'])/size(ssch'+ti+'[16,ialt34_ssch'+ti+'])+mean(ssch'+ti+'+[16,ialt34_ssch'+ti+']))'
+    print t
+
+
+
+
+
+
+
Index: /trunk/src/python_script/vnx.py
===================================================================
--- /trunk/src/python_script/vnx.py	(revision 6)
+++ /trunk/src/python_script/vnx.py	(revision 6)
@@ -0,0 +1,33 @@
+#grilla
+
+y11= -50
+y0, y1 = -90, 90
+dy=1.0
+yvec = arange(y0,y11,dy)
+ny = size(yvec)
+Rt=6371
+beta=math.pi/180
+R=beta*Rt 
+L=zeros(ny,float)#arc vector
+L[0]=2*math.pi*R
+for i in range(1, ny):
+    L[i]=2*math.pi*R*(i+1)
+
+nnx=zeros(ny,float)
+nnx=L/L[0]
+nnx=200/nnx
+nnx=nnx.round()
+div=np.array([1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,30,36,
+40,45,48,50,60,72,75,80,90,100,120,144,150,180,200,225,240,300,360,
+400,450,600,720,900,1200,1800,3600])
+vnx=zeros(ny,float)
+
+for i in range(0, ny):
+    a=nnx[i]
+    for j in range(0, 45):
+        b=div[j]
+        if b<=a:
+           vnx[i]=b
+
+vnx[13:40]=12
+li=(L/3600)*vnx
Index: /trunk/src/python_script/vnx1.py
===================================================================
--- /trunk/src/python_script/vnx1.py	(revision 6)
+++ /trunk/src/python_script/vnx1.py	(revision 6)
@@ -0,0 +1,71 @@
+vnx1=np.array([60,22.5,14.4,10,8,7.2,6,5,4.5,4,3.6,3,3,3,2.5,2.5,2.5,2,2,2,2,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.2,1.2,1.2,1.2,1.2,1.2,1.2,1,1,1,1])
+vnx1=vnx1*10
+
+[1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,30,36,
+40,45,48,50,60,72,75,80,90,100,120,144,150,180,200,225,240,300,360,
+400,450,600,720,900,1200,1800,3600]
+
+
+
+nd_mean16=zeros([ny], float)
+nd_max16=zeros([ny], float)
+nd_min16=zeros([ny], float)
+for i in range(0,ny):
+    nd_mean16[i]=mean(tbnngrid_t16[i,:])
+    nd_max16[i]=max(tbnngrid_t16[i,:])
+    nd_min16[i]=min(tbnngrid_t16[i,:])
+
+plot(nd_min16)
+plt.show()
+
+nd_lat=zeros([ny], float)
+nd_lat=sum(tbngrid_t60)
+
+##########################
+inlat = (y >= -90) & (y < -88) 
+inz = (z >= 100) & (z <= 300) 
+innn = inlat & inz
+
+zz = z[innn]
+llat=y[innn]
+llon=x[innn]
+
+plot(llon,llat)
+plt.show()
+
+tt1='point_tb_SSMIS_CH16'
+t1='scatter_point_tb_SSMIS_CH16_centre.png'
+
+
+
+# on recupere les coordonnes xy de la projection orth standard
+m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0,
+resolution = 'l')
+
+xii, yii = m1(*np.meshgrid(xvec,yvec))
+width = m1.urcrnrx - m1.llcrnrx
+height = m1.urcrnry - m1.llcrnry
+
+coef = 0.6
+width = width*coef
+height = height*coef
+
+# on fait une nouvelle projection en zoomant sur l'antarctique
+
+map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\
+llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height)
+x1,y1=map(llon,llat)
+clevs=arange(100,300,1)
+cs=map.scatter(x1,y1,16,zz,marker="o",cmap=cm.s3pcpn_l_r,vmin=100, vmax=300,alpha=0.7)
+cbar =colorbar(cs)
+plt.title(tt1)
+# draw coastlines, country boundaries, fill continents.
+map.drawcoastlines(linewidth=1)
+# draw the edge of the map projection region (the projection limb)
+map.drawmapboundary()
+# draw lat/lon grid lines every 30 degrees.
+map.drawmeridians(np.arange(0, 360, 1))
+map.drawparallels(np.arange(-90, 90, 1))
+#plt.show()
+plt.savefig(t1)
+close()
