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.
std_ts_AMOC.pro in branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts – NEMO

source: branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_AMOC.pro @ 4320

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

update IDL_scripts for ORCA2_LIM and ORCA2_LIM3, add plot of max_mld output 5days, see ticket: #724

File size: 5.3 KB
Line 
1PRO std_ts_read_AMOC, var_name, dt1, dt2, prefix, suffix, t45, t70, t50
2
3  compile_opt idl2, strictarrsubs
4 
5@common
6@std_common
7
8  list = rseries_ncdf(var_name, dt1, dt2, prefix, suffix, /fileslist)
9  nfiles = n_elements(list)
10
11  t45 = 0.
12  t70 = 0.
13  t50 = 0.
14  ts_Time = 0.
15
16  ;SF trans = strlowcase(var_name) EQ 'vocetr_eff'
17  trans = strlowcase(var_name) EQ 'vomeeftr'
18
19  ; ADD definition of mask_atl_nomed to compute AMOC (with no Mediterranean Sea)
20  msk_atl_nomed = read_ncdf( 'atlmsk_nomed', filename = std_file_msksub, /nostruct, _extra = ex )
21  FOR i = 0, nfiles-1 DO BEGIN
22    var = read_ncdf(var_name, allrecords = allrec, filename = list[i], /nostruct)
23    ts_Time = [ ts_Time, Time]
24;
25    FOR t = 0, jpt-1 DO BEGIN
26      msfatl = msf(var[*, *, *, t], msk_atl_nomed, TRANSPORT = trans, /nostruct, indexboxzoom = ind)
27      msftot = msf(var[*, *, *, t], TRANSPORT = trans, /nostruct, indexboxzoom = ind)
28      yaxis = gphit[ind[0], ind[2]:ind[3]]
29
30; computation of max Atlatic Meridional Overturninc Circulation at 40°N and 50°N
31      indy = where(yaxis gt 40 and yaxis le 50)
32      domdef, 0, 3500
33      ;SF commented because we've to compute msftot starting from msf atlantic; i.e. without mediterranean sea.
34      ;SF t45 = [t45, max(msftot[indy, firstzw:lastzw], /NaN)]
35      t45 = [t45, max(msfatl[indy, firstzw:lastzw], /NaN)]
36     
37; computation of max atlantic Antarctic Bottom Water between 80°S and 65°S
38      indy = where(yaxis gt -80 and yaxis le -65)
39      domdef, 300, 3500
40      t70 = [t70, min(msftot[indy, firstzw:lastzw], /NaN)]
41
42;  computation of max Antarctic Abyssal Bottom Cell between 65°S and 30°N ,
43      indy = where(yaxis gt -65 and yaxis le 30)
44      domdef, 2500, 5000
45      t50 = [t50, min(msftot[indy, firstzw:lastzw], /NaN)]
46     
47      domdef, 0, jpk-1, /zindex
48    ENDFOR
49
50  ENDFOR
51
52  time = ts_Time[1:*]           ; remove first record of 0
53  jpt = n_elements(time)
54 
55  t45 = t45[1:*]                ; remove first record of 0
56  t70 = t70[1:*]                ; remove first record of 0
57  t50 = t50[1:*]                ; remove first record of 0
58
59  return
60end
61
62pro std_ts_AMOC, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
63
64  compile_opt idl2, strictarrsubs
65 
66@common
67@std_common
68
69; get exp1 info
70  vV1 = getenv('VAR1_V')   &   prefix = getenv('V1V_PREF')    &   suffix = getenv('V1V_SUFF')
71; get exp2 info
72  vV2 = getenv('VAR2_V')   &   prefix2 = getenv('V2V_PREF')   &   suffix2 = getenv('V2V_SUFF')
73;
74  cdti3 = string(cnt, format = '(i3.3)')
75  print, cdti3 + ') ' + blabla
76  filename = cdti3 + '_ts_AMOC_'+prefix
77  if prefix NE prefix2 then filename = filename + '_'+prefix2
78  if KEYWORD_SET(postscript) then openps, filename+'_1.ps', portrait = 1
79;
80  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
81  d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
82;
83  iodir = std_iodir_data
84
85; compute the MSF
86
87  std_ts_read_AMOC, vV1, date1, date2, prefix, suffix, t45, t70, t50
88  if prefix NE prefix2 then begin
89    tsave = time
90    std_ts_read_AMOC, vV2, date1_2, date2_2, prefix2, suffix2, t45_2, t70_2, t50_2
91    time = tsave   &   IF n_elements(time) NE jpt THEN stop
92  ENDIF
93
94; plots... 
95
96  title = prefix+' '+d1_d2+'!C'+'Max Atlantic MOC between 40N and 50N'
97  pltt, t45, 't', 0., 30., date1, date2, /REMPLI, /PORTRAIT $
98        ,  small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
99  IF prefix NE prefix2 then begin
100    title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Max Atlantic MOC between 40N and 50N'
101    pltt, t45 - t45_2, 't', -9., 9., date1, date2, /REMPLI, /NOERASE $
102          ,  COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex
103  endif
104 
105  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_1.png  />  ' ]
106  if KEYWORD_SET(postscript) then closeps
107  if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
108
109  title = prefix+' '+d1_d2+'!C'+'Max AntArctic Bottom Water between 80S and 65S '+d1_d2
110  pltt, -t70, 't', 0., 20., date1, date2, /REMPLI, /PORTRAIT, window = 2 $
111        , small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
112  if prefix NE prefix2 then begin
113    title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Max AntArctic Bottom Water between 80S and 65S'
114    pltt, -t70 + t70_2, 't', -5., 5., date1, date2, /REMPLI, /NOERASE $
115          ,  COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex
116  endif
117 
118  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
119  if KEYWORD_SET(postscript) then closeps
120  if KEYWORD_SET(postscript) then openps, filename+'_3.ps', portrait = 1
121
122  title = prefix+' '+d1_d2+'!C '+'Max AntArctic Bottom Cell between 65S and 30N '+d1_d2
123  pltt, -t50, 't', 5., 30., date1, date2, /REMPLI, /PORTRAIT, window = 3 $
124        ,  small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
125  if prefix NE prefix2 then begin
126    title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Max AntArctic Bottom Cell between 65S and 30N'
127    pltt, -t50 + t50_2, 't', -5., 5., date1, date2, /REMPLI, /NOERASE  $
128          ,  COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex
129  endif
130 
131  domdef, 0, jpk-1, /zindex
132
133  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_3.png  />  ' ]
134  if KEYWORD_SET(postscript) then closeps
135   
136  return
137end
Note: See TracBrowser for help on using the repository browser.