source: NEMO/trunk/doc/si3_doc/Figures/scripts/ice_cats.pro @ 9996

Last change on this file since 9996 was 9982, checked in by vancop, 3 years ago

SI3 doc update

File size: 4.4 KB
Line 
1
2;
3;==============================================================================
4; 1) User parameters
5;==============================================================================
6;
7
8out_dir=''
9file_out   = 'ThicknessSpace'
10
11numplot_x = 1       ; number of horizontal plots
12numplot_y = 1       ; number of vertical plots
13ct = 13             ; colortable
14cs = 2.0            ; size of fonts on plots (1=normal)
15th = 2.             ; thickness of curves
16device = 'PS'       ; 'PS' or 'X'
17
18;
19;==============================================================================
20; 2) Initialize graphics
21;==============================================================================
22;
23
24dx = 12.
25dy = 8.
26figuresize_x = numplot_x * dx; figure size on x direction
27figuresize_y = numplot_y * dy; figure size on y direction
28SET_PLOT, DEVICE
29;!P.FONT=1
30TVLCT, [0,255,0,0], [0,0,255,0], [0,0,0,255]
31IF ( device EQ 'PS' ) THEN BEGIN
32;   DEVICE, /COLOR, /LANDSCAPE, filename=out_dir+file_out+'.ps', $
33;           XSIZE=figuresize_x,YSIZE=figuresize_y,FONT_SIZE=12.0, SET_FONT='Helvetica', BITS = 16
34   DEVICE, /COLOR, /LANDSCAPE, filename=out_dir+file_out+'.ps', $
35           XSIZE=figuresize_x,YSIZE=figuresize_y,FONT_SIZE=9.0
36ENDIF
37
38IF ( device EQ 'X' ) THEN BEGIN
39   xsize = 1200
40   ysize = 800
41   colorkey = 'rd'
42   init_graphics_x, xsize, ysize, colorkey
43ENDIF
44
45!P.MULTI=[0,numplot_x,numplot_y]
46!X.MARGIN   = [7,3]
47!Y.MARGIN   = [4,3]
48
49;
50;==============================================================================
51; 2) Initialize graphics
52;==============================================================================
53;
54
55jpl = 5
56jpl1 = 10
57
58;-----------------------
59; original CICE version
60;-----------------------
61
62hi_max_cice_5 = FLTARR(jpl+1)
63hi_max_cice_5(0) = 0
64zc1 =  3. / FLOAT(jpl)
65zc2 = 10. * zc1
66zc3 =  3.
67
68FOR jl = 1, jpl  DO BEGIN
69   zx1 = FLOAT( jl-1 ) / FLOAT( jpl )
70   hi_max_cice_5(jl) = hi_max_cice_5(jl-1) + zc1 + zc2 * (1. + TANH( zc3 * (zx1 - 1. ) ) )
71ENDFOR
72
73hi_max_cice_10 = FLTARR(jpl1+1)
74hi_max_cice_10(0) = 0
75zc1 =  3. / FLOAT(jpl1)
76zc2 = 10. * zc1
77zc3 =  3.
78
79FOR jl = 1, jpl1  DO BEGIN
80   zx1 = FLOAT( jl-1 ) / FLOAT( jpl1 )
81   hi_max_cice_10(jl) = hi_max_cice_10(jl-1) + zc1 + zc2 * (1. + TANH( zc3 * (zx1 - 1. ) ) )
82ENDFOR
83
84;-------------------
85; LIM3 distribution
86;-------------------
87alpha = 1./20.
88
89; 5 categories, Arctic ice
90hmean = 2.5
91hL = 3.*hmean
92
93hi_max_1 = FLTARR(jpl + 1)
94hi_max_1(0) = 0.
95
96FOR jl = 1, jpl DO BEGIN
97   znum = jpl * ( hL+1 )^alpha
98   zden = ( jpl - jl ) * ( hL+1 )^alpha + jl
99   hi_max_1(jl) = ( znum / zden )^(1./alpha) - 1
100ENDFOR
101
102; 10 categories, Arctic ice
103hi_max_2 = FLTARR(jpl1 + 1)
104hi_max_2(0) = 0.
105FOR jl = 1, jpl1 DO BEGIN
106   znum = jpl1 * ( hL+1 )^alpha
107   zden = ( jpl1 - jl ) * ( hL+1 )^alpha + jl
108   hi_max_2(jl) = ( znum / zden )^(1./alpha) - 1
109ENDFOR
110
111; 5 categories, Spitzberg
112hmean = 1.0
113hL = 3.*hmean
114
115hi_max_3 = FLTARR(jpl + 1)
116hi_max_3(0) = 0.
117
118FOR jl = 1, jpl DO BEGIN
119   znum = jpl * ( hL+1 )^alpha
120   zden = ( jpl - jl ) * ( hL+1 )^alpha + jl
121   hi_max_3(jl) = ( znum / zden )^(1./alpha) - 1
122ENDFOR
123
124; 10 categories, Spitzberg
125hmean = 1.0
126hi_max_4 = FLTARR(jpl1 + 1)
127hi_max_4(0) = 0.
128
129FOR jl = 1, jpl1 DO BEGIN
130   znum = jpl1 * ( hL+1 )^alpha
131   zden = ( jpl1 - jl ) * ( hL+1 )^alpha + jl
132   hi_max_4(jl) = ( znum / zden )^(1./alpha) - 1
133ENDFOR
134
135!P.MULTI = [ 0, numplot_x, numplot_y ]
136
137PLOT, [0.1, 10.], [0., 7.], /NODATA, charsize = cs, XSTYLE = 1, YSTYLE = 1
138OPLOT, hi_max_cice_5, FINDGEN(jpl+1)*0.+1, psym = 4, symsize = 1, thick = 2
139OPLOT, hi_max_cice_10, FINDGEN(jpl1+1)*0.+2, psym = 4, symsize = 1, thick = 2, color =150
140OPLOT, hi_max_1, FINDGEN(jpl+1)*0.+3   , psym = 1, symsize = 1, thick = 2, color = 0
141OPLOT, hi_max_2, FINDGEN(jpl1+1)*0.+4  , psym = 1, symsize = 1, thick = 2, color = 150
142OPLOT, hi_max_3, FINDGEN(jpl+1)*0.+5   , psym = 2, symsize = 1, thick = 2, color = 0
143OPLOT, hi_max_4, FINDGEN(jpl1+1)*0.+6   , psym = 2, symsize = 1, thick = 2, color = 150
144
145PLOT, FINDGEN(jpl+1)/jpl, hi_max_cice_5, psym = 4, symsize = 1, thick = 2, charsize = cs
146OPLOT, FINDGEN(jpl1+1)/jpl1, hi_max_cice_10, psym = 4, symsize = 1, thick = 2, color = 150
147OPLOT, FINDGEN(jpl+1)/jpl, hi_max_1,   psym = 1, symsize = 1, thick = 2
148OPLOT, FINDGEN(jpl1+1)/jpl1, hi_max_2, psym = 1, symsize = 1, thick = 2, color = 150
149OPLOT, FINDGEN(jpl+1)/jpl, hi_max_3,   psym = 2, symsize = 1, thick = 2
150OPLOT, FINDGEN(jpl1+1)/jpl1, hi_max_4, psym = 2, symsize = 1, thick = 2, color = 150
151
152
153DEVICE, /CLOSE
154SET_PLOT, 'X'
155!P.MULTI=[0,1,1]
156END
157
Note: See TracBrowser for help on using the repository browser.