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

source: trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/ts_mean_ICE.pro @ 2750

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

update idl scripts, see ticket 724

File size: 3.9 KB
Line 
1pro ts_mean_ICE, 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  std_iodir_climato = '/Users/sflod/idl_PLOTS/CLIMATOLOGIES/'
10  std_iodir_interan = '/Users/sflod/idl_PLOTS/INTERAN/'
11
12
13  if KEYWORD_SET(POSTSCRIPT) then begin
14     openps, sEXP1+'_ice_area_mean.ps', portrait = 1
15  endif
16 
17 
18
19;NORTHERN Hemisphere
20  ts_ICE_N = 0.
21  ts_ICE_N_2 = 0.
22
23;SOUTHERN Hemisphere
24  ts_ICE_S = 0.
25  ts_ICE_S_2 = 0.
26
27  ts_Time = 0.
28
29  masknp = read_ncdf('tmaskutil', file = 'mesh_mask_partial.nc', /nostruct)
30 
31  for year=year1,year2 do begin
32     date1 = year * 10000L + 101
33     date2 = year * 10000L + 1231
34     filename = getname(s_iodir_data,sEXP1,'1M','icemod',date1)
35     filename2 = getname(s_iodir_data,sEXP2,'1M','icemod',date1)
36
37     if filename eq '' then stop
38     
39     domdef, 0, jpi-1, 30, 90, /xindex
40
41; computation of annual mean
42     ICE_N = read_ncdf('sic',date1 ,date2 , filename = filename, /nostruct, dir = 't')
43     ICE_N_2 = read_ncdf('sic',date1 ,date2 , filename = filename2, /nostruct, dir = 't')
44     
45     ts_ICE_N   = [ ts_ICE_N, moyenne(ICE_N, 'xy', /integration, mask2d = masknp) ]
46     ts_ICE_N_2 = [ ts_ICE_N_2, moyenne(ICE_N_2, 'xy', /integration, mask2d = masknp) ]
47   
48     domdef, 0, jpi-1, -30, -90, /xindex
49     
50     ICE_S = read_ncdf('sic',date1 ,date2 , filename = filename, /nostruct, dir = 't')
51     ICE_S_2 = read_ncdf('sic',date1 ,date2 , filename = filename2, /nostruct, dir = 't')
52     
53     ts_ICE_S   = [ ts_ICE_S, moyenne(ICE_S, 'xy', /integration, mask2d = masknp) ]
54     ts_ICE_S_2 = [ ts_ICE_S_2, moyenne(ICE_s_2, 'xy', /integration, mask2d = masknp) ]
55 
56    ts_Time  = [ ts_Time, Time] ; Time = date
57 
58  endfor
59
60;  surf_oce =  e1t[firstxt:lastxt,firstyt:lastyt] * e2t[firstxt:lastxt,firstyt:lastyt]  * tmask[firstxt:lastxt,firstyt:lastyt,0]
61;  surf_oce = total(surf_oce)
62
63  ts_ICE_N   = ts_ICE_N[1:*]        ; remove first record of 0
64  ts_ICE_N_2 = ts_ICE_N_2[1:*]      ; remove first record of 0
65  ts_ICE_N   = ts_ICE_N * 1.E-12    ; remove first record of 0
66  ts_ICE_N_2 = ts_ICE_N_2 * 1.E-12  ; remove first record of 0
67 
68  ts_ICE_S   = ts_ICE_S[1:*]        ; remove first record of 0
69  ts_ICE_S_2 = ts_ICE_S_2[1:*]      ; remove first record of 0
70  ts_ICE_S   = ts_ICE_S * 1.E-12    ; remove first record of 0
71  ts_ICE_S_2 = ts_ICE_S_2 * 1.E-12  ; remove first record of 0
72 
73  Time = ts_Time[1:*]           ; remove first record of 0
74  jpt = n_elements(Time)
75 
76  title = sEXP1+' Global Annual Mean Ice Area (North. Hemisp.) --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
77  pltt, ts_ICE_N, 't', 0., 15., year1 * 10000L + 101, year2 * 10000L + 1231, /REMPLI $
78       , small = [1,2,1], YTITLE='10^12 m^2 ', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
79 
80  title = sEXP1+' Global Annual Mean Ice Area (South. Hemisp.) --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
81  pltt, ts_ICE_S, 't', 0., 15., year1 * 10000L + 101, year2 * 10000L + 1231, /REMPLI, /NOERASE $
82        , small = [1,2,2], YTITLE='10^12 m^2 ', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
83 
84  if sEXP2 ne sEXP1 then begin
85     title = sEXP1+'  - '+sEXP2+' Global Annual Mean Ice Area (North. Hemisp.) --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
86     pltt, ts_ICE_N - ts_ICE_N_2 , 't', -2., 2., year1 * 10000L + 101, year2 * 10000L + 1231, /REMPLI $
87           , COLOR = 250, small = [1,2,1], YTITLE='10^12 m^2 ', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
88     
89     title = sEXP1+' - '+sEXP2+' Global Annual Mean Ice Area (South. Hemisp.) --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
90     pltt, ts_ICE_S - ts_ICE_S_2, 't', -2., 2., year1 * 10000L + 101, year2 * 10000L + 1231, /REMPLI, /NOERASE $
91           , COLOR = 250, small = [1,2,2], YTITLE='10^12 m^2 ', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
92
93  endif
94
95 
96  if KEYWORD_SET(POSTSCRIPT) then begin
97     closeps
98  endif
99 
100 
101  return
102end
Note: See TracBrowser for help on using the repository browser.