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_SSH.pro in trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts – NEMO

source: trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/ts_mean_SSH.pro @ 2556

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

update ts_mean_SSH.pro, see ticket #724

File size: 1.9 KB
RevLine 
[2537]1pro ts_mean_SSH, sEXP1, sEXP2, year1, year2, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
2
3  compile_opt idl2, strictarrsubs
4 
5  @common
6 
7  @initorca2
8 
9  if KEYWORD_SET(POSTSCRIPT) then begin
10     openps, sEXP1+'_SSH_mean.ps', portrait = 1
11  endif
12 
13  ts_SSH = 0.
14  ts_SSH2 = 0.
15  ts_Time = 0.
[2556]16
17  masknp = read_ncdf('tmaskutil', file = 'mesh_mask_partial.nc', /nostruct)
[2537]18 
19  for year=year1,year2 do begin
20     
21     date1 = year * 10000L + 101
22     date2 = year * 10000L + 1231
23     filename = getname(s_iodir_data,sEXP1,'1Y','grid_T',date1)
24     filename2 = getname(s_iodir_data,sEXP2,'1Y','grid_T',date1)
25     
26     SSH = read_ncdf('zos',date1 ,date2 , filename = filename, /nostruct)
27     SSH2 = read_ncdf('zos',date1 ,date2 , filename = filename2, /nostruct)
28
[2556]29     ts_SSH = [ ts_SSH, moyenne(SSH, 'xy', mask2d = masknp)]
30     ts_SSH2 = [ ts_SSH2, moyenne(SSH2, 'xy', mask2d = masknp)]
[2537]31     ts_Time = [ ts_Time, Time] ; Time = date
32     
33  endfor
34 
35  ts_SSH = ts_SSH[1:*]          ; remove first record of 0
36  ts_SSH2 = ts_SSH2[1:*]          ; remove first record of 0
37  Time = ts_Time[1:*]           ; remove first record of 0
38 
39  jpt = n_elements(Time)
40 
41  title = sEXP1+' Global Annual Mean SSH --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
42  pltt,ts_SSH,'t', -.001, .001, year1 * 10000L + 101, year2 * 10000L + 1231 , /REMPLI $
43       , small = [1,2,1], YTITLE = 'm', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
44 
45  if sEXP2 ne sEXP1 then begin
46     
47     title = sEXP1+' - '+sEXP2+' Global Annual Mean SSH --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
48     pltt, ts_SSH - ts_SSH2,'t', -.0001, .0001, year1 * 10000L + 101, year2 * 10000L + 1231 , /REMPLI, /NOERASE $
49           , COLOR = 250, small = [1,2,2], YTITLE = 'm', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
50     
51  endif
52 
53
54 
55  if KEYWORD_SET(POSTSCRIPT) then begin
56     closeps
57  endif
58
59
60  return
61end
Note: See TracBrowser for help on using the repository browser.