Index: /trunk/src/scripts_Laura/calculs_SSMIS_test.py
===================================================================
--- /trunk/src/scripts_Laura/calculs_SSMIS_test.py	(revision 22)
+++ /trunk/src/scripts_Laura/calculs_SSMIS_test.py	(revision 22)
@@ -0,0 +1,649 @@
+#!/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
+from netCDF4 import Dataset
+import ffgrid2
+
+
+
+
+########################
+# EVOLUTION TEMPORELLE #
+########################
+
+## ZONE1 = Autour de "Dome C" (lon=123.23;lat=-75.06) - mois: JUNE ##
+## ch17 ##
+#bbzone_CH17_JUN = nonzero((lon17_JUN >= 120.23) & (lon17_JUN <= 126.23) & (lat17_JUN >= -78.06) & (lat17_JUN <= -72.06))
+
+## ch18 ##
+#bbzone_CH18_JUN = nonzero((lon18_JUN >= 120.23) & (lon18_JUN <= 126.23) & (lat18_JUN >= -78.06) & (lat18_JUN <= -72.06))
+
+
+## ZONE2 = Autre zone de glace de mer / de continent (lon entre -40 et -60 // lat entre -75 et -85) ##
+## ch17 ##
+bbzone_CH17_FEB = nonzero((lon17_FEB >= -60.) & (lon17_FEB <= -40.) & (lat17_FEB >= -85.) & (lat17_FEB <= -75.))
+bbzone_CH17_APR = nonzero((lon17_APR >= -60.) & (lon17_APR <= -40.) & (lat17_APR >= -85.) & (lat17_APR <= -75.))
+bbzone_CH17_MAY = nonzero((lon17_MAY >= -60.) & (lon17_MAY <= -40.) & (lat17_MAY >= -85.) & (lat17_MAY <= -75.))
+bbzone_CH17_JUN = nonzero((lon17_JUN >= -60.) & (lon17_JUN <= -40.) & (lat17_JUN >= -85.) & (lat17_JUN <= -75.))
+bbzone_CH17_JUL = nonzero((lon17_JUL >= -60.) & (lon17_JUL <= -40.) & (lat17_JUL >= -85.) & (lat17_JUL <= -75.))
+
+## ch18 ##
+#bbzone_CH18_JUN = nonzero((lon18_JUN >= -60.) & (lon18_JUN <= -40.) & (lat18_JUN >= -85.) & (lat18_JUN <= -75.))
+
+## ch 16 ##
+#bbzone_CH16_JUN = nonzero((lon16_JUN >= 120.23) & (lon16_JUN <= 126.23) & (lat16_JUN >= -78.06) & (lat16_JUN <= -72.06))
+
+
+## FEBUARY ##
+emis17_FEB_moy = np.zeros([28],float)
+tb17_FEB_moy = np.zeros([28],float)
+ts17_FEB_moy = np.zeros([28],float)
+orog17_FEB_moy = np.zeros([28],float)
+for ijr in range (0,28):
+     print 'jour=', ijr+1
+     ## ch17 ##
+     ind_jr17_FEB = np.where(jjr17_FEB[bbzone_CH17_FEB]==ijr+1)[0]
+     a = emis17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
+     b = tb17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
+     c = ts17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
+     d = orog17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
+     emis17_FEB_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
+     tb17_FEB_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
+     ts17_FEB_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
+     orog17_FEB_moy[ijr] = mean(d[nonzero((d!=-500.))])
+
+
+## APRIL ##
+emis17_APR_moy = np.zeros([30],float)
+tb17_APR_moy = np.zeros([30],float)
+ts17_APR_moy = np.zeros([30],float)
+orog17_APR_moy = np.zeros([30],float)
+for ijr in range (0,30):
+     print 'jour=', ijr+1
+     ind_jr17_APR = np.where(jjr17_APR[bbzone_CH17_APR]==ijr+1)[0]
+     a = emis17_APR[bbzone_CH17_APR][ind_jr17_APR]
+     b = tb17_APR[bbzone_CH17_APR][ind_jr17_APR]
+     c = ts17_APR[bbzone_CH17_APR][ind_jr17_APR]
+     d = orog17_APR[bbzone_CH17_APR][ind_jr17_APR]
+     emis17_APR_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
+     tb17_APR_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
+     ts17_APR_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
+     orog17_APR_moy[ijr] = mean(d[nonzero((d!=-500.))])
+
+
+## MAY ##
+emis17_MAY_moy = np.zeros([31],float)
+tb17_MAY_moy = np.zeros([31],float)
+ts17_MAY_moy = np.zeros([31],float)
+orog17_MAY_moy = np.zeros([31],float)
+for ijr in range (0,31):
+     print 'jour=', ijr+1
+     ind_jr17_MAY = np.where(jjr17_MAY[bbzone_CH17_MAY]==ijr+1)[0]
+     a = emis17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
+     b = tb17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
+     c = ts17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
+     d = orog17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
+     emis17_MAY_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
+     tb17_MAY_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
+     ts17_MAY_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
+     orog17_MAY_moy[ijr] = mean(d[nonzero((d!=-500.))])
+
+
+## JUNE ##
+emis17_JUN_moy = np.zeros([30],float)
+tb17_JUN_moy = np.zeros([30],float)
+ts17_JUN_moy = np.zeros([30],float)
+#orog17_JUN_moy = np.zeros([30],float)
+#emis18_JUN_moy = np.zeros([30],float)
+#tb18_JUN_moy = np.zeros([30],float)
+#ts18_JUN_moy = np.zeros([30],float)
+#emis16_JUN_moy = np.zeros([30],float)
+#tb16_JUN_moy = np.zeros([30],float)
+#ts16_JUN_moy = np.zeros([30],float)
+for ijr in range (0,30):
+     print 'jour=', ijr+1
+     ind_jr17_JUN = np.where(jjr17_JUN[bbzone_CH17_JUN]==ijr+1)[0]
+     a = emis17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
+     b = tb17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
+     c = ts17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
+     d = orog17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
+     emis17_JUN_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
+     tb17_JUN_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
+     ts17_JUN_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
+#     orog17_JUN_moy[ijr] = mean(d[nonzero((d!=-500.))])
+     ## ch18 ##
+#     ind_jr18 = np.where(jjr18_JUN[bbzone_CH18_JUN]==ijr+1)[0]
+#     d = emis18_JUN[bbzone_CH18_JUN][ind_jr18]
+#     e = tb18_JUN[bbzone_CH18_JUN][ind_jr18]
+#     f = ts18_JUN[bbzone_CH18_JUN][ind_jr18]
+#     emis18_JUN_moy[ijr] = mean(d[nonzero((d != -500.) & (d <= 1.))])
+#     tb18_JUN_moy[ijr] = mean(e[nonzero((e != -500.) & (e != 0.))])
+#     ts18_JUN_moy[ijr] = mean(f[nonzero((f != -500.) & (f != 0.))])
+     ## ch16 ##
+#     ind_jr16 = np.where(jjr16_JUN[bbzone_CH16_JUN]==ijr+1)[0]
+#     g = emis16_JUN[bbzone_CH16_JUN][ind_jr16]
+#     h = tb16_JUN[bbzone_CH16_JUN][ind_jr16]
+#     l = ts16_JUN[bbzone_CH16_JUN][ind_jr16]
+#     emis16_JUN_moy[ijr] = mean(g[nonzero((g != -500.) & (g <= 1.))])
+#     tb16_JUN_moy[ijr] = mean(h[nonzero((h != -500.) & (h != 0.))])
+#     ts16_JUN_moy[ijr] = mean(l[nonzero((l != -500.) & (l != 0.))])
+
+
+## JULY ##
+emis17_JUL_moy = np.zeros([31],float)
+tb17_JUL_moy = np.zeros([31],float)
+ts17_JUL_moy = np.zeros([31],float)
+orog17_JUL_moy = np.zeros([31],float)
+for ijr in range (0,31):
+     print 'jour=', ijr+1
+     ind_jr17_JUL = np.where(jjr17_JUL[bbzone_CH17_JUL]==ijr+1)[0]
+     a = emis17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
+     b = tb17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
+     c = ts17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
+     d = orog17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
+     emis17_JUL_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
+     tb17_JUL_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
+     ts17_JUL_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
+     orog17_JUL_moy[ijr] = mean(d[nonzero((d!=-500.))])
+
+
+## plot evolution temporelle ##
+## FEBUARY ##
+fig = plt.figure()
+plt.subplot(3, 1, 1)
+plt.title('FEBUARY')
+plt.plot(arange(0, 28, 1), emis17_FEB_moy, c = 'b')
+plt.ylabel('Emissivity')
+xticks(arange(0, 28, 1), arange(1, 29, 1))
+xlim (0, 28)
+grid(True)
+plt.subplot(3, 1, 2)
+plt.plot(arange(0, 28, 1), tb17_FEB_moy, c = 'g', label = 'Tb')
+ylabel('Brightness temperature')
+xticks(arange(0, 28, 1), arange(1, 29, 1))
+xlim (0, 28)
+grid(True)
+plt.subplot(3, 1, 3)
+plt.plot(arange(0, 28, 1), ts17_FEB_moy, c = 'r', label = 'Ts')
+plt.ylabel('Surface temperature')
+xticks(arange(0, 28, 1), arange(1, 29, 1))
+xlim (0, 28)
+grid(True)
+fig.show()
+
+## from APRIL to JULY ##
+emis1 = np.append(emis17_APR_moy, emis17_MAY_moy)
+emis2 = np.append(emis1, emis17_JUN_moy)
+emis17_moy = np.append(emis2, emis17_JUL_moy)
+tb1 = np.append(tb17_APR_moy, tb17_MAY_moy)
+tb2 = np.append(tb1, tb17_JUN_moy)
+tb17_moy = np.append(tb2, tb17_JUL_moy)
+ts1 = np.append(ts17_APR_moy, ts17_MAY_moy)
+ts2 = np.append(ts1, ts17_JUN_moy)
+ts17_moy = np.append(ts2, ts17_JUL_moy)
+fig = plt.figure()
+plt.subplot(3, 1, 1)
+plt.plot(arange(0, 122, 1), emis17_moy, c = 'b')
+plt.ylabel('Emissivity')
+xticks(array([0, 30, 61, 91, 122]), date[1:])
+xlim (0, 122)
+grid(True)
+plt.subplot(3, 1, 2)
+plt.plot(arange(0, 122, 1), tb17_moy, c = 'g', label = 'Tb')
+ylabel('Brightness temperature')
+xticks(array([0, 30, 61, 91, 122]), date[1:])
+xlim (0, 122)
+grid(True)
+plt.subplot(3, 1, 3)
+plt.plot(arange(0, 122, 1), ts17_moy, c = 'r', label = 'Ts')
+plt.ylabel('Surface temperature')
+xticks(array([0, 30, 61, 91, 122]), date[1:])
+xlim (0, 122)
+grid(True)
+fig.show()
+
+## JUNE ##
+## ch17 - ch18 ##
+fig=plt.figure()
+plt.subplot(3,1,1)
+plt.plot(arange(0,30,1),emis17_JUN_moy,label='91.66GHz-V',c='r')
+plt.plot(arange(0,30,1),emis18_JUN_moy,label='91.66GHz-H',c='b')
+plt.xticks(arange(1,31,1))
+grid(True)
+ylabel('emissivity')
+legend(loc=7)
+plt.title('SSMIS - JUNE 2010')
+plt.subplot(3,1,2)
+plt.plot(arange(0,30,1),tb17_JUN_moy,label='91.66GHz-V',c='r')
+plt.plot(arange(0,30,1),tb18_JUN_moy,label='91.66GHz-H',c='b')
+plt.xticks(arange(1,31,1))
+grid(True)
+ylabel('brightness temperature')
+legend(loc=7)
+plt.subplot(3,1,3)
+plt.plot(arange(0,30,1),ts17_JUN_moy,label='91.66GHz-V',c='r')
+plt.plot(arange(0,30,1),ts18_JUN_moy,label='91.66GHz-H',c='b')
+plt.xticks(arange(1,31,1))
+grid(True)
+ylabel('surface temperature')
+legend(loc=7)
+fig.show()
+## ch16 - ch17 ##
+fig=plt.figure()
+plt.subplot(3,1,1)
+plt.plot(arange(0,30,1),emis16_JUN_moy,label='37GHz-V',c='r')
+plt.plot(arange(0,30,1),emis17_JUN_moy,label='91.66GHz-V',c='g')
+plt.xticks(arange(1,31,1))
+grid(True)
+ylabel('emissivity')
+legend(loc=7)
+plt.title('SSMIS - JUNE 2010')
+plt.subplot(3,1,2)
+plt.plot(arange(0,30,1),tb16_JUN_moy,label='37GHz-V',c='r')
+plt.plot(arange(0,30,1),tb17_JUN_moy,label='91.66GHz-V',c='g')
+plt.xticks(arange(1,31,1))
+grid(True)
+ylabel('brightness temperature')
+legend(loc=7)
+plt.subplot(3,1,3)
+plt.plot(arange(0,30,1),ts16_JUN_moy,label='37GHz-V',c='r')
+plt.plot(arange(0,30,1),ts17_JUN_moy,label='91.66GHz-V',c='g')
+plt.xticks(arange(1,31,1))
+grid(True)
+ylabel('surface temperature')
+legend(loc=7)
+fig.show()
+
+
+## calcul anomalie de Tb
+## FEBUARY ##
+tb17_FEB_anom = np.zeros([28], float)
+for ijr in range (0,28):
+     print 'jour=', ijr + 1
+     tb17_FEB_anom[ijr]=tb17_FEB_moy[ijr]-mean(tb17_FEB_moy)
+
+## APRIL ##
+tb17_APR_anom = np.zeros([30], float)
+for ijr in range (0,30):
+     print 'jour=', ijr + 1
+     tb17_APR_anom[ijr]=tb17_APR_moy[ijr]-mean(tb17_APR_moy)
+
+## MAY ##
+bbnan = nonzero(isnan(tb17_MAY_moy) == False)
+tb17_MAY_anom = np.zeros([31], float)
+for ijr in range (0,31):
+     print 'jour=', ijr + 1
+     tb17_MAY_anom[ijr]=tb17_MAY_moy[ijr]-mean(tb17_MAY_moy[bbnan])
+
+## JUNE ##
+tb17_JUN_anom = np.zeros([30],float)
+#tb18_JUN_anom = np.zeros([30],float)
+for ijr in range (0,30):
+     print 'jour=', ijr + 1
+     tb17_JUN_anom[ijr]=tb17_JUN_moy[ijr]-mean(tb17_JUN_moy)
+#     tb18_JUN_anom[ijr]=tb18_JUN_moy[ijr]-mean(tb18_JUN_moy)
+
+## JULY ##
+tb17_JUL_anom = np.zeros([31],float)
+for ijr in range (0,30):
+     print 'jour=', ijr + 1
+     tb17_JUL_anom[ijr]=tb17_JUL_moy[ijr]-mean(tb17_JUL_moy)
+
+
+
+a1 = np.append(tb17_APR_anom, tb17_MAY_anom)
+a2 = np.append(a1, tb17_JUN_anom)
+tb17_month_anom = np.append(a2, tb17_JUL_anom)
+
+
+## for APRIL to JULY ##
+fig = plt.figure()
+plt.plot(arange(0, 122, 1), tb17_month_anom, c = 'k')
+plt.plot(arange(0, 122, 1), np.zeros([122]), '--', c = 'r')
+ylabel('Tb anomaly (K)')
+xlim(0, 122)
+xticks(array([0, 30, 61, 91 122]), date[1:])
+grid(True)
+plt.title('SSMIS - zone2')
+fig.show()
+
+## FEBRUARY ##
+fig = plt.figure()
+plt.plot(arange(0, 28, 1), tb17_FEB_anom, c = 'k')
+plt.plot(arange(0, 28, 1), np.zeros([28]), '--', c = 'r')
+ylabel('Tb anomaly (K)')
+xlim(0, 27)
+xticks(arange(0, 28, 1), arange(1, 29, 1))
+grid(True)
+plt.xlabel('FABRUARY')
+plt.title('SSMIS - zone2')
+fig.show()
+
+## JUNE ##
+fig=plt.figure()
+plt.plot(arange(0,30,1),tb17_JUN_anom,label='91.66Ghz-V',c='r')
+plt.plot(arange(0,30,1),tb18_JUN_anom,label='91.66GHz-H',c='b')
+plt.plot(arange(0,31,1),np.zeros([31]),'--',c='k')
+ylabel('Tb anomaly')
+legend()
+twinx().plot(arange(0,30,1),ts17_JUN_moy,label='surface temperature',c='g')
+ylabel('surface temperature')
+plt.xticks(arange(0, 30, 1), arange(1, 31, 1))
+grid(True)
+plt.title('SSMIS - JUNE 2010')
+fig.show()
+
+
+
+
+################
+# CARTOGRAPHIE #
+################
+## Etude sur l'Antarctique ##
+dx=5.
+dy=5.
+x0, x1 = -180, 180
+y0, y1 = -90, -30
+
+
+## FEBRUARY ##
+bbtb_ch17_FEB = nonzero((tb17_FEB != -500.) & (tb17_FEB != 0.))
+OUTZCH17_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),28], float)
+outzch17_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch17_FEB = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch17_FEB = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range(0,28):
+    print 'jour=', ijr+1
+    ## ch17 ##
+    ind_jr17_FEB = np.where(jjr17_FEB[bbtb_ch17_FEB] == ijr+1)[0]
+    xx = lon17_FEB[bbtb_ch17_FEB][ind_jr17_FEB]
+    yy = lat17_FEB[bbtb_ch17_FEB][ind_jr17_FEB]
+    zz = tb17_FEB[bbtb_ch17_FEB][ind_jr17_FEB]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch17_FEB = outz
+    lonch17_FEB = outx
+    latch17_FEB = outy
+    OUTZCH17_FEB[:,:,ijr] = outzch17_FEB[:,:]
+
+## APRIL ##
+bbtb_ch17_APR = nonzero((tb17_APR != -500.) & (tb17_APR != 0.))
+OUTZCH17_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),30], float)
+outzch17_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch17_APR = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch17_APR = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range(0,30):
+    print 'jour=', ijr+1
+    ## ch17 ##
+    ind_jr17_APR = np.where(jjr17_APR[bbtb_ch17_APR] == ijr+1)[0]
+    xx = lon17_APR[bbtb_ch17_APR][ind_jr17_APR]
+    yy = lat17_APR[bbtb_ch17_APR][ind_jr17_APR]
+    zz = tb17_APR[bbtb_ch17_APR][ind_jr17_APR]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch17_APR = outz
+    lonch17_APR = outx
+    latch17_APR = outy
+    OUTZCH17_APR[:,:,ijr] = outzch17_APR[:,:]
+
+## MAY ##
+bbtb_ch17_MAY = nonzero((tb17_MAY != -500.) & (tb17_MAY != 0.))
+OUTZCH17_MAY = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),31], float)
+outzch17_MAY = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch17_MAY = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch17_MAY = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range(0,31):
+    print 'jour=', ijr+1
+    ## ch17 ##
+    ind_jr17_MAY = np.where(jjr17_MAY[bbtb_ch17_MAY] == ijr+1)[0]
+    xx = lon17_MAY[bbtb_ch17_MAY][ind_jr17_MAY]
+    yy = lat17_MAY[bbtb_ch17_MAY][ind_jr17_MAY]
+    zz = tb17_MAY[bbtb_ch17_MAY][ind_jr17_MAY]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch17_MAY = outz
+    lonch17_MAY = outx
+    latch17_MAY = outy
+    OUTZCH17_MAY[:,:,ijr] = outzch17_MAY[:,:]
+
+## JUNE ##
+## ch17 ##
+bbtb_ch17_JUN = nonzero((tb17_JUN != -500.) & (tb17_JUN != 0.))
+OUTZCH17_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),30], float)
+outzch17_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch17_JUN = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch17_JUN = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+## ch18 ##
+bbemis_ch18_JUN=nonzero((emis18_JUN!=-500.)&(emis18_JUN<1.)&(emis18_JUN>0.))
+bbtb_ch18_JUN=nonzero((tb18_JUN!=-500.)&(tb18_JUN!=0.))
+OUTZCH18_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),30], float)
+outzch18_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch18_JUN=np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch18_JUN=np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range(0,30):
+    print 'jour=', ijr+1
+    ## ch17 ##
+    ind_jr17_JUN = np.where(jjr17_JUN[bbtb_ch17_JUN] == ijr+1)[0]
+    xx = lon17_JUN[bbtb_ch17_JUN][ind_jr17_JUN]
+    yy = lat17_JUN[bbtb_ch17_JUN][ind_jr17_JUN]
+    zz = tb17_JUN[bbtb_ch17_JUN][ind_jr17_JUN]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch17_JUN = outz
+    lonch17_JUN = outx
+    latch17_JUN = outy
+    OUTZCH17_JUN[:,:,ijr] = outzch17_JUN[:,:]
+    ## ch18 ##
+    ind_jr18_JUN = np.where(jjr18_JUN[bbtb_ch18_JUN] == ijr+1)[0]
+    xx = lon18_JUN[bbtb_ch18_JUN][ind_jr18_JUN]
+    yy = lat18_JUN[bbtb_ch18_JUN][ind_jr18_JUN]
+    zz = tb18_JUN[bbtb_ch18_JUN][ind_jr18_JUN]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch18_JUN = outz
+    lonch18_JUN = outx
+    latch18_JUN = outy
+    OUTZCH18_JUN[:,:,ijr] = outzch18_JUN[:,:]
+
+## JULY ##
+bbtb_ch17_JUL = nonzero((tb17_JUL != -500.) & (tb17_JUL != 0.))
+OUTZCH17_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),31], float)
+outzch17_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch17_JUL = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch17_JUL = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range(0,31):
+    print 'jour=', ijr+1
+    ## ch17 ##
+    ind_jr17_JUL = np.where(jjr17_JUL[bbtb_ch17_JUL] == ijr+1)[0]
+    xx = lon17_JUL[bbtb_ch17_JUL][ind_jr17_JUL]
+    yy = lat17_JUL[bbtb_ch17_JUL][ind_jr17_JUL]
+    zz = tb17_JUL[bbtb_ch17_JUL][ind_jr17_JUL]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch17_JUL = outz
+    lonch17_JUL = outx
+    latch17_JUL = outy
+    OUTZCH17_JUL[:,:,ijr] = outzch17_JUL[:,:]
+
+
+## calcul de la climatologie moyenne sur le mois et anomalie en chaque lon/lat ##
+## FEBRUARY ##
+mean_outzch17_FEB = np.zeros([len(latch17_FEB), len(lonch17_FEB)], float)
+for ilon in range (0,len(lonch17_FEB)):
+    for ilat in range (0,len(latch17_FEB)):
+        mean_outzch17_FEB[ilat,ilon] = mean(OUTZCH17_FEB[ilat,ilon,:])
+
+tbch17_anom_FEB = np.zeros([len(latch17_FEB),len(lonch17_FEB),28], float)
+for ijr in range (0,28):
+    tbch17_anom_FEB[:,:,ijr] = OUTZCH17_FEB[:,:,ijr] - mean_outzch17_FEB[:,:]
+
+## APRIL ##
+mean_outzch17_APR = np.zeros([len(latch17_APR), len(lonch17_APR)], float)
+for ilon in range (0,len(lonch17_APR)):
+    for ilat in range (0,len(latch17_APR)):
+        mean_outzch17_APR[ilat,ilon] = mean(OUTZCH17_APR[ilat,ilon,:])
+
+tbch17_anom_APR = np.zeros([len(latch17_APR),len(lonch17_APR),30], float)
+for ijr in range (0,30):
+    tbch17_anom_APR[:,:,ijr] = OUTZCH17_APR[:,:,ijr] - mean_outzch17_APR[:,:]
+
+## MAY ##
+mean_outzch17_MAY = np.zeros([len(latch17_MAY), len(lonch17_MAY)], float)
+for ilon in range (0,len(lonch17_MAY)):
+    for ilat in range (0,len(latch17_MAY)):
+        mean_outzch17_MAY[ilat,ilon] = mean(OUTZCH17_MAY[ilat,ilon,:])
+
+tbch17_anom_MAY = np.zeros([len(latch17_MAY),len(lonch17_MAY),31], float)
+for ijr in range (0,31):
+    tbch17_anom_MAY[:,:,ijr] = OUTZCH17_MAY[:,:,ijr] - mean_outzch17_MAY[:,:]
+
+
+## JUNE ##
+## ch17 ##
+mean_outzch17_JUN = np.zeros([len(latch17_JUN), len(lonch17_JUN)], float)
+for ilon in range (0,len(lonch17_JUN)):
+    for ilat in range (0,len(latch17_JUN)):
+        mean_outzch17_JUN[ilat,ilon] = OUTZCH17_JUN[ilat,ilon,:].mean()
+
+tbch17_anom_JUN = np.zeros([len(latch17_JUN),len(lonch17_JUN),30], float)
+for ijr in range (0,30):
+    tbch17_anom_JUN[:,:,ijr] = OUTZCH17_JUN[:,:,ijr] - mean_outzch17_JUN[:,:]
+
+## ch18 ##
+mean_outzch18_JUN = np.zeros([len(latch18_JUN), len(lonch18_JUN)], float)
+for ilon in range (0,len(lonch18_JUN)):
+    for ilat in range (0,len(latch18_JUN)):
+        mean_outzch18_JUN[ilat,ilon] = OUTZCH18_JUN[ilat,ilon,:].mean()
+
+tbch18_anom_JUN = np.zeros([len(latch18_JUN),len(lonch18_JUN),30], float)
+for ijr in range (0,30):
+    tbch18_anom_JUN[:,:,ijr] = OUTZCH18_JUN[:,:,ijr] - mean_outzch18_JUN[:,:]
+
+
+
+for ijr in range (23, 30):
+     figure()
+     plt.ion()
+     m = Basemap(llcrnrlon=-60, urcrnrlon=-40, llcrnrlat=-85, urcrnrlat=-75, projection='cyl', resolution='c', fix_aspect=True)
+     m.drawcoastlines(linewidth = 1)
+     m.drawparallels(np.arange(-85., 75., 2))
+     m.drawmeridians(np.arange(-60., -40., 2))
+     #m.fillcontinents()
+     clevs = arange(-25., 5., 0.1)
+     xii,yii = m(*np.meshgrid(lonch17_JUN, latch17_JUN))
+     cs = m.contourf(xii, yii, tbch17_anom_JUN[:,:,ijr], clevs, cmap=cm.s3pcpn_l_r)
+     cbar = colorbar(cs)
+     cbar.set_label('Tb anomaly SSMIS CH17 - JUNE')
+     xticks(np.arange(-60., -40., 2))
+     yticks(np.arange(-85., 75., 2))
+     plt.savefig('/usr/home/lahlod/twice_d/figures_output_ANTARC/SSMIS/mean_tb_anomaly_map_'+str(ijr+1)+'JUN_ch17_SSMIS_Zoom_zone2')
+
+
+figure()
+plt.ion()
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+#m.fillcontinents()
+xii,yii = m(*np.meshgrid(lonch17_FEB, latch17_FEB))
+plt.xticks(arange(-180, 200, 20))
+plt.yticks(arange(-90, -30, 20))
+## ch17 ##
+clevs = arange(150., 270., 1.)
+cs = m.contourf(xii, yii, mean_outzch17_FEB, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean Tb FEB [CH17] - SSMIS')
+## BIAIS ch17-ch18 ## 
+biais_JUN = mean_outzch17_JUN - mean_outzch18_JUN
+clevs = arange(0., 45., 1.)
+cs = m.contourf(xii, yii, biais_JUN, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Bias [CH17-CH18] of Mean Tb JUNE - SSMIS')
+
+## VARIANCE ch17 - ch18 ##
+std1 = np.zeros([len(latch17_JUN), len(lonch17_JUN)], float)
+for ilat in range (0, len(latch17_JUN)):
+    for ilon in range (0, len(lonch17_JUN)):
+        std1[ilat, ilon] = (mean_outzch17_JUN[ilat, ilon]**2)-(mean_outzch18_JUN[ilat, ilon]**2)
+
+
+N = len(lonch17_JUN)*len(latch17_JUN)
+std_JUN = std1/N
+clevs = arange(0., 25., 0.1)
+cs = m.contourf(xii, yii, std_JUN, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Stantard deviation [CH17-CH18] of Mean Tb JUNE - SSMIS')
+
+
+
+##########################
+# DIAGRAMME DE HOVMOLLER #
+##########################
+# shape(tbch17_anom_JUN) = [ilat, ilon, ijr]
+## FEBRUARY ##
+bbtranche17_FEB = nonzero((latch17_FEB >= -85.) & (latch17_FEB <= -75))
+mean_tbch17_anom_FEB = np.zeros([len(lonch17_FEB), 28], float)
+for ilon in range (0, len(lonch17_FEB)):
+    for ijr in range (0,28):
+        mean_tbch17_anom_FEB[ilon,ijr] = mean(tbch17_anom_FEB[bbtranche17_FEB][:,ilon,ijr])
+
+y_time, x_space = np.meshgrid(arange(0,28,1), lonch17_FEB)
+fig = plt.figure()
+plt.pcolor(x_space, y_time, mean_tbch17_anom_FEB, cmap=cm.s3pcpn_l_r, vmin = -10., vmax = 15.)
+plt.axis([-180., 180., 0, 28])
+cb = plt.colorbar()
+cb.set_label('Tb anomaly - SSMIS CH17')
+plt.xticks(arange(-180.,200.,40))
+plt.yticks(arange(0, 28, 1), arange (1, 29, 1))
+plt.xlabel('longitude')
+plt.ylabel('FEBRUARY 2010')
+
+## MAY ##
+bbtranche17_MAY = nonzero((latch17_MAY >= -85.) & (latch17_MAY <= -75))
+mean_tbch17_anom_MAY = np.zeros([len(lonch17_MAY), 31], float)
+for ilon in range (0, len(lonch17_MAY)):
+    for ijr in range (0,31):
+        mean_tbch17_anom_MAY[ilon,ijr] = mean(tbch17_anom_MAY[bbtranche17_MAY][:,ilon,ijr])
+
+y_time, x_space = np.meshgrid(arange(0,31,1), lonch17_MAY)
+fig = plt.figure()
+plt.pcolor(x_space, y_time, mean_tbch17_anom_MAY, cmap=cm.s3pcpn_l_r, vmin = -12., vmax = 25.)
+plt.axis([-180., 180., 0, 30])
+cb = plt.colorbar()
+cb.set_label('Tb anomaly - SSMIS CH17')
+plt.xticks(arange(-180.,200.,40))
+plt.yticks(arange(0, 30, 1), arange(1,31,1))
+plt.xlabel('longitude')
+plt.ylabel('MAY 2010')
+
+## JUNE ##
+bbtranche17_JUN = nonzero((latch17_JUN >= -85.) & (latch17_JUN <= -75))
+mean_tbch17_anom_JUN = np.zeros([len(lonch17_JUN), 30], float)
+for ilon in range (0, len(lonch17_JUN)):
+    for ijr in range (0,30):
+        mean_tbch17_anom_JUN[ilon,ijr] = tbch17_anom_JUN[bbtranche17_JUN][:,ilon,ijr].mean()
+
+
+y_time, x_space = np.meshgrid(arange(0,30,1), lonch17_APR)
+fig = plt.figure()
+plt.pcolor(x_space, y_time, mean_tbch17_anom_APR, cmap=cm.s3pcpn_l_r, vmin = -30., vmax = 25.)
+plt.axis([-180., 180., 0, 29])
+cb = plt.colorbar()
+cb.set_label('Tb anomaly - SSMIS CH17')
+plt.xticks(arange(-180.,220.,40))
+plt.yticks(arange(0, 30, 1), arange(1,31,1))
+plt.xlabel('longitude')
+plt.ylabel('JUNE 2010')
+
Index: /trunk/src/scripts_Laura/diff_polarsHV_SSMIS_test.py
===================================================================
--- /trunk/src/scripts_Laura/diff_polarsHV_SSMIS_test.py	(revision 22)
+++ /trunk/src/scripts_Laura/diff_polarsHV_SSMIS_test.py	(revision 22)
@@ -0,0 +1,426 @@
+#!/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
+from netCDF4 import Dataset
+import ffgrid2
+
+
+len_month = np.array([28, 30, 31])
+month = np.array(['FEBRUARY', 'APRIL', 'JULY'])
+################
+# CARTOGRAPHIE #
+################
+## Etude sur l'Antarctique ##
+dx = 5.
+dy = 5.
+x0, x1 = -180, 180
+y0, y1 = -90, -30
+
+
+## FEBRUARY ##
+imo = 0
+## ch12 ##
+bbemis_ch12_FEB = nonzero((emis12_FEB != -500.) & (emis12_FEB <= 1.))
+OUTZCH12_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),len_month[imo]], float)
+outzch12_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch12_FEB = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch12_FEB = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+## ch13 ##
+bbemis_ch13_FEB = nonzero((emis13_FEB != -500.) & (emis13_FEB <= 1.))
+OUTZCH13_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),len_month[imo]], float)
+outzch13_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch13_FEB = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch13_FEB = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range (0, len_month[imo]):
+    print 'jour=', ijr+1
+    ## ch12 ##
+    ind_jr12_FEB = np.where(jjr12_FEB[bbemis_ch12_FEB] == ijr+1)[0]
+    xx = lon12_FEB[bbemis_ch12_FEB][ind_jr12_FEB]
+    yy = lat12_FEB[bbemis_ch12_FEB][ind_jr12_FEB]
+    zz = emis12_FEB[bbemis_ch12_FEB][ind_jr12_FEB]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch12_FEB = outz
+    lonch12_FEB = outx
+    latch12_FEB = outy
+    OUTZCH12_FEB[:,:,ijr] = outzch12_FEB[:,:]
+    ## ch13 ##
+    ind_jr13_FEB = np.where(jjr13_FEB[bbemis_ch13_FEB] == ijr+1)[0]
+    xx = lon13_FEB[bbemis_ch13_FEB][ind_jr13_FEB]
+    yy = lat13_FEB[bbemis_ch13_FEB][ind_jr13_FEB]
+    zz = emis13_FEB[bbemis_ch13_FEB][ind_jr13_FEB]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch13_FEB = outz
+    lonch13_FEB = outx
+    latch13_FEB = outy
+    OUTZCH13_FEB[:,:,ijr] = outzch13_FEB[:,:]
+
+## APRIL ##
+imo = 1
+## ch12 ##
+bbemis_ch12_APR = nonzero((emis12_APR != -500.) & (emis12_APR <= 1.))
+OUTZCH12_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),len_month[imo]], float)
+outzch12_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch12_APR = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch12_APR = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+## ch13 ##
+bbemis_ch13_APR = nonzero((emis13_APR != -500.) & (emis13_APR <= 1.))
+OUTZCH13_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),len_month[imo]], float)
+outzch13_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch13_APR = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch13_APR = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range (0, len_month[imo]):
+    print 'jour=', ijr+1
+    ## ch12 ##
+    ind_jr12_APR = np.where(jjr12_APR[bbemis_ch12_APR] == ijr+1)[0]
+    xx = lon12_APR[bbemis_ch12_APR][ind_jr12_APR]
+    yy = lat12_APR[bbemis_ch12_APR][ind_jr12_APR]
+    zz = emis12_APR[bbemis_ch12_APR][ind_jr12_APR]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch12_APR = outz
+    lonch12_APR = outx
+    latch12_APR = outy
+    OUTZCH12_APR[:,:,ijr] = outzch13_APR[:,:]
+    ## ch13 ##
+    ind_jr13_APR = np.where(jjr13_APR[bbemis_ch13_APR] == ijr+1)[0]
+    xx = lon13_APR[bbemis_ch13_APR][ind_jr13_APR]
+    yy = lat13_APR[bbemis_ch13_APR][ind_jr13_APR]
+    zz = emis13_APR[bbemis_ch13_APR][ind_jr13_APR]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch13_APR = outz
+    lonch13_APR = outx
+    latch13_APR = outy
+    OUTZCH13_APR[:,:,ijr] = outzch13_APR[:,:]
+
+
+
+
+## JULY ##
+imo = 2
+## ch12 ##
+bbemis_ch12_JUL = nonzero((emis12_JUL != -500.) & (emis12_JUL <= 1.))
+OUTZCH12_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),len_month[imo]], float)
+outzch12_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch12_JUL = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch12_JUL = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+## ch13 ##
+bbemis_ch13_JUL = nonzero((emis13_JUL != -500.) & (emis13_JUL <= 1.))
+OUTZCH13_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),len_month[imo]], float)
+outzch13_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
+lonch13_JUL = np.zeros([len(np.arange(x0, x1+1, dx))], float)
+latch13_JUL = np.zeros([len(np.arange(y0, y1+1, dy))], float)
+for ijr in range (0, len_month[imo]):
+    print 'jour=', ijr+1
+    ## ch12 ##
+    ind_jr12_JUL = np.where(jjr12_JUL[bbemis_ch12_JUL] == ijr+1)[0]
+    xx = lon12_JUL[bbemis_ch12_JUL][ind_jr12_JUL]
+    yy = lat12_JUL[bbemis_ch12_JUL][ind_jr12_JUL]
+    zz = emis12_JUL[bbemis_ch12_JUL][ind_jr12_JUL]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch12_JUL = outz
+    lonch12_JUL = outx
+    latch12_JUL = outy
+    OUTZCH12_JUL[:,:,ijr] = outzch12_JUL[:,:]
+    ## ch13 ##
+    ind_jr13_JUL = np.where(jjr13_JUL[bbemis_ch13_JUL] == ijr+1)[0]
+    xx = lon13_JUL[bbemis_ch13_JUL][ind_jr13_JUL]
+    yy = lat12_JUL[bbemis_ch13_JUL][ind_jr13_JUL]
+    zz = emis13_JUL[bbemis_ch13_JUL][ind_jr13_JUL]
+    zz0 = min(zz)
+    zz1 = max(zz)
+    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
+    outzch13_JUL = outz
+    lonch13_JUL = outx
+    latch13_JUL = outy
+    OUTZCH13_JUL[:,:,ijr] = outzch13_JUL[:,:]
+
+
+#######################################
+## calcul de la climatologie moyenne ##
+#######################################
+
+## FEBRUARY ##
+## ch12 ##
+mean_outzch12_FEB = np.zeros([len(latch12_FEB), len(lonch12_FEB)], float)
+for ilon in range (0, len(lonch12_FEB)):
+    for ilat in range (0, len(latch12_FEB)):
+        mean_outzch12_FEB[ilat, ilon] = mean(OUTZCH12_FEB[ilat, ilon, :])
+
+## ch13 ##
+mean_outzch13_FEB = np.zeros([len(latch13_FEB), len(lonch13_FEB)], float)
+for ilon in range (0, len(lonch13_FEB)):
+    for ilat in range (0, len(latch13_FEB)):
+        mean_outzch13_FEB[ilat, ilon] = mean(OUTZCH13_FEB[ilat, ilon, :])
+
+
+## APRIL ##
+## ch12 ##
+mean_outzch12_APR = np.zeros([len(latch12_APR), len(lonch12_APR)], float)
+for ilon in range (0, len(lonch12_APR)):
+    for ilat in range (0, len(latch12_APR)):
+        mean_outzch12_APR[ilat, ilon] = mean(OUTZCH12_APR[ilat, ilon, :][nonzero(isnan(OUTZCH12_APR[ilat, ilon, :]) == False)])
+
+## ch13 ##
+mean_outzch13_APR = np.zeros([len(latch13_APR), len(lonch13_APR)], float)
+for ilon in range (0, len(lonch13_APR)):
+    for ilat in range (0, len(latch13_APR)):
+        mean_outzch13_APR[ilat, ilon] = mean(OUTZCH13_APR[ilat, ilon, :][nonzero(isnan(OUTZCH13_APR[ilat, ilon, :]) == False)])
+
+
+
+## JULY ##
+## ch12 ##
+mean_outzch12_JUL = np.zeros([len(latch12_JUL), len(lonch12_JUL)], float)
+for ilon in range (0, len(lonch12_JUL)):
+    for ilat in range (0, len(latch12_JUL)):
+        mean_outzch12_JUL[ilat, ilon] = mean(OUTZCH12_JUL[ilat, ilon, :][nonzero(isnan(OUTZCH12_JUL[ilat, ilon, :]) == False)])
+
+## ch13 ##
+mean_outzch13_JUL = np.zeros([len(latch13_JUL), len(lonch13_JUL)], float)
+for ilon in range (0, len(lonch13_JUL)):
+    for ilat in range (0, len(latch13_JUL)):
+        mean_outzch13_JUL[ilat, ilon] = mean(OUTZCH13_JUL[ilat, ilon, :][nonzero(isnan(OUTZCH13_JUL[ilat, ilon, :]) == False)])
+
+
+##################
+## cartographie ##
+##################
+lon = lonch12_FEB = lonch12_APR = lonch12_JUL = lonch13_FEB = lonch13_APR = lonch13_JUL
+lat = latch12_FEB = latch12_APR = latch12_JUL = latch13_FEB = latch13_APR = latch13_JUL
+
+## FEBRUARY ##
+figure()
+plt.ion()
+## ch12 ##
+subplot(2,1,1)
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+xii,yii = m(*np.meshgrid(lon, lat))
+clevs = arange(0.3, 1., 0.001)
+cs = m.contourf(xii, yii, mean_outzch12_FEB, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean emissivity FEB [CH12] - SSMIS')
+## ch13 ##
+subplot(2,1,2)
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+clevs = arange(0.3, 1., 0.001)
+cs = m.contourf(xii, yii, mean_outzch13_FEB, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean emissivity FEB [CH13] - SSMIS')
+## BIAIS ch12-ch13 ##
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+biais_FEB = mean_outzch12_FEB - mean_outzch13_FEB
+clevs = arange(-0.35, 0., 0.001)
+cs = m.contourf(xii, yii, biais_FEB, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Bias of Mean emissivity FEB [CH12-CH13] - SSMIS')
+## VARIANCE ch12 - ch13 ##
+stddev = np.zeros([len(lat), len(lon)], float)
+N = len(lon)*len(lat)
+for ilat in range (0, len(lat)):
+    for ilon in range (0, len(lon)):
+        stddev[ilat, ilon] =(mean_outzch12_FEB[ilat, ilon]-mean_outzch13_FEB[ilat, ilon])**2
+
+std_FEB = sqrt(stddev/N)
+figure ()
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+clevs = arange(0., 0.01, 0.0001)
+cs = m.contourf(xii, yii, std_FEB, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Stantard deviation of Mean emissivity FEB [CH12-CH13] - SSMIS')
+
+
+## JULY ##
+figure()
+plt.ion()
+## ch12 ##
+subplot(2,1,1)
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+xii,yii = m(*np.meshgrid(lon, lat))
+clevs = arange(0.3, 1., 0.001)
+cs = m.contourf(xii, yii, mean_outzch12_JUL, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean emissivity JUL [CH12] - SSMIS')
+## ch13 ##
+subplot(2,1,2)
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+clevs = arange(0.3, 1., 0.001)
+cs = m.contourf(xii, yii, mean_outzch13_JUL, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean emissivity JUL [CH13] - SSMIS')
+## BIAIS ch12-ch13 ##
+figure()
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+biais_JUL = mean_outzch12_JUL - mean_outzch13_JUL
+clevs = arange(-0.30, 0., 0.001)
+cs = m.contourf(xii, yii, biais_JUL, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Bias of Mean emissivity JUL [CH12-CH13] - SSMIS')
+## VARIANCE ch12 - ch13 ##
+stddev = np.zeros([len(lat), len(lon)], float)
+N = len(lon)*len(lat)
+for ilat in range (0, len(lat)):
+    for ilon in range (0, len(lon)):
+        stddev[ilat, ilon] =(mean_outzch12_JUL[ilat, ilon]-mean_outzch13_JUL[ilat, ilon])**2
+
+std_JUL = sqrt(stddev/N)
+figure ()
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+clevs = arange(0., 0.01, 0.0001)
+cs = m.contourf(xii, yii, std_JUL, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Stantard deviation of Mean emissivity JUL [CH12-CH13] - SSMIS')
+
+
+## APRIL ##
+figure()
+plt.ion()
+## ch12 ##
+subplot(2,1,1)
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+xii,yii = m(*np.meshgrid(lon, lat))
+clevs = arange(0.5, 1., 0.001)
+cs = m.contourf(xii, yii, mean_outzch12_APR, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean emissivity APR [CH12] - SSMIS')
+## ch13 ##
+subplot(2,1,2)
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+clevs = arange(0.5, 1., 0.001)
+cs = m.contourf(xii, yii, mean_outzch13_APR, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Mean emissivity APR [CH13] - SSMIS')
+## BIAIS ch12-ch13 ##
+figure()
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+biais_APR = mean_outzch12_APR - mean_outzch13_APR
+clevs = arange(-0.04, -0.017, 0.0001)
+cs = m.contourf(xii, yii, biais_APR, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Bias of Mean emissivity APR [CH12-CH13] - SSMIS')
+## VARIANCE ch12 - ch13 ##
+stddev = np.zeros([len(lat), len(lon)], float)
+N = len(lon)*len(lat)
+for ilat in range (0, len(lat)):
+    for ilon in range (0, len(lon)):
+        stddev[ilat, ilon] =(mean_outzch12_APR[ilat, ilon] - mean_outzch13_APR[ilat, ilon])**2
+
+std_APR = sqrt(stddev/N)
+figure ()
+m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
+m.drawcoastlines(linewidth = 1)
+m.drawparallels(np.arange(-90., -30., 20))
+m.drawmeridians(np.arange(-180., 180., 20))
+clevs = arange(0., 0.0015, 0.00001)
+cs = m.contourf(xii, yii, std_APR, clevs, cmap=cm.s3pcpn_l_r)
+cbar = colorbar(cs)
+cbar.set_label('Stantard deviation of Mean emissivity APR [CH12-CH13] - SSMIS')
+
+
+##########################
+# DIAGRAMME DE HOVMOLLER #
+##########################
+# shape(tbch17_anom_JUN) = [ilat, ilon, ijr]
+## sur la bande de latitude (-80Â° / -85Â°)
+## FEBRUARY ##
+imo = 0
+bbtranche_FEB = nonzero((lat >= -85.) & (lat <= -80))
+mean_std_FEB = np.zeros([len(lon), len_month[imo]], float)
+for ilon in range (0, len(lon)):
+    for ijr in range (0,len_month[imo]):
+        mean_std_FEB[ilon,ijr] = mean(std_FEB[bbtranche_FEB][:,ilon,ijr])
+
+y_time, x_space = np.meshgrid(arange(0, len_month[imo], 1), lon)
+fig = plt.figure()
+plt.pcolor(x_space, y_time, mean_std_FEB, cmap=cm.s3pcpn_l_r, vmin = -10., vmax = 15.)
+plt.axis([-180., 180., 0, 28])
+cb = plt.colorbar()
+cb.set_label('std of emissivity - FEB SSMIS CH17')
+plt.xticks(arange(-180.,200.,40))
+plt.yticks(arange(0, 28, 1), arange (1, 29, 1))
+plt.xlabel('longitude')
+plt.ylabel('FEBRUARY 2010')
+
+## MAY ##
+bbtranche17_MAY = nonzero((latch17_MAY >= -85.) & (latch17_MAY <= -75))
+mean_tbch17_anom_MAY = np.zeros([len(lonch17_MAY), 31], float)
+for ilon in range (0, len(lonch17_MAY)):
+    for ijr in range (0,31):
+        mean_tbch17_anom_MAY[ilon,ijr] = mean(tbch17_anom_MAY[bbtranche17_MAY][:,ilon,ijr])
+
+y_time, x_space = np.meshgrid(arange(0,31,1), lonch17_MAY)
+fig = plt.figure()
+plt.pcolor(x_space, y_time, mean_tbch17_anom_MAY, cmap=cm.s3pcpn_l_r, vmin = -12., vmax = 25.)
+plt.axis([-180., 180., 0, 30])
+cb = plt.colorbar()
+cb.set_label('Tb anomaly - SSMIS CH17')
+plt.xticks(arange(-180.,200.,40))
+plt.yticks(arange(0, 30, 1), arange(1,31,1))
+plt.xlabel('longitude')
+plt.ylabel('MAY 2010')
+
+## JUNE ##
+bbtranche17_JUN = nonzero((latch17_JUN >= -85.) & (latch17_JUN <= -75))
+mean_tbch17_anom_JUN = np.zeros([len(lonch17_JUN), 30], float)
+for ilon in range (0, len(lonch17_JUN)):
+    for ijr in range (0,30):
+        mean_tbch17_anom_JUN[ilon,ijr] = tbch17_anom_JUN[bbtranche17_JUN][:,ilon,ijr].mean()
+
+
+y_time, x_space = np.meshgrid(arange(0,30,1), lonch17_APR)
+fig = plt.figure()
+plt.pcolor(x_space, y_time, mean_tbch17_anom_APR, cmap=cm.s3pcpn_l_r, vmin = -30., vmax = 25.)
+plt.axis([-180., 180., 0, 29])
+cb = plt.colorbar()
+cb.set_label('Tb anomaly - SSMIS CH17')
+plt.xticks(arange(-180.,220.,40))
+plt.yticks(arange(0, 30, 1), arange(1,31,1))
+plt.xlabel('longitude')
+plt.ylabel('JUNE 2010')
+
Index: /trunk/src/scripts_Laura/read_SSMIS_test.py
===================================================================
--- /trunk/src/scripts_Laura/read_SSMIS_test.py	(revision 21)
+++ /trunk/src/scripts_Laura/read_SSMIS_test.py	(revision 22)
@@ -323,637 +323,190 @@
 
 
-########################
-# EVOLUTION TEMPORELLE #
-########################
-
-## ZONE1 = Autour de "Dome C" (lon=123.23;lat=-75.06) - mois: JUNE ##
-## ch17 ##
-#bbzone_CH17_JUN = nonzero((lon17_JUN >= 120.23) & (lon17_JUN <= 126.23) & (lat17_JUN >= -78.06) & (lat17_JUN <= -72.06))
-
-## ch18 ##
-#bbzone_CH18_JUN = nonzero((lon18_JUN >= 120.23) & (lon18_JUN <= 126.23) & (lat18_JUN >= -78.06) & (lat18_JUN <= -72.06))
-
-
-## ZONE2 = Autre zone de glace de mer / de continent (lon entre -40 et -60 // lat entre -75 et -85) ##
-## ch17 ##
-bbzone_CH17_FEB = nonzero((lon17_FEB >= -60.) & (lon17_FEB <= -40.) & (lat17_FEB >= -85.) & (lat17_FEB <= -75.))
-bbzone_CH17_APR = nonzero((lon17_APR >= -60.) & (lon17_APR <= -40.) & (lat17_APR >= -85.) & (lat17_APR <= -75.))
-bbzone_CH17_MAY = nonzero((lon17_MAY >= -60.) & (lon17_MAY <= -40.) & (lat17_MAY >= -85.) & (lat17_MAY <= -75.))
-bbzone_CH17_JUN = nonzero((lon17_JUN >= -60.) & (lon17_JUN <= -40.) & (lat17_JUN >= -85.) & (lat17_JUN <= -75.))
-bbzone_CH17_JUL = nonzero((lon17_JUL >= -60.) & (lon17_JUL <= -40.) & (lat17_JUL >= -85.) & (lat17_JUL <= -75.))
-
-## ch18 ##
-#bbzone_CH18_JUN = nonzero((lon18_JUN >= -60.) & (lon18_JUN <= -40.) & (lat18_JUN >= -85.) & (lat18_JUN <= -75.))
-
-## ch 16 ##
-#bbzone_CH16_JUN = nonzero((lon16_JUN >= 120.23) & (lon16_JUN <= 126.23) & (lat16_JUN >= -78.06) & (lat16_JUN <= -72.06))
-
-
-## FEBUARY ##
-emis17_FEB_moy = np.zeros([28],float)
-tb17_FEB_moy = np.zeros([28],float)
-ts17_FEB_moy = np.zeros([28],float)
-orog17_FEB_moy = np.zeros([28],float)
-for ijr in range (0,28):
-     print 'jour=', ijr+1
-     ## ch17 ##
-     ind_jr17_FEB = np.where(jjr17_FEB[bbzone_CH17_FEB]==ijr+1)[0]
-     a = emis17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
-     b = tb17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
-     c = ts17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
-     d = orog17_FEB[bbzone_CH17_FEB][ind_jr17_FEB]
-     emis17_FEB_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
-     tb17_FEB_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
-     ts17_FEB_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
-     orog17_FEB_moy[ijr] = mean(d[nonzero((d!=-500.))])
-
-
-## APRIL ##
-emis17_APR_moy = np.zeros([30],float)
-tb17_APR_moy = np.zeros([30],float)
-ts17_APR_moy = np.zeros([30],float)
-orog17_APR_moy = np.zeros([30],float)
-for ijr in range (0,30):
-     print 'jour=', ijr+1
-     ind_jr17_APR = np.where(jjr17_APR[bbzone_CH17_APR]==ijr+1)[0]
-     a = emis17_APR[bbzone_CH17_APR][ind_jr17_APR]
-     b = tb17_APR[bbzone_CH17_APR][ind_jr17_APR]
-     c = ts17_APR[bbzone_CH17_APR][ind_jr17_APR]
-     d = orog17_APR[bbzone_CH17_APR][ind_jr17_APR]
-     emis17_APR_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
-     tb17_APR_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
-     ts17_APR_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
-     orog17_APR_moy[ijr] = mean(d[nonzero((d!=-500.))])
-
-
-## MAY ##
-emis17_MAY_moy = np.zeros([31],float)
-tb17_MAY_moy = np.zeros([31],float)
-ts17_MAY_moy = np.zeros([31],float)
-orog17_MAY_moy = np.zeros([31],float)
-for ijr in range (0,31):
-     print 'jour=', ijr+1
-     ind_jr17_MAY = np.where(jjr17_MAY[bbzone_CH17_MAY]==ijr+1)[0]
-     a = emis17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
-     b = tb17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
-     c = ts17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
-     d = orog17_MAY[bbzone_CH17_MAY][ind_jr17_MAY]
-     emis17_MAY_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
-     tb17_MAY_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
-     ts17_MAY_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
-     orog17_MAY_moy[ijr] = mean(d[nonzero((d!=-500.))])
-
-
-## JUNE ##
-emis17_JUN_moy = np.zeros([30],float)
-tb17_JUN_moy = np.zeros([30],float)
-ts17_JUN_moy = np.zeros([30],float)
-#orog17_JUN_moy = np.zeros([30],float)
-#emis18_JUN_moy = np.zeros([30],float)
-#tb18_JUN_moy = np.zeros([30],float)
-#ts18_JUN_moy = np.zeros([30],float)
-#emis16_JUN_moy = np.zeros([30],float)
-#tb16_JUN_moy = np.zeros([30],float)
-#ts16_JUN_moy = np.zeros([30],float)
-for ijr in range (0,30):
-     print 'jour=', ijr+1
-     ind_jr17_JUN = np.where(jjr17_JUN[bbzone_CH17_JUN]==ijr+1)[0]
-     a = emis17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
-     b = tb17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
-     c = ts17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
-     d = orog17_JUN[bbzone_CH17_JUN][ind_jr17_JUN]
-     emis17_JUN_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
-     tb17_JUN_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
-     ts17_JUN_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
-#     orog17_JUN_moy[ijr] = mean(d[nonzero((d!=-500.))])
-     ## ch18 ##
-#     ind_jr18 = np.where(jjr18_JUN[bbzone_CH18_JUN]==ijr+1)[0]
-#     d = emis18_JUN[bbzone_CH18_JUN][ind_jr18]
-#     e = tb18_JUN[bbzone_CH18_JUN][ind_jr18]
-#     f = ts18_JUN[bbzone_CH18_JUN][ind_jr18]
-#     emis18_JUN_moy[ijr] = mean(d[nonzero((d != -500.) & (d <= 1.))])
-#     tb18_JUN_moy[ijr] = mean(e[nonzero((e != -500.) & (e != 0.))])
-#     ts18_JUN_moy[ijr] = mean(f[nonzero((f != -500.) & (f != 0.))])
-     ## ch16 ##
-#     ind_jr16 = np.where(jjr16_JUN[bbzone_CH16_JUN]==ijr+1)[0]
-#     g = emis16_JUN[bbzone_CH16_JUN][ind_jr16]
-#     h = tb16_JUN[bbzone_CH16_JUN][ind_jr16]
-#     l = ts16_JUN[bbzone_CH16_JUN][ind_jr16]
-#     emis16_JUN_moy[ijr] = mean(g[nonzero((g != -500.) & (g <= 1.))])
-#     tb16_JUN_moy[ijr] = mean(h[nonzero((h != -500.) & (h != 0.))])
-#     ts16_JUN_moy[ijr] = mean(l[nonzero((l != -500.) & (l != 0.))])
-
-
-## JULY ##
-emis17_JUL_moy = np.zeros([31],float)
-tb17_JUL_moy = np.zeros([31],float)
-ts17_JUL_moy = np.zeros([31],float)
-orog17_JUL_moy = np.zeros([31],float)
-for ijr in range (0,31):
-     print 'jour=', ijr+1
-     ind_jr17_JUL = np.where(jjr17_JUL[bbzone_CH17_JUL]==ijr+1)[0]
-     a = emis17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
-     b = tb17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
-     c = ts17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
-     d = orog17_JUL[bbzone_CH17_JUL][ind_jr17_JUL]
-     emis17_JUL_moy[ijr] = mean(a[nonzero((a!=-500.)&(a<=1.))])
-     tb17_JUL_moy[ijr] = mean(b[nonzero((b!=-500.)&(b!=0.))])
-     ts17_JUL_moy[ijr] = mean(c[nonzero((c!=-500.)&(c!=0.))])
-     orog17_JUL_moy[ijr] = mean(d[nonzero((d!=-500.))])
-
-
-## plot evolution temporelle ##
-## FEBUARY ##
-fig = plt.figure()
-plt.subplot(3, 1, 1)
-plt.title('FEBUARY')
-plt.plot(arange(0, 28, 1), emis17_FEB_moy, c = 'b')
-plt.ylabel('Emissivity')
-xticks(arange(0, 28, 1), arange(1, 29, 1))
-xlim (0, 28)
-grid(True)
-plt.subplot(3, 1, 2)
-plt.plot(arange(0, 28, 1), tb17_FEB_moy, c = 'g', label = 'Tb')
-ylabel('Brightness temperature')
-xticks(arange(0, 28, 1), arange(1, 29, 1))
-xlim (0, 28)
-grid(True)
-plt.subplot(3, 1, 3)
-plt.plot(arange(0, 28, 1), ts17_FEB_moy, c = 'r', label = 'Ts')
-plt.ylabel('Surface temperature')
-xticks(arange(0, 28, 1), arange(1, 29, 1))
-xlim (0, 28)
-grid(True)
-fig.show()
-
-## from APRIL to JULY ##
-emis1 = np.append(emis17_APR_moy, emis17_MAY_moy)
-emis2 = np.append(emis1, emis17_JUN_moy)
-emis17_moy = np.append(emis2, emis17_JUL_moy)
-tb1 = np.append(tb17_APR_moy, tb17_MAY_moy)
-tb2 = np.append(tb1, tb17_JUN_moy)
-tb17_moy = np.append(tb2, tb17_JUL_moy)
-ts1 = np.append(ts17_APR_moy, ts17_MAY_moy)
-ts2 = np.append(ts1, ts17_JUN_moy)
-ts17_moy = np.append(ts2, ts17_JUL_moy)
-fig = plt.figure()
-plt.subplot(3, 1, 1)
-plt.plot(arange(0, 122, 1), emis17_moy, c = 'b')
-plt.ylabel('Emissivity')
-xticks(array([0, 30, 61, 91, 122]), date[1:])
-xlim (0, 122)
-grid(True)
-plt.subplot(3, 1, 2)
-plt.plot(arange(0, 122, 1), tb17_moy, c = 'g', label = 'Tb')
-ylabel('Brightness temperature')
-xticks(array([0, 30, 61, 91, 122]), date[1:])
-xlim (0, 122)
-grid(True)
-plt.subplot(3, 1, 3)
-plt.plot(arange(0, 122, 1), ts17_moy, c = 'r', label = 'Ts')
-plt.ylabel('Surface temperature')
-xticks(array([0, 30, 61, 91, 122]), date[1:])
-xlim (0, 122)
-grid(True)
-fig.show()
-
-## JUNE ##
-## ch17 - ch18 ##
-fig=plt.figure()
-plt.subplot(3,1,1)
-plt.plot(arange(0,30,1),emis17_JUN_moy,label='91.66GHz-V',c='r')
-plt.plot(arange(0,30,1),emis18_JUN_moy,label='91.66GHz-H',c='b')
-plt.xticks(arange(1,31,1))
-grid(True)
-ylabel('emissivity')
-legend(loc=7)
-plt.title('SSMIS - JUNE 2010')
-plt.subplot(3,1,2)
-plt.plot(arange(0,30,1),tb17_JUN_moy,label='91.66GHz-V',c='r')
-plt.plot(arange(0,30,1),tb18_JUN_moy,label='91.66GHz-H',c='b')
-plt.xticks(arange(1,31,1))
-grid(True)
-ylabel('brightness temperature')
-legend(loc=7)
-plt.subplot(3,1,3)
-plt.plot(arange(0,30,1),ts17_JUN_moy,label='91.66GHz-V',c='r')
-plt.plot(arange(0,30,1),ts18_JUN_moy,label='91.66GHz-H',c='b')
-plt.xticks(arange(1,31,1))
-grid(True)
-ylabel('surface temperature')
-legend(loc=7)
-fig.show()
-## ch16 - ch17 ##
-fig=plt.figure()
-plt.subplot(3,1,1)
-plt.plot(arange(0,30,1),emis16_JUN_moy,label='37GHz-V',c='r')
-plt.plot(arange(0,30,1),emis17_JUN_moy,label='91.66GHz-V',c='g')
-plt.xticks(arange(1,31,1))
-grid(True)
-ylabel('emissivity')
-legend(loc=7)
-plt.title('SSMIS - JUNE 2010')
-plt.subplot(3,1,2)
-plt.plot(arange(0,30,1),tb16_JUN_moy,label='37GHz-V',c='r')
-plt.plot(arange(0,30,1),tb17_JUN_moy,label='91.66GHz-V',c='g')
-plt.xticks(arange(1,31,1))
-grid(True)
-ylabel('brightness temperature')
-legend(loc=7)
-plt.subplot(3,1,3)
-plt.plot(arange(0,30,1),ts16_JUN_moy,label='37GHz-V',c='r')
-plt.plot(arange(0,30,1),ts17_JUN_moy,label='91.66GHz-V',c='g')
-plt.xticks(arange(1,31,1))
-grid(True)
-ylabel('surface temperature')
-legend(loc=7)
-fig.show()
-
-
-## calcul anomalie de Tb
-## FEBUARY ##
-tb17_FEB_anom = np.zeros([28], float)
-for ijr in range (0,28):
-     print 'jour=', ijr + 1
-     tb17_FEB_anom[ijr]=tb17_FEB_moy[ijr]-mean(tb17_FEB_moy)
-
-## APRIL ##
-tb17_APR_anom = np.zeros([30], float)
-for ijr in range (0,30):
-     print 'jour=', ijr + 1
-     tb17_APR_anom[ijr]=tb17_APR_moy[ijr]-mean(tb17_APR_moy)
-
-## MAY ##
-bbnan = nonzero(isnan(tb17_MAY_moy) == False)
-tb17_MAY_anom = np.zeros([31], float)
-for ijr in range (0,31):
-     print 'jour=', ijr + 1
-     tb17_MAY_anom[ijr]=tb17_MAY_moy[ijr]-mean(tb17_MAY_moy[bbnan])
-
-## JUNE ##
-tb17_JUN_anom = np.zeros([30],float)
-#tb18_JUN_anom = np.zeros([30],float)
-for ijr in range (0,30):
-     print 'jour=', ijr + 1
-     tb17_JUN_anom[ijr]=tb17_JUN_moy[ijr]-mean(tb17_JUN_moy)
-#     tb18_JUN_anom[ijr]=tb18_JUN_moy[ijr]-mean(tb18_JUN_moy)
-
-## JULY ##
-tb17_JUL_anom = np.zeros([31],float)
-for ijr in range (0,30):
-     print 'jour=', ijr + 1
-     tb17_JUL_anom[ijr]=tb17_JUL_moy[ijr]-mean(tb17_JUL_moy)
-
-
-
-a1 = np.append(tb17_APR_anom, tb17_MAY_anom)
-a2 = np.append(a1, tb17_JUN_anom)
-tb17_month_anom = np.append(a2, tb17_JUL_anom)
-
-
-## for APRIL to JULY ##
-fig = plt.figure()
-plt.plot(arange(0, 122, 1), tb17_month_anom, c = 'k')
-plt.plot(arange(0, 122, 1), np.zeros([122]), '--', c = 'r')
-ylabel('Tb anomaly (K)')
-xlim(0, 122)
-xticks(array([0, 30, 61, 91 122]), date[1:])
-grid(True)
-plt.title('SSMIS - zone2')
-fig.show()
-
-## FEBRUARY ##
-fig = plt.figure()
-plt.plot(arange(0, 28, 1), tb17_FEB_anom, c = 'k')
-plt.plot(arange(0, 28, 1), np.zeros([28]), '--', c = 'r')
-ylabel('Tb anomaly (K)')
-xlim(0, 27)
-xticks(arange(0, 28, 1), arange(1, 29, 1))
-grid(True)
-plt.xlabel('FABRUARY')
-plt.title('SSMIS - zone2')
-fig.show()
-
-## JUNE ##
-fig=plt.figure()
-plt.plot(arange(0,30,1),tb17_JUN_anom,label='91.66Ghz-V',c='r')
-plt.plot(arange(0,30,1),tb18_JUN_anom,label='91.66GHz-H',c='b')
-plt.plot(arange(0,31,1),np.zeros([31]),'--',c='k')
-ylabel('Tb anomaly')
-legend()
-twinx().plot(arange(0,30,1),ts17_JUN_moy,label='surface temperature',c='g')
-ylabel('surface temperature')
-plt.xticks(arange(0, 30, 1), arange(1, 31, 1))
-grid(True)
-plt.title('SSMIS - JUNE 2010')
-fig.show()
-
-
-
-
-################
-# CARTOGRAPHIE #
-################
-## Etude sur l'Antarctique ##
-dx=5.
-dy=5.
-x0, x1 = -180, 180
-y0, y1 = -90, -30
-
-
-## FEBRUARY ##
-bbtb_ch17_FEB = nonzero((tb17_FEB != -500.) & (tb17_FEB != 0.))
-OUTZCH17_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),28], float)
-outzch17_FEB = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
-lonch17_FEB = np.zeros([len(np.arange(x0, x1+1, dx))], float)
-latch17_FEB = np.zeros([len(np.arange(y0, y1+1, dy))], float)
-for ijr in range(0,28):
-    print 'jour=', ijr+1
-    ## ch17 ##
-    ind_jr17_FEB = np.where(jjr17_FEB[bbtb_ch17_FEB] == ijr+1)[0]
-    xx = lon17_FEB[bbtb_ch17_FEB][ind_jr17_FEB]
-    yy = lat17_FEB[bbtb_ch17_FEB][ind_jr17_FEB]
-    zz = tb17_FEB[bbtb_ch17_FEB][ind_jr17_FEB]
-    zz0 = min(zz)
-    zz1 = max(zz)
-    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
-    outzch17_FEB = outz
-    lonch17_FEB = outx
-    latch17_FEB = outy
-    OUTZCH17_FEB[:,:,ijr] = outzch17_FEB[:,:]
-
-## APRIL ##
-bbtb_ch17_APR = nonzero((tb17_APR != -500.) & (tb17_APR != 0.))
-OUTZCH17_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),30], float)
-outzch17_APR = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
-lonch17_APR = np.zeros([len(np.arange(x0, x1+1, dx))], float)
-latch17_APR = np.zeros([len(np.arange(y0, y1+1, dy))], float)
-for ijr in range(0,30):
-    print 'jour=', ijr+1
-    ## ch17 ##
-    ind_jr17_APR = np.where(jjr17_APR[bbtb_ch17_APR] == ijr+1)[0]
-    xx = lon17_APR[bbtb_ch17_APR][ind_jr17_APR]
-    yy = lat17_APR[bbtb_ch17_APR][ind_jr17_APR]
-    zz = tb17_APR[bbtb_ch17_APR][ind_jr17_APR]
-    zz0 = min(zz)
-    zz1 = max(zz)
-    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
-    outzch17_APR = outz
-    lonch17_APR = outx
-    latch17_APR = outy
-    OUTZCH17_APR[:,:,ijr] = outzch17_APR[:,:]
-
-## MAY ##
-bbtb_ch17_MAY = nonzero((tb17_MAY != -500.) & (tb17_MAY != 0.))
-OUTZCH17_MAY = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),31], float)
-outzch17_MAY = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
-lonch17_MAY = np.zeros([len(np.arange(x0, x1+1, dx))], float)
-latch17_MAY = np.zeros([len(np.arange(y0, y1+1, dy))], float)
-for ijr in range(0,31):
-    print 'jour=', ijr+1
-    ## ch17 ##
-    ind_jr17_MAY = np.where(jjr17_MAY[bbtb_ch17_MAY] == ijr+1)[0]
-    xx = lon17_MAY[bbtb_ch17_MAY][ind_jr17_MAY]
-    yy = lat17_MAY[bbtb_ch17_MAY][ind_jr17_MAY]
-    zz = tb17_MAY[bbtb_ch17_MAY][ind_jr17_MAY]
-    zz0 = min(zz)
-    zz1 = max(zz)
-    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
-    outzch17_MAY = outz
-    lonch17_MAY = outx
-    latch17_MAY = outy
-    OUTZCH17_MAY[:,:,ijr] = outzch17_MAY[:,:]
-
-## JUNE ##
-## ch17 ##
-bbtb_ch17_JUN = nonzero((tb17_JUN != -500.) & (tb17_JUN != 0.))
-OUTZCH17_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),30], float)
-outzch17_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
-lonch17_JUN = np.zeros([len(np.arange(x0, x1+1, dx))], float)
-latch17_JUN = np.zeros([len(np.arange(y0, y1+1, dy))], float)
-## ch18 ##
-bbemis_ch18_JUN=nonzero((emis18_JUN!=-500.)&(emis18_JUN<1.)&(emis18_JUN>0.))
-bbtb_ch18_JUN=nonzero((tb18_JUN!=-500.)&(tb18_JUN!=0.))
-OUTZCH18_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),30], float)
-outzch18_JUN = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
-lonch18_JUN=np.zeros([len(np.arange(x0, x1+1, dx))], float)
-latch18_JUN=np.zeros([len(np.arange(y0, y1+1, dy))], float)
-for ijr in range(0,30):
-    print 'jour=', ijr+1
-    ## ch17 ##
-    ind_jr17_JUN = np.where(jjr17_JUN[bbtb_ch17_JUN] == ijr+1)[0]
-    xx = lon17_JUN[bbtb_ch17_JUN][ind_jr17_JUN]
-    yy = lat17_JUN[bbtb_ch17_JUN][ind_jr17_JUN]
-    zz = tb17_JUN[bbtb_ch17_JUN][ind_jr17_JUN]
-    zz0 = min(zz)
-    zz1 = max(zz)
-    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
-    outzch17_JUN = outz
-    lonch17_JUN = outx
-    latch17_JUN = outy
-    OUTZCH17_JUN[:,:,ijr] = outzch17_JUN[:,:]
-    ## ch18 ##
-    ind_jr18_JUN = np.where(jjr18_JUN[bbtb_ch18_JUN] == ijr+1)[0]
-    xx = lon18_JUN[bbtb_ch18_JUN][ind_jr18_JUN]
-    yy = lat18_JUN[bbtb_ch18_JUN][ind_jr18_JUN]
-    zz = tb18_JUN[bbtb_ch18_JUN][ind_jr18_JUN]
-    zz0 = min(zz)
-    zz1 = max(zz)
-    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
-    outzch18_JUN = outz
-    lonch18_JUN = outx
-    latch18_JUN = outy
-    OUTZCH18_JUN[:,:,ijr] = outzch18_JUN[:,:]
-
-## JULY ##
-bbtb_ch17_JUL = nonzero((tb17_JUL != -500.) & (tb17_JUL != 0.))
-OUTZCH17_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx)),31], float)
-outzch17_JUL = np.zeros([len(np.arange(y0, y1+1, dy)),len(np.arange(x0, x1+1, dx))], float)
-lonch17_JUL = np.zeros([len(np.arange(x0, x1+1, dx))], float)
-latch17_JUL = np.zeros([len(np.arange(y0, y1+1, dy))], float)
-for ijr in range(0,31):
-    print 'jour=', ijr+1
-    ## ch17 ##
-    ind_jr17_JUL = np.where(jjr17_JUL[bbtb_ch17_JUL] == ijr+1)[0]
-    xx = lon17_JUL[bbtb_ch17_JUL][ind_jr17_JUL]
-    yy = lat17_JUL[bbtb_ch17_JUL][ind_jr17_JUL]
-    zz = tb17_JUL[bbtb_ch17_JUL][ind_jr17_JUL]
-    zz0 = min(zz)
-    zz1 = max(zz)
-    outz, outx, outy = ffgrid2.ffgrid(xx, yy, zz, dx, dy, x0, x1, y0, y1, zz0, zz1)
-    outzch17_JUL = outz
-    lonch17_JUL = outx
-    latch17_JUL = outy
-    OUTZCH17_JUL[:,:,ijr] = outzch17_JUL[:,:]
-
-
-## calcul de la climatologie moyenne sur le mois et anomalie en chaque lon/lat ##
-## FEBRUARY ##
-mean_outzch17_FEB = np.zeros([len(latch17_FEB), len(lonch17_FEB)], float)
-for ilon in range (0,len(lonch17_FEB)):
-    for ilat in range (0,len(latch17_FEB)):
-        mean_outzch17_FEB[ilat,ilon] = mean(OUTZCH17_FEB[ilat,ilon,:])
-
-tbch17_anom_FEB = np.zeros([len(latch17_FEB),len(lonch17_FEB),28], float)
-for ijr in range (0,28):
-    tbch17_anom_FEB[:,:,ijr] = OUTZCH17_FEB[:,:,ijr] - mean_outzch17_FEB[:,:]
-
-## APRIL ##
-mean_outzch17_APR = np.zeros([len(latch17_APR), len(lonch17_APR)], float)
-for ilon in range (0,len(lonch17_APR)):
-    for ilat in range (0,len(latch17_APR)):
-        mean_outzch17_APR[ilat,ilon] = mean(OUTZCH17_APR[ilat,ilon,:])
-
-tbch17_anom_APR = np.zeros([len(latch17_APR),len(lonch17_APR),30], float)
-for ijr in range (0,30):
-    tbch17_anom_APR[:,:,ijr] = OUTZCH17_APR[:,:,ijr] - mean_outzch17_APR[:,:]
-
-## MAY ##
-mean_outzch17_MAY = np.zeros([len(latch17_MAY), len(lonch17_MAY)], float)
-for ilon in range (0,len(lonch17_MAY)):
-    for ilat in range (0,len(latch17_MAY)):
-        mean_outzch17_MAY[ilat,ilon] = mean(OUTZCH17_MAY[ilat,ilon,:])
-
-tbch17_anom_MAY = np.zeros([len(latch17_MAY),len(lonch17_MAY),31], float)
-for ijr in range (0,31):
-    tbch17_anom_MAY[:,:,ijr] = OUTZCH17_MAY[:,:,ijr] - mean_outzch17_MAY[:,:]
-
-
-## JUNE ##
-## ch17 ##
-mean_outzch17_JUN = np.zeros([len(latch17_JUN), len(lonch17_JUN)], float)
-for ilon in range (0,len(lonch17_JUN)):
-    for ilat in range (0,len(latch17_JUN)):
-        mean_outzch17_JUN[ilat,ilon] = OUTZCH17_JUN[ilat,ilon,:].mean()
-
-tbch17_anom_JUN = np.zeros([len(latch17_JUN),len(lonch17_JUN),30], float)
-for ijr in range (0,30):
-    tbch17_anom_JUN[:,:,ijr] = OUTZCH17_JUN[:,:,ijr] - mean_outzch17_JUN[:,:]
-
-## ch18 ##
-mean_outzch18_JUN = np.zeros([len(latch18_JUN), len(lonch18_JUN)], float)
-for ilon in range (0,len(lonch18_JUN)):
-    for ilat in range (0,len(latch18_JUN)):
-        mean_outzch18_JUN[ilat,ilon] = OUTZCH18_JUN[ilat,ilon,:].mean()
-
-tbch18_anom_JUN = np.zeros([len(latch18_JUN),len(lonch18_JUN),30], float)
-for ijr in range (0,30):
-    tbch18_anom_JUN[:,:,ijr] = OUTZCH18_JUN[:,:,ijr] - mean_outzch18_JUN[:,:]
-
-
-
-for ijr in range (23, 30):
-     figure()
-     plt.ion()
-     m = Basemap(llcrnrlon=-60, urcrnrlon=-40, llcrnrlat=-85, urcrnrlat=-75, projection='cyl', resolution='c', fix_aspect=True)
-     m.drawcoastlines(linewidth = 1)
-     m.drawparallels(np.arange(-85., 75., 2))
-     m.drawmeridians(np.arange(-60., -40., 2))
-     #m.fillcontinents()
-     clevs = arange(-25., 5., 0.1)
-     xii,yii = m(*np.meshgrid(lonch17_JUN, latch17_JUN))
-     cs = m.contourf(xii, yii, tbch17_anom_JUN[:,:,ijr], clevs, cmap=cm.s3pcpn_l_r)
-     cbar = colorbar(cs)
-     cbar.set_label('Tb anomaly SSMIS CH17 - JUNE')
-     xticks(np.arange(-60., -40., 2))
-     yticks(np.arange(-85., 75., 2))
-     plt.savefig('/usr/home/lahlod/twice_d/figures_output_ANTARC/SSMIS/mean_tb_anomaly_map_'+str(ijr+1)+'JUN_ch17_SSMIS_Zoom_zone2')
-
-
-figure()
-plt.ion()
-m = Basemap(llcrnrlon=-180, urcrnrlon=180, llcrnrlat=-90, urcrnrlat=-30, projection='cyl', resolution='c', fix_aspect=True)
-m.drawcoastlines(linewidth = 1)
-m.drawparallels(np.arange(-90., -30., 20))
-m.drawmeridians(np.arange(-180., 180., 20))
-#m.fillcontinents()
-xii,yii = m(*np.meshgrid(lonch17_FEB, latch17_FEB))
-plt.xticks(arange(-180, 200, 20))
-plt.yticks(arange(-90, -30, 20))
-## ch17 ##
-clevs = arange(150., 270., 1.)
-cs = m.contourf(xii, yii, mean_outzch17_FEB, clevs, cmap=cm.s3pcpn_l_r)
-cbar = colorbar(cs)
-cbar.set_label('Mean Tb FEB [CH17] - SSMIS')
-## BIAIS ch17-ch18 ## 
-biais_JUN = mean_outzch17_JUN - mean_outzch18_JUN
-clevs = arange(0., 45., 1.)
-cs = m.contourf(xii, yii, biais_JUN, clevs, cmap=cm.s3pcpn_l_r)
-cbar = colorbar(cs)
-cbar.set_label('Bias [CH17-CH18] of Mean Tb JUNE - SSMIS')
-
-## VARIANCE ch17 - ch18 ##
-std1 = np.zeros([len(latch17_JUN), len(lonch17_JUN)], float)
-for ilat in range (0, len(latch17_JUN)):
-    for ilon in range (0, len(lonch17_JUN)):
-        std1[ilat, ilon] = (mean_outzch17_JUN[ilat, ilon]**2)-(mean_outzch18_JUN[ilat, ilon]**2)
-
-
-N = len(lonch17_JUN)*len(latch17_JUN)
-std_JUN = std1/N
-clevs = arange(0., 25., 0.1)
-cs = m.contourf(xii, yii, std_JUN, clevs, cmap=cm.s3pcpn_l_r)
-cbar = colorbar(cs)
-cbar.set_label('Stantard deviation [CH17-CH18] of Mean Tb JUNE - SSMIS')
-
-
-
-##########################
-# DIAGRAMME DE HOVMOLLER #
-##########################
-# shape(tbch17_anom_JUN) = [ilat, ilon, ijr]
-## FEBRUARY ##
-bbtranche17_FEB = nonzero((latch17_FEB >= -85.) & (latch17_FEB <= -75))
-mean_tbch17_anom_FEB = np.zeros([len(lonch17_FEB), 28], float)
-for ilon in range (0, len(lonch17_FEB)):
-    for ijr in range (0,28):
-        mean_tbch17_anom_FEB[ilon,ijr] = mean(tbch17_anom_FEB[bbtranche17_FEB][:,ilon,ijr])
-
-y_time, x_space = np.meshgrid(arange(0,28,1), lonch17_FEB)
-fig = plt.figure()
-plt.pcolor(x_space, y_time, mean_tbch17_anom_FEB, cmap=cm.s3pcpn_l_r, vmin = -10., vmax = 15.)
-plt.axis([-180., 180., 0, 28])
-cb = plt.colorbar()
-cb.set_label('Tb anomaly - SSMIS CH17')
-plt.xticks(arange(-180.,200.,40))
-plt.yticks(arange(0, 28, 1), arange (1, 29, 1))
-plt.xlabel('longitude')
-plt.ylabel('FEBRUARY 2010')
-
-## MAY ##
-bbtranche17_MAY = nonzero((latch17_MAY >= -85.) & (latch17_MAY <= -75))
-mean_tbch17_anom_MAY = np.zeros([len(lonch17_MAY), 31], float)
-for ilon in range (0, len(lonch17_MAY)):
-    for ijr in range (0,31):
-        mean_tbch17_anom_MAY[ilon,ijr] = mean(tbch17_anom_MAY[bbtranche17_MAY][:,ilon,ijr])
-
-y_time, x_space = np.meshgrid(arange(0,31,1), lonch17_MAY)
-fig = plt.figure()
-plt.pcolor(x_space, y_time, mean_tbch17_anom_MAY, cmap=cm.s3pcpn_l_r, vmin = -12., vmax = 25.)
-plt.axis([-180., 180., 0, 30])
-cb = plt.colorbar()
-cb.set_label('Tb anomaly - SSMIS CH17')
-plt.xticks(arange(-180.,200.,40))
-plt.yticks(arange(0, 30, 1), arange(1,31,1))
-plt.xlabel('longitude')
-plt.ylabel('MAY 2010')
-
-## JUNE ##
-bbtranche17_JUN = nonzero((latch17_JUN >= -85.) & (latch17_JUN <= -75))
-mean_tbch17_anom_JUN = np.zeros([len(lonch17_JUN), 30], float)
-for ilon in range (0, len(lonch17_JUN)):
-    for ijr in range (0,30):
-        mean_tbch17_anom_JUN[ilon,ijr] = tbch17_anom_JUN[bbtranche17_JUN][:,ilon,ijr].mean()
-
-
-y_time, x_space = np.meshgrid(arange(0,30,1), lonch17_APR)
-fig = plt.figure()
-plt.pcolor(x_space, y_time, mean_tbch17_anom_APR, cmap=cm.s3pcpn_l_r, vmin = -30., vmax = 25.)
-plt.axis([-180., 180., 0, 29])
-cb = plt.colorbar()
-cb.set_label('Tb anomaly - SSMIS CH17')
-plt.xticks(arange(-180.,220.,40))
-plt.yticks(arange(0, 30, 1), arange(1,31,1))
-plt.xlabel('longitude')
-plt.ylabel('JUNE 2010')
-
+############### fichiers par mois pour deux canaux (polars H et V) ##################################
+
+##########
+## ch12 ##
+##########
+
+f1 = '/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH12_ANTARC_'
+f3 = '2010.DAT'
+month = np.array(['FEBRUARY', 'APRIL', 'MAY', 'JUNE', 'JULY'])
+numlines = np.zeros([len(month)],int)
+
+for imo in range (0, len(month)):
+     print month[imo] 
+     f = f1 + str(month[imo]) + f3
+     fichier = open(f, 'r')
+     numlines[imo] = 0
+     for line in fichier: numlines[imo] += 1
+
+      fichier.close()
+
+
+imo = 0 # FEB 
+fichier = open(f1 + str(month[imo]) + f3, 'r')
+ssmis = np.zeros([18, numlines[imo]], float)
+for iligne in range (0,numlines[imo]):
+    line = fichier.readline()
+    liste = line.split()
+    for j in range(0,18):
+        ssmis[j,iligne] = float(liste[j])
+
+
+    fichier.close
+
+
+ssch12_FEB=ssmis
+lon12_FEB=ssch12_FEB[0,:]
+lat12_FEB=ssch12_FEB[1,:]
+jjr12_FEB=ssch12_FEB[4,:]
+ts12_FEB=ssch12_FEB[8,:]
+emis12_FEB=ssch12_FEB[14,:]
+tb12_FEB=ssch12_FEB[13,:]
+tup12_FEB=ssch12_FEB[16,:]
+tdn12_FEB=ssch12_FEB[15,:]
+trans12_FEB=ssch12_FEB[17,:]
+orog12_FEB=ssch12_FEB[11,:]
+
+imo = 1 # APR 
+fichier = open(f1 + str(month[imo]) + f3, 'r')
+ssmis = np.zeros([18, numlines[imo]], float)
+for iligne in range (0,numlines[imo]):
+    line = fichier.readline()
+    liste = line.split()
+    for j in range(0,18):
+        ssmis[j,iligne] = float(liste[j])
+
+
+    fichier.close
+
+ssch12_APR=ssmis
+lon12_APR=ssch12_APR[0,:]
+lat12_APR=ssch12_APR[1,:]
+jjr12_APR=ssch12_APR[4,:]
+ts12_APR=ssch12_APR[8,:]
+emis12_APR=ssch12_APR[14,:]
+tb12_APR=ssch12_APR[13,:]
+tup12_APR=ssch12_APR[16,:]
+tdn12_APR=ssch12_APR[15,:]
+trans12_APR=ssch12_APR[17,:]
+orog12_APR=ssch12_APR[11,:]
+
+
+imo = 4 # JUL 
+fichier = open(f1 + str(month[imo]) + f3, 'r')
+ssmis = np.zeros([18, numlines[imo]], float)
+for iligne in range (0,numlines[imo]):
+    line = fichier.readline()
+    liste = line.split()
+    for j in range(0,18):
+        ssmis[j,iligne] = float(liste[j])
+
+
+    fichier.close
+
+ssch12_JUL=ssmis
+lon12_JUL=ssch12_JUL[0,:]
+lat12_JUL=ssch12_JUL[1,:]
+jjr12_JUL=ssch12_JUL[4,:]
+ts12_JUL=ssch12_JUL[8,:]
+emis12_JUL=ssch12_JUL[14,:]
+tb12_JUL=ssch12_JUL[13,:]
+tup12_JUL=ssch12_JUL[16,:]
+tdn12_JUL=ssch12_JUL[15,:]
+trans12_JUL=ssch12_JUL[17,:]
+orog12_JUL=ssch12_JUL[11,:]
+
+
+##########
+## ch13 ##
+##########
+
+f1 = '/net/dedale/usr/dedale/surf/lelod/ANTARC/SSMIS_CH13_ANTARC_'
+f3 = '2010.DAT'
+month = np.array(['FEBRUARY', 'APRIL', 'MAY', 'JUNE', 'JULY'])
+numlines = np.zeros([len(month)],int)
+
+for imo in range (0, len(month)):
+     print month[imo] 
+     f = f1 + str(month[imo]) + f3
+     fichier = open(f, 'r')
+     numlines[imo] = 0
+     for line in fichier: numlines[imo] += 1
+
+      fichier.close()
+
+
+imo = 0 # FEB 
+fichier = open(f1 + str(month[imo]) + f3, 'r')
+ssmis = np.zeros([18, numlines[imo]], float)
+for iligne in range (0,numlines[imo]):
+    line = fichier.readline()
+    liste = line.split()
+    for j in range(0,18):
+        ssmis[j,iligne] = float(liste[j])
+
+
+    fichier.close
+
+
+ssch13_FEB=ssmis
+lon13_FEB=ssch13_FEB[0,:]
+lat13_FEB=ssch13_FEB[1,:]
+jjr13_FEB=ssch13_FEB[4,:]
+ts13_FEB=ssch13_FEB[8,:]
+emis13_FEB=ssch13_FEB[14,:]
+tb13_FEB=ssch13_FEB[13,:]
+tup13_FEB=ssch13_FEB[16,:]
+tdn13_FEB=ssch13_FEB[15,:]
+trans13_FEB=ssch13_FEB[17,:]
+orog13_FEB=ssch13_FEB[11,:]
+
+imo = 1 # APR 
+fichier = open(f1 + str(month[imo]) + f3, 'r')
+ssmis = np.zeros([18, numlines[imo]], float)
+for iligne in range (0,numlines[imo]):
+    line = fichier.readline()
+    liste = line.split()
+    for j in range(0,18):
+        ssmis[j,iligne] = float(liste[j])
+
+
+    fichier.close
+
+ssch13_APR=ssmis
+lon13_APR=ssch13_APR[0,:]
+lat13_APR=ssch13_APR[1,:]
+jjr13_APR=ssch13_APR[4,:]
+ts13_APR=ssch13_APR[8,:]
+emis13_APR=ssch13_APR[14,:]
+tb13_APR=ssch13_APR[13,:]
+tup13_APR=ssch13_APR[16,:]
+tdn13_APR=ssch13_APR[15,:]
+trans13_APR=ssch13_APR[17,:]
+orog13_APR=ssch13_APR[11,:]
+
+
+imo = 4 # JUL 
+fichier = open(f1 + str(month[imo]) + f3, 'r')
+ssmis = np.zeros([18, numlines[imo]], float)
+for iligne in range (0,numlines[imo]):
+    line = fichier.readline()
+    liste = line.split()
+    for j in range(0,18):
+        ssmis[j,iligne] = float(liste[j])
+
+
+    fichier.close
+
+ssch13_JUL=ssmis
+lon13_JUL=ssch13_JUL[0,:]
+lat13_JUL=ssch13_JUL[1,:]
+jjr13_JUL=ssch13_JUL[4,:]
+ts13_JUL=ssch13_JUL[8,:]
+emis13_JUL=ssch13_JUL[14,:]
+tb13_JUL=ssch13_JUL[13,:]
+tup13_JUL=ssch13_JUL[16,:]
+tdn13_JUL=ssch13_JUL[15,:]
+trans13_JUL=ssch13_JUL[17,:]
+orog13_JUL=ssch13_JUL[11,:]
Index: /trunk/src/scripts_Laura/write_netcdf_SSMIS_test.py
===================================================================
--- /trunk/src/scripts_Laura/write_netcdf_SSMIS_test.py	(revision 22)
+++ /trunk/src/scripts_Laura/write_netcdf_SSMIS_test.py	(revision 22)
@@ -0,0 +1,12 @@
+#!/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
+import ffgrid2
+
+
