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

source: branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_ICE.pro @ 3888

Last change on this file since 3888 was 3888, checked in by flavoni, 11 years ago

update DIL_scripts to add plot of ICE extent and observations

File size: 9.2 KB
Line 
1pro std_ts_ICE, 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  vICE1 = getenv('VAR1_ICE')   &   prefix = getenv('V1ICE_PREF')    &   suffix = getenv('V1ICE_SUFF')
10; get exp2 info
11  vICE2 = getenv('VAR2_ICE')   &   prefix2 = getenv('V2ICE_PREF')   &   suffix2 = getenv('V2ICE_SUFF')
12; get ice climatology info
13  std_file_ice =  isafile(getenv('FILE_ICE'), title = 'ICE Extent Climatology', iodir = std_iodir_climato)
14;
15  time_ice = ncdf_lec( std_file_ice, VAR='time' )
16  time_ice = (time_ice - FLOOR(time_ice) ) * 12
17  time_ice = round(time_ice) ; arrondir a intero + vicino
18  t1 = where(time_ice eq 0)
19  t1 = t1[0] ;  gennaio
20  t2 = where(time_ice eq 11, count)
21  t2 = t2[count-1] ; ultimo giorno di dicembre
22  nyear = (t2-t1+1)/12
23  vICE_ext_NH = ncdf_lec(std_file_ice, VAR=getenv('VAR_ICE_EXT_NH') )
24  vICE_ext_NH = vICE_ext_NH[t1:t2]
25  vICE_ext_NH = reform(vICE_ext_NH,12,nyear); putin 2d array
26  vICE_ext_NH = total(vICE_ext_NH,2)/nyear ; faccio il totale sulla seconda dimensione (gli anni)
27;
28  vICE_ext_SH = ncdf_lec(std_file_ice, VAR=getenv('VAR_ICE_EXT_SH') )
29  vICE_ext_SH = vICE_ext_SH[t1:t2]
30  vICE_ext_SH = reform(vICE_ext_SH,12,nyear); putin 2d array
31  vICE_ext_SH = total(vICE_ext_SH,2)/nyear ; faccio il totale sulla seconda dimensione (gli anni)
32;
33  vICE_area_NH = ncdf_lec(std_file_ice, VAR=getenv('VAR_ICE_area_NH') )
34  vICE_area_NH = vICE_area_NH[t1:t2]
35  vICE_area_NH = reform(vICE_area_NH,12,nyear); putin 2d array
36  vICE_area_NH = total(vICE_area_NH,2)/nyear ; faccio il totale sulla seconda dimensione (gli anni)
37;
38  vICE_area_SH = ncdf_lec(std_file_ice, VAR=getenv('VAR_ICE_area_SH') )
39  vICE_area_SH = vICE_area_SH[t1:t2]
40  vICE_area_SH = reform(vICE_area_SH,12,nyear); putin 2d array
41  vICE_area_SH = total(vICE_area_SH,2)/nyear ; faccio il totale sulla seconda dimensione (gli anni)
42
43  cdti3 = string(cnt, format = '(i3.3)')
44  print, cdti3 + ') ' + blabla
45  filename = cdti3 + '_ts_ICE_'+prefix
46  if prefix NE prefix2 then filename = filename + '_'+prefix2
47  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
48;
49  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
50;
51  iodir = std_iodir_data
52  ; ICE Extent and Ice Extent minus 15% in NORTH Hemisphere
53  domdef, 0, jpi-1, 30, 90, /xindex
54  ICE_N = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
55  ICE_N = grossemoyenne(ICE_N.arr, 'xy', /integration, mask2d = masknp)
56  if jpt mod 12 ne 0 then stop
57  nyr=jpt/12.
58  ice_N = reform(ice_n, 12,nyr)
59  ice_n = total(ice_n,2)/nyr
60  ICE_N = {arr:ICE_N * 1.e-12, unit : '10^12 m^2'}
61  ; extend di ghiaccio meno il 15%
62  ICE_N_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
63  msk = ICE_N_15.arr gt 0.15 ; remove 0.15% for observations
64  ICE_N_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp)
65  if jpt mod 12 ne 0 then stop
66  nyr=jpt/12.
67  ice_N_15 = reform(ice_n_15, 12,nyr)
68  ice_n_15 = total(ice_n_15,2)/nyr
69  ICE_N_15 = {arr:ICE_N_15 * 1.e-12, unit : '10^12 m^2'}
70  ;
71  ;ICE Extent and Ice Extent minus 15% in NORTH Hemisphere
72  domdef, 0, jpi-1, -90, -30, /xindex
73  ICE_S = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
74  ICE_S = grossemoyenne(ICE_S.arr, 'xy', /integration, mask2d = masknp)
75  if jpt mod 12 ne 0 then stop
76  nyr=jpt/12.
77  ice_S = reform(ice_S, 12,nyr)
78  ice_S = total(ice_S,2)/nyr
79  ICE_S = {arr:ICE_S * 1.e-12, unit : '10^12 m^2'}
80  ;
81  ;extend di ghiaccio meno il 15%
82  ICE_S_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
83  msk = ICE_S_15.arr gt 0.15 ; remove 0.15% for observations
84  ICE_S_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp)
85  if jpt mod 12 ne 0 then stop
86  nyr=jpt/12.
87  ice_S_15 = reform(ice_S_15, 12,nyr)
88  ice_S_15 = total(ice_S_15,2)/nyr
89  ICE_S_15 = {arr:ICE_S_15 * 1.e-12, unit : '10^12 m^2'}
90  ;
91  title = prefix+' '+d1_d2+'!C'+'Global Annual Mean Ice Area (North. Hemisp.) (Black SOLID simulation) and Extend minus 15% (Blue SOLID simulation)'+'!C'+'Observation (dashed)'
92  jpt=12
93  time=julday(1,15,1900)+30*lindgen(12)
94  pltt, ICE_N, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT,MIN = 4., MAX = 16. $
95        , small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
96  pltt, ICE_N_15, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $
97        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
98  pltt,  vICE_area_NH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate  $
99         , /ov1d, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
100  pltt,  vICE_ext_NH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate  $
101        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
102;;;DA RIMETTERE? return
103  title = prefix+' '+d1_d2+' - '+'Global Annual Mean Ice Area (South. Hemisp.) (Black) and Extend minus 15% (Blue)'+'!C'+'Observation (dashed)'
104  pltt, ICE_S, 't', 0., 15.,19000101 ,19001231 , /REMPLI, /NOERASE , MIN = 0., MAX = 20. $
105        , small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
106  pltt, ICE_S_15, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $
107        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
108  pltt,  vICE_area_SH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate  $
109         , /ov1d, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
110  pltt,  vICE_ext_SH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate  $
111        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
112;;return
113  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
114  if KEYWORD_SET(postscript) then closeps
115
116  if prefix NE prefix2 then BEGIN
117
118    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
119
120    tsave = time
121    domdef, 0, jpi-1, 30, 90, /xindex
122    ICE_N2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
123    ICE_N2 = grossemoyenne(ICE_N2.arr, 'xy', /integration, mask2d = masknp)
124    if jpt mod 12 ne 0 then stop
125    nyr=jpt/12.
126    ICE_N2 = reform(ICE_N2, 12,nyr)
127    ICE_N2 = total(ICE_N2,2)/nyr
128    ICE_N2 = {arr:ICE_N2 * 1.e-12, unit : '10^12 m^2'}
129    ; extend di ghiaccio meno il 15%
130    ICE_N2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix_2, suffix_2, FIRSTONLY = 1 - allrec)
131    msk = ICE_N2_15.arr gt 0.15  ; remove 0.15% for observations
132    ICE_N2_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp)
133    if jpt mod 12 ne 0 then stop
134    nyr=jpt/12.
135    ICE_N2_15 = reform(ICE_N2_15, 12,nyr)
136    ICE_N2_15 = total(ICE_N2_15,2)/nyr
137    ICE_N2_15 = {arr:ICE_N2_15 * 1.e-12, unit : '10^12 m^2'}
138     ;ICE Extent and Ice Extent minus 15% in NORTH Hemisphere
139    domdef, 0, jpi-1, -90, -30, /xindex
140    ICE_S2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix_2, suffix_2, FIRSTONLY = 1 - allrec)
141    ICE_S2 = grossemoyenne(ICE_S2.arr, 'xy', /integration, mask2d = masknp)
142    if jpt mod 12 ne 0 then stop
143    nyr=jpt/12.
144    ICE_S2 = reform(ICE_S2, 12,nyr)
145    ICE_S2 = total(ICE_S2,2)/nyr
146    ICE_S2 = {arr:ICE_S2 * 1.e-12, unit : '10^12 m^2'}
147    ;
148    ;extend di ghiaccio meno il 15%
149    ICE_S2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix_2, suffix_2, FIRSTONLY = 1 - allrec)
150    msk = ICE_S2_15.arr gt 0.15  ; remove 0.15% for observations
151    ICE_S2_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp)
152    if jpt mod 12 ne 0 then stop
153    nyr=jpt/12.
154    ice_S2_15 = reform(ICE_S2_15, 12,nyr)
155    ice_S2_15 = total(ICE_S2_15,2)/nyr
156    ICE_S2_15 = {arr:ICE_S2_15 * 1.e-12, unit : '10^12 m^2'}
157  ;
158    time = tsave   &   IF n_elements(time) NE jpt THEN stop
159
160    if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
161
162    title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Global Annual Mean Ice Area (North. Hemisp.) (Red SOLID simulation)  and Extend minus 15% (Blue SOLID simulation)'
163    pltt, ICE_N.arr - ICE_N2.arr, 't', -2., 2., date1, date2, /REMPLI, /PORTRAIT, window = 2 $
164          , COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
165    pltt, ICE_N_15.arr -  ICE_N2_15.arr , 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $
166      , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
167   
168    title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Global Annual Mean Ice Area (South. Hemisp.) (Red SOLID simulation)  and Extend minus 15% (Blue SOLID simulation)'
169    pltt, ICE_S.arr - ICE_S2.arr, 't', -2., 2., date1, date2, /REMPLI, /NOERASE $
170          , COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
171    pltt, ICE_S_15.arr -  ICE_S2_15.arr , 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $
172      , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
173   
174
175    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
176    if KEYWORD_SET(postscript) then closeps
177
178  endif
179
180  domdef
181 
182
183  return
184end
Note: See TracBrowser for help on using the repository browser.