source: trunk/CONFIG/ORCA2_LIM/IDL_scripts/xxx_zonal_T.pro @ 2150

Last change on this file since 2150 was 2150, checked in by flavoni, 10 years ago

commit idl tools for post-processing, for ORCA2_LIM configuration, see ticket #724

File size: 2.5 KB
Line 
1pro xxx_zonal_T, T1, T2, TLev, sEXP1, sEXP2, start_end, POSTSCRIPT = postscript, SUBBASIN = subbasin, MASK_FILENAME = mask_filename, _extra = ex
2 
3  compile_opt idl2, strictarrsubs
4
5   @common
6
7   if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo"
8
9
10   if KEYWORD_SET(POSTSCRIPT) then begin
11      openps, '014_Zonal_T_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.ps', portrait = 1
12   endif
13
14                                ; looking for longitudinal index corresponding to the highest latitude (closest to the North Pole)
15   index=where(gphit eq max(gphit))
16   nx=index[0] mod jpi
17   gphi_save=gphit
18   gphit[0,*]=gphit[nx,*]
19
20   if KEYWORD_SET(SUBBASIN) then begin
21 ; save tmask
22      tmasksv = tmask
23 ;
24      CASE 1 of
25         subbasin eq 'Atl' : var = 'atlmsk_nomed'
26         subbasin eq 'Ind' : var = 'indmsk_nored'
27         subbasin eq 'Pac' : var = 'pacmsk'
28      ENDCASE
29                                ;
30      msk = read_ncdf( var, filename = mask_filename, _extra =ex)
31
32; from 2D array to 3D array
33      msk = msk.arr[*]#replicate(1., nzt)
34      tmask[firstxt:lastxt,firstyt:lastyt,firstzt:lastzt] = tmask[firstxt:lastxt,firstyt:lastyt,firstzt:lastzt] * msk
35
36   endif
37
38varunit = T1.unit
39;
40 
41   title=sEXP1+' '+subname+' / T year '+start_end
42   pltz, T1.arr, MININ = -2., MAXIN = 30., INTER = 1., typein = 'yz', FORMAT = '(I2)' $
43         , small =[ 1,2,1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra = ex
44;
45if sEXP1 ne sEXP2 then begin
46
47  title = sEXP1+' - '+sEXP2+' T (°C) depth=105m / Temp year '+start_end
48  pltz, T1.arr-T2.arr, MIN = -2., MAX = 2., INTER = .2, typein = 'yz'  $
49       , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra=ex
50
51endif else begin
52
53   title=sEXP1+' - Levitus '+subname+'/ T year'+start_end
54   pltz, T1.arr-TLev.arr, MININ = -4., MAXIN = 4., INTER = .5, typein='yz', FORMAT = '(I2)' $
55         , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex
56   
57endelse
58         
59   
60;
61   title = 'Temperature differences in zonal average ' + subname+' with Levitus and '+sEXP1+'-'+sEXP2
62   text = [   title, '<img width="80%" src=/Users/sflod/TOOLS/my_IDL/PS/v32colib_v32colib/ps/014_Zonal_T_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.png  />  ' ]
63   putfile, '/tmp/prova.txt', text
64
65
66   if KEYWORD_SET(POSTSCRIPT) then begin
67      closeps
68   endif
69
70   if KEYWORD_SET(SUBBASIN) then tmask = tmasksv
71   
72 
73   gphit=gphi_save
74
75
76   return
77end
Note: See TracBrowser for help on using the repository browser.