source: trunk/tools/nino_composite.pro @ 170

Last change on this file since 170 was 170, checked in by pinsard, 15 years ago

fill uses paragraph in header with used commons

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1;+
2;
3; @todo
4; missing initorca0 module
5;
6; @uses
7; <propost_it>initorca0</propost_it>
8;
9; @version
10; $Id$
11;
12;-
13PRO nino_composite $
14    , FILENAME=filename
15;
16  compile_opt idl2, strictarrsubs
17;
18dbase='/home/dynamite/mkolas/database/'
19model='ipsl'
20exp='HH20'
21freq='1m'
22datedeb = 186001
23datefin = 205912
24grid = 'grid_T'
25
26file_TS = exp+'_'+freq+'_'+strtrim(string(datedeb), 1)+'_'+strtrim(string(datefin), 1)+'_'+grid+'.nc'
27print, 'file_TS : ', file_TS
28
29@initorca0
30
31iodir = dbase
32print, 'iodir : ', iodir
33
34;Def de la boite Nino3.4
35lonmin=190
36lonmax=240
37latmin=-5
38latmax=5
39domdef, lonmin,lonmax,latmin,latmax, 0, 10
40date1 = datedeb*100+1
41date2 = datefin*100+12
42
43sstaC = grossemoyenne(read_ncdf('sosstsst',iodir = iodir, date1, date2, filename=file_TS, /nostruct),'xy')
44sstaC_sc = reform(sstaC, 12, jpt/12.)
45sstaC_temp = total(sstaC_sc, 2)*12/jpt
46tab_sst_sc = fltarr(jpt)
47FOR i = 0, jpt/12.-1 DO tab_sst_sc[i*12:i*12+11] = sstaC_temp[*]
48
49;Moyenne glissante Trenberth 3 ou 5 mois ??
50sstaC = ts_smooth[sstaC-tab_sst_sc, 5]
51;
52resp=fltarr(jpt)
53
54;Critere Nino
55a=where(sstaC GT stddev(sstaC)*1.0)
56b=where(sstaC LT stddev(sstaC)*1.0)
57;
58
59Deb_Nino = a(where(a-shift(a,1) GT 1))
60Fin_Nino = a(where(a-shift(a,1) GT 1)-1)
61IF (Fin_Nino[0] LT Deb_Nino[0]) THEN Fin_Nino = Fin_Nino[1:n_elements(Fin_Nino)-1]
62IF(n_elements(Deb_Nino) GT n_elements(Fin_Nino)) THEN Deb_Nino = Deb_Nino[0:n_elements(Fin_Nino)-1]
63Length_Nino = Fin_Nino-Deb_Nino+1
64Deb_Nino = Deb_Nino[where(Length_Nino GT 5)]
65Fin_Nino = Fin_Nino[where(Length_Nino GT 5)]
66Length_Nino = Length_Nino[where(Length_Nino GT 5)]
67
68;;Max_Nino = intarr(n_elements(Deb_Nino))
69;;FOR i = 0, n_elements(Deb_Nino)-1 DO BEGIN
70;;a = max(sstaC(Deb_Nino[i]:Fin_Nino[i]),ind)
71;;Max_Nino[i] = ind+Deb_Nino[i]
72;;ENDFOR
73;;Deb_Nino_sel = Deb_Nino(where((Max_Nino mod 12) GE 8 OR (Max_Nino mod 12) LE 1))
74;;Fin_Nino_sel = Fin_Nino(where((Max_Nino mod 12) GE 8 OR (Max_Nino mod 12) LE 1))
75;;Max_Nino_sel = Max_Nino(where((Max_Nino mod 12) GE 8 OR (Max_Nino mod 12) LE 1))
76;;Length_Nino_sel = Length_Nino(where((Max_Nino mod 12) GE 8 OR (Max_Nino mod 12) LE 1))
77
78Year_Nino = Deb_Nino/12
79
80sstaC_Nino = fltarr(n_elements(Year_Nino), 24)
81
82FOR i=0,n_elements(Year_Nino)-1 DO BEGIN
83sstaC_Nino[i, *] = sstaC[Year_Nino[i]*12: (Year_Nino[i]+2)*12-1]
84ENDFOR
85
86jpt = 24
87time = julday(01, 15, 01)+findgen(jpt)*30
88plt1d,reform(sstaC_Nino[0,*]),'t', min = -stddev(sstaC)*3, max = stddev(sstaC)*3, petit = [2, 2, 1], /rempli,xtitle ='', ytitle = 'SSTA (C)', title = model+' '+exp+' '+strtrim(string(n_elements(Year_Nino_Weak)), 1)+' Weak Nino (PrecMAM<2.): Nino34 SSTA',subtitle = '', /port, win = 2
89FOR i=1,n_elements(Year_Nino)-1 DO BEGIN
90plt1d,reform(sstaC_Nino[i,*]),'t', min = -stddev(sstaC)*3, max = stddev(sstaC)*3, /ov1d, /noerase, petit = [2, 2, 1], /rempli,xtitle ='', ytitle = '', title = '',subtitle = '', /port
91ENDFOR
92
93END
Note: See TracBrowser for help on using the repository browser.