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 @ 4498

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

update idl scripts, see ticket #724

File size: 5.9 KB
RevLine 
[2751]1PRO std_ts_read_AMOC, var_name, dt1, dt2, prefix, suffix, t45, t70, t50
[2709]2
3  compile_opt idl2, strictarrsubs
4 
[2751]5@common
6@std_common
[2709]7
[2751]8  list = rseries_ncdf(var_name, dt1, dt2, prefix, suffix, /fileslist)
9  nfiles = n_elements(list)
[2709]10
[2751]11  t45 = 0.
12  t70 = 0.
13  t50 = 0.
14  ts_Time = 0.
[2709]15
[4394]16  trans = strlowcase(var_name) EQ 'vocetr_eff' OR strlowcase(var_name) EQ 'vomeeftr'
17  ;trans = strlowcase(var_name) EQ 'vomeeftr'
[2751]18
[4320]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 )
[2751]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
[4320]26      msfatl = msf(var[*, *, *, t], msk_atl_nomed, TRANSPORT = trans, /nostruct, indexboxzoom = ind)
[2751]27      msftot = msf(var[*, *, *, t], TRANSPORT = trans, /nostruct, indexboxzoom = ind)
28      yaxis = gphit[ind[0], ind[2]:ind[3]]
29
[2709]30; computation of max Atlatic Meridional Overturninc Circulation at 40°N and 50°N
[2751]31      indy = where(yaxis gt 40 and yaxis le 50)
32      domdef, 0, 3500
[4320]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)]
[2751]36     
[2709]37; computation of max atlantic Antarctic Bottom Water between 80°S and 65°S
[2751]38      indy = where(yaxis gt -80 and yaxis le -65)
39      domdef, 300, 3500
40      t70 = [t70, min(msftot[indy, firstzw:lastzw], /NaN)]
[2709]41
42;  computation of max Antarctic Abyssal Bottom Cell between 65°S and 30°N ,
[2751]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
[2709]49
[2751]50  ENDFOR
[2709]51
[2751]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
[2709]58
[2751]59  return
60end
[2709]61
[2751]62pro std_ts_AMOC, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
[2709]63
[2751]64  compile_opt idl2, strictarrsubs
65 
66@common
67@std_common
[2709]68
[2751]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
[2709]84
[2751]85; compute the MSF
[4320]86
[2751]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'
[4497]97  pltt, t45, 't', MIN = 0., MAX = 30., date1, date2, /REMPLI, /PORTRAIT, XGRIDSTYLE = 1 $
[2751]98        ,  small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
99  IF prefix NE prefix2 then begin
[4495]100    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Max Atlantic MOC between 40N and 50N'
[4497]101    pltt, t45, 't', MIN = 0., MAX = 30., date1, date2, /REMPLI , /NOERASE, XGRIDSTYLE = 1 $
[4495]102          ,  small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
[4497]103    pltt, t45_2, 't', date1, date2, /REMPLI, /NOERASE $
[4495]104          ,  /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
[2751]105  endif
106 
107  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_1.png  />  ' ]
108  if KEYWORD_SET(postscript) then closeps
109  if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
110
111  title = prefix+' '+d1_d2+'!C'+'Max AntArctic Bottom Water between 80S and 65S '+d1_d2
[4497]112  pltt, -t70, 't', MIN = 0., MAX = 20., date1, date2, /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, window = 2  $
[2751]113        , small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
114  if prefix NE prefix2 then begin
[4495]115    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Max AntArctic Bottom Water between 80S and 65S'
[4497]116    pltt, -t70, 't', MIN = 0.,MAX =  20., date1, date2, /REMPLI, /NOERASE, XGRIDSTYLE = 1 $
[4495]117          ,  small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
[4497]118    pltt, -t70_2, 't', date1, date2, /REMPLI, /NOERASE $
[4495]119          , /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
[2751]120  endif
121 
122  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
123  if KEYWORD_SET(postscript) then closeps
124  if KEYWORD_SET(postscript) then openps, filename+'_3.ps', portrait = 1
125
[4320]126  title = prefix+' '+d1_d2+'!C '+'Max AntArctic Bottom Cell between 65S and 30N '+d1_d2
[4497]127  pltt, -t50, 't', MIN = 5., MAX = 30., date1, date2, /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, window = 3  $
[2751]128        ,  small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
129  if prefix NE prefix2 then begin
[4495]130    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Max AntArctic Bottom Cell between 65S and 30N'
[4497]131    pltt, -t50 , 't', MIN = 5., MAX = 30., date1, date2, /REMPLI, /NOERASE, XGRIDSTYLE = 1 $
[4495]132          ,  small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
[4497]133    pltt, -t50_2, 't', date1, date2, /REMPLI, /NOERASE  $
[4495]134          , /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
[2751]135  endif
136 
137  domdef, 0, jpk-1, /zindex
138
139  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_3.png  />  ' ]
140  if KEYWORD_SET(postscript) then closeps
141   
142  return
[2709]143end
Note: See TracBrowser for help on using the repository browser.