source: trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_Drake.pro @ 2751

Last change on this file since 2751 was 2751, checked in by smasson, 9 years ago

large update of IDL_scripts for Is-ENES

File size: 2.5 KB
Line 
1pro std_ts_Drake, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
2
3  compile_opt idl2, strictarrsubs
4 
5@common
6@std_common
7
8; get exp1 info
9  vU1 = getenv('VAR1_U')   &   prefix = getenv('V1U_PREF')    &   suffix = getenv('V1U_SUFF')
10; get exp2 info
11  vU2 = getenv('VAR2_U')   &   prefix2 = getenv('V2U_PREF')   &   suffix2 = getenv('V2U_SUFF')
12;
13  cdti3 = string(cnt, format = '(i3.3)')
14  print, cdti3 + ') ' + blabla
15  filename = cdti3 + '_ts_Drake_'+prefix
16  if prefix NE prefix2 then filename = filename + '_'+prefix2
17  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
18;
19  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
20;
21  iodir = std_iodir_data
22 
23; find a point in south America (around 60E-30S)
24  if max(glamt) gt 300 then testlam = abs(glamt - 300) else testlam = abs(glamt + 60)
25  testlat = abs(gphit + 30)
26  index = where(abs(testlam - min(testlam)) lt 1 and abs(testlat - min(testlat)) lt 1 )
27  xindex = index[0] mod jpi
28  yindex = index[0]/jpi
29; define a domain limited to a thin band going from Antactica to this point in south America
30  domdef, xindex, xindex+1, 0, yindex, 0, jpk-1, /index ; keep 2 points for x to avoid degenerated dimension...
31;
32  u1 = rseries_ncdf(vU1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct)
33  drk1 = fltarr(jpt)
34  trans = strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff'
35  FOR t = 0, jpt-1 DO BEGIN
36    tmp = bsf(u1[*, *, *, t], TRANSPORT = trans, /nostruct)
37    drk1[t] = tmp[0, nyt-1]-tmp[0, 0]
38  ENDFOR
39;
40  title = prefix+' '+d1_d2+'!C'+blabla
41  pltt, drk1, 't', 0., 200., date1, date2, /REMPLI $
42        , small = [1, 2, 1],  TITLE = title, YTITLE = varunit, /PORTRAIT, _extra = ex
43 
44  if prefix NE prefix2 then begin
45;
46    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
47    tsave = time
48    u2 = rseries_ncdf(vU2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct)
49    drk2 = fltarr(jpt)
50    trans = strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff'
51    FOR t = 0, jpt-1 DO BEGIN
52      tmp = bsf(u2[*, *, *, t], TRANSPORT = trans, /nostruct)
53      drk2[t] = tmp[0, nyt-1]-tmp[0, 0]
54    ENDFOR
55    time = tsave   &   IF n_elements(time) NE jpt THEN stop
56
57    title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+blabla
58    pltt, drk1 - drk2, 't', -30., 30., date1, date2, /REMPLI, /NOERASE $
59          , COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex
60   
61  endif
62
63  domdef
64
65  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
66  if KEYWORD_SET(postscript) then closeps
67 
68  return
69end
Note: See TracBrowser for help on using the repository browser.