New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ts_mean_U.pro in trunk/CONFIG/ORCA2_LIM/IDL_scripts – NEMO

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

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

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

File size: 2.2 KB
RevLine 
[2150]1pro ts_mean_U, sEXP1, sEXP2, year1, year2, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
2
3
4  compile_opt idl2, strictarrsubs
5 
6  @common
7 
8 @initorca2
9 
10 if max(glamt) gt 300 then testlam = abs(glamt - 300) else testlam = abs(glamt + 60)
11
12 testlat = abs(gphit + 30)
13
14 index=where(abs(testlam - min(testlam)) lt 1 and abs(testlat - min(testlat)) lt 1 )
15 xindex=index[0] mod jpi
16 yindex=index[0]/jpi
17
18 domdef, xindex, xindex+1, 0, yindex, 0, jpk-1, /index
19
20 if KEYWORD_SET(POSTSCRIPT) then begin
21    openps, sEXP1+'_U_mean.ps', portrait = 1
22 endif
23 
24 ts_bbD = 0.
25 ts_bbD2 = 0.
26 ts_Time = 0.
27 
28 for year=year1,year2 do begin
29   
30    date1 = year * 10000L + 101
31    date2 = year * 10000L + 1231
32    filename = getname(s_iodir_data,sEXP1,'1Y','grid_U',date1)
33    filename2 = getname(s_iodir_data,sEXP2,'1Y','grid_U',date1)
34
35    if filename eq '' then stop
36    U = read_ncdf('uoce_eff',date1 ,date2 , filename = filename, /nostruct)
37    U2 = read_ncdf('uoce_eff',date1 ,date2 , filename = filename2, /nostruct)
38     
39    bb1 = bsf(U)
40    bb2 = bsf(U2)
41    bb1=bb1.arr[0,*]
42    bb2=bb2.arr[0,*]
43
44    bbDRAKE = bb1[nyt-1]-bb1[0]
45    bb2DRAKE = bb2[nyt-1]-bb2[0]
46
47    ts_bbD = [ ts_bbD, bbDRAKE ]
48    ts_bbD2 = [ ts_bbD2, bb2DRAKE ]
49    ts_Time = [ ts_Time, Time]  ; Time = date
50       
51 endfor
52 
53 ts_bbD = ts_bbD[1:*]           ; remove first record of 0
54 ts_bbD2 = ts_bbD2[1:*]         ; remove first record of 0
55 Time = ts_Time[1:*]            ; remove first record of 0
56 
57 jpt = n_elements(Time)
58
59 title = sEXP1+' DRAKE transport --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
60 pltt,ts_bbD,'t', 0., 200., year1 * 10000L + 101, year2 * 10000L + 1231 , /REMPLI $
61      , small = [1,2,1],  TITLE = title, YTITLE='Sv', FORMAT = '(I3)', /PORTRAIT, _extra = ex
62 
63 if sEXP2 ne sEXP1 then begin
64   
65    title = sEXP1+' - '+sEXP2+' DRAKE transport --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
66    pltt,ts_bbD - ts_bbD2,'t', -30., 30., year1 * 10000L + 101, year2 * 10000L + 1231 , /REMPLI, /NOERASE $
67        , COLOR = 250, small = [1,2,2],  TITLE = title, YTITLE='Sv', FORMAT = '(I3)', /PORTRAIT, _extra = ex
68   
69 endif
70
71 if KEYWORD_SET(POSTSCRIPT) then begin
72    closeps
73 endif
74 
75 
76 return
77end
Note: See TracBrowser for help on using the repository browser.