source: trunk/CONFIG/ORCA2_LIM/IDL_scripts/std_plots.pro @ 2150

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

commit idl tools for post-processing, for ORCA2_LIM configuration, see ticket #724

File size: 16.5 KB
Line 
1pro std_plots, std_EXP1, std_EXP2, ystart, _extra=ex
2
3
4PRINT, 'usage: postscript '
5PRINT, '========================================================================'
6PRINT, 'std_plots, ''std_EXP1'', ''std_EXP2'', ystart, /postscript'
7PRINT, '========================================================================'
8PRINT, 'std_plots, ''core2000'', ''core2000'', 1991, /postscript'
9PRINT, '========================================================================'
10
11
12  compile_opt idl2, strictarrsubs
13
14  PRINT, ''
15  PRINT, '  ############################################'
16  PRINT, ''
17  PRINT, '                    LAUNCH of std_plots'
18  PRINT, ''
19  PRINT, '  ############################################'
20  PRINT, ''
21
22
23@common
24@initorca2
25@std_com
26
27  year_start = ystart * 10000L + 101L                                                 ; year of start (corresponding to filename)
28  year_end = (ystart + 9L) * 10000L + 1231L                                           ; year of end (corresponding to filename)
29  start_end = string(year_start,format= '(I08)')+'_'+string(year_end,format ='(I08)') ; variable string for filename
30;;;;; ======================CHANGE PATH================================================================= ;;;;;;;;;;
31  std_iodir_data    = '/path_of_data_in_NetCdf_format/'                       ; path of data in NetCdf format
32  std_iodir_climato = '/path_of_climatological_data/'                                  ; path of climatological data
33  std_iodir_mask    = '/path_of_mask_files/'                                       ; path of mask files (ex: subbasins)
34;;;;; ======================END CHANGE PATH================================================================= ;;;;;;;;;;
35
36 
37;;;;; ==================================================== WARNING ================================================================= ;;;;;;;;;;
38  d1 = (ystart + 9L) * 10000L + 101L ;  date to select last record of file with 10 years of record
39  d2 = year_end  ; date to select last record of file with 10 years of record
40  id1 = (ystart + 9L) * 10000L + 1201L ; date to select starting date for (monthly) ice output
41  id2 = d2 ; date to select last record for (monthly) ice output
42  id_mars_1 = (ystart + 9L) * 10000L + 301L ; date to select mars ice output
43  id_mars_2 = (ystart + 9L) * 10000L + 331L  ; date to select mars ice output
44  id_sept_1 = (ystart + 9L) * 10000L + 901L ; date to select september ice output
45  id_sept_2 = (ystart + 9L) * 10000L + 930L ; date to select september ice output
46;
47; Levitus 98
48  std_file_Levitus_T =  'data_1y_potential_temperature_nomask.nc'
49  std_file_Levitus_S =  'data_1y_salinity_nomask.nc'
50
51; Output run experience1
52  std_file1_T     = std_EXP1+'_'+start_end+'_1Y_grid_T.nc' ; grid T input file
53  std_file1_U     = std_EXP1+'_'+start_end+'_1Y_grid_U.nc' ; grid U input file
54  std_file1_V     = std_EXP1+'_'+start_end+'_1Y_grid_V.nc' ; grid V input file
55;  std_file1_W    = std_EXP1+'_'+start_end+'_1Y_grid_W.nc' ; grid W input file
56  std_file1_I     = std_EXP1+'_'+start_end+'_1M_icemod.nc' ; ice    input file
57 
58; Output run experience2
59  std_file2_T     = std_EXP2+'_'+start_end+'_1Y_grid_T.nc' ; grid T input file
60  std_file2_U     = std_EXP2+'_'+start_end+'_1Y_grid_U.nc' ; grid U input file
61  std_file2_V     = std_EXP2+'_'+start_end+'_1Y_grid_V.nc' ; grid V input file
62;  std_file2_W    = std_EXP2+'_'+start_end+'_1Y_grid_W.nc' ; grid W
63  std_file2_I     = std_EXP2+'_'+start_end+'_1M_icemod.nc' ; ice    input file
64
65
66  PRINT, ''
67  PRINT, '  std_EXP1       : ', std_EXP1
68  PRINT, '  std_EXP2       : ', std_EXP2
69  PRINT, '  std_iodir_data : ', std_iodir_data
70  PRINT, '  std_file1T : ', std_file1_T
71  PRINT, '  std_file1U : ', std_file1_U
72  PRINT, '  std_file1V : ', std_file1_V
73;  PRINT, ' std_file1W : ', std_file1_W
74  PRINT, '  std_file2I : ', std_file1_I
75  PRINT, '  std_file2T : ', std_file2_T
76  PRINT, '  std_file2U : ', std_file2_U
77  PRINT, '  std_file2V : ', std_file2_V
78;  PRINT, ' std_file2W : ', std_file2_W
79  PRINT, '  std_file2I : ', std_file2_I
80  PRINT, ''
81
82;#########################################################################
83; reading variables
84
85;;; 3D ;;;
86; temperature
87  T1   = read_ncdf('thetao', d1, d2, filename = std_iodir_data+std_file1_T                          )
88  T2   = read_ncdf('thetao', d1, d2, filename = std_iodir_data+std_file2_T                          )
89  TLev = read_ncdf('votemper', filename = std_iodir_climato+std_file_Levitus_T                )
90  TRey = read_ncdf('sst'     , filename = std_iodir_climato+'NewREY_ORCA2_1991_2000_1y.nc'    )
91
92;help,T1,T2,TLev,TRey
93
94; salinity
95  S1   = read_ncdf('so', d1, d2, filename = std_iodir_data+std_file1_T             )
96  S2   = read_ncdf('so', d1, d2, filename = std_iodir_data+std_file2_T             )
97  SLev = read_ncdf('vosaline', filename = std_iodir_climato+std_file_Levitus_S     )
98
99; Net Downward heat flux
100  Q1   = read_ncdf('qns+qsr', d1, d2, filename = std_iodir_data+std_file1_T           )
101  Q2   = read_ncdf('qns+qsr', d1, d2, filename = std_iodir_data+std_file2_T           )
102  geo  = read_ncdf('heatflow', filename=  std_iodir_climato+'geothermal_heating.nc'   )
103  geo  = geo.arr*1.e-3      ; convert into W/m2
104;climatology
105  QNET  = read_ncdf('qnet', filename = std_iodir_climato+'OAFlux_1my_01_12_1984_2004_orca2_qnet.nc'   )
106
107; erp (evaporation damping)
108  ERP1   = read_ncdf('wfcorr', d1, d2, filename = std_iodir_data+std_file1_T  )
109  ERP2   = read_ncdf('wfcorr', d1, d2, filename = std_iodir_data+std_file2_T  )
110  ERP1   = ERP1.arr * 86400
111  ERP2   = ERP2.arr * 86400
112
113; emp (evaporation minus precipitation)
114  EMP1   = read_ncdf('wfo', d1, d2, filename = std_iodir_data+std_file1_T     )
115  EMP2   = read_ncdf('wfo', d1, d2, filename = std_iodir_data+std_file2_T     )
116  EMP1   = EMP1.arr * 86400
117  EMP2   = EMP2.arr * 86400
118
119 
120;mixed layer depth
121  MXL1 = read_ncdf('mldr10_1', d1, d2, filename = std_iodir_data+std_file1_T         )  ; 10 m
122  MXL2 = read_ncdf('mldr10_1', d1, d2, filename = std_iodir_data+std_file2_T         )  ; 10 m
123;climatology
124  MLD  = read_ncdf('mld', filename = std_iodir_climato+'mld_DR003_c1m_ORCA2_1y.nc'   )
125
126; current
127  U1   = read_ncdf('uoce_eff', d1, d2, filename = std_iodir_data+std_file1_U         )
128  U2   = read_ncdf('uoce_eff', d1, d2, filename = std_iodir_data+std_file2_U         )
129
130; Take into account the Gent & McWilliams "Eddy Induced velocity"
131  V1   = read_ncdf('voce_eff', d1, d2, filename = std_iodir_data+std_file1_V         )
132  V2   = read_ncdf('voce_eff', d1, d2, filename = std_iodir_data+std_file2_V         )
133
134; ice
135  Ithi_mars_1   = read_ncdf('sit', id_mars_1, id_mars_2, filename = std_iodir_data+std_file1_I )
136  Ithi_mars_2   = read_ncdf('sit', id_mars_1, id_mars_2, filename = std_iodir_data+std_file2_I )
137
138  Ithi_sept_1   = read_ncdf('sit', id_sept_1, id_sept_2, filename = std_iodir_data+std_file1_I )
139  Ithi_sept_2   = read_ncdf('sit', id_sept_1, id_sept_2, filename = std_iodir_data+std_file2_I )
140
141  Ifra_mars_1   = read_ncdf('sic', id_mars_1, id_mars_2, filename = std_iodir_data+std_file1_I )
142  Ifra_mars_2   = read_ncdf('sic', id_mars_1, id_mars_2, filename = std_iodir_data+std_file2_I )
143
144  Ifra_sept_1   = read_ncdf('sic', id_sept_1, id_sept_2, filename = std_iodir_data+std_file1_I )
145  Ifra_sept_2   = read_ncdf('sic', id_sept_1, id_sept_2, filename = std_iodir_data+std_file2_I )
146
147 
148;#########################################################################
149
150;#########################################################################
151;######################  STANDARD PLOTS   ################################
152;#########################################################################
153
154; fixed color tabled
155  lct,64
156
157  PRINT, '  '
158  PRINT, '           Experience treated:', std_EXP1
159  PRINT, '  '
160  PRINT, '  '
161  PRINT, '  '
162
163       ;;;;;;;; ErP & Emp salinity damping term
164       ;;;;;;;; =============================================
165  PRINT, '============================================= '
166  PRINT, ' PLOTS 2D '
167  PRINT, '============================================= '
168  PRINT, '                                ErP salinity damping term'
169  PRINT, '1'
170  xxx_Erp, ERP1, ERP2, std_EXP1, std_EXP2, start_end, _extra = ex
171  PRINT, '2'
172  xxx_Emp, EMP1, EMP2, std_EXP1, std_EXP2, start_end, _extra = ex
173 
174       ;;;;; Net heat flux
175        ;;;;; =============
176  PRINT, ' '
177  PRINT, '                               Net heat flux'
178  PRINT, '3 '
179  xxx_Qnet, Q1, Q2, QNET, std_EXP1, std_EXP2, start_end, _extra = ex
180
181       ;;; Meridionnal Heat Transport
182        ;;; ===========================
183  PRINT, ' '
184  PRINT, '                               Meridionnal Heat Transport'
185  PRINT, '4 '
186  fig_ht_fromQ, Q1.arr+geo, Q2.arr+geo, std_EXP1, std_EXP2, start_end, MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
187
188        ;;; Global Barotropic Function
189        ;;; ===========================
190  PRINT, ' '
191  PRINT, '           Global Barotropic Function '
192  PRINT, '5 '
193  plt_bsf, U1, U2, std_EXP1, std_EXP2, start_end, _extra=ex
194
195  ;; mean Temperature diff with New Reynolds
196  ;; =======================================
197  PRINT, ' '
198  PRINT, '           mean Temperature diff with New Reynolds'
199  PRINT, '6 '
200  xxx_SST, T1[*,*,0], T2[*,*,0], TRey, std_EXP1, std_EXP2, start_end, _extra=ex
201
202
203        ;;;; mean Salinity diff with Levitus
204        ;;;; ===============================
205  PRINT, ' '
206  PRINT, '                               mean Salinity diff with Levitus'
207  PRINT, '7 '
208  xxx_SSS, S1[*,*,0], S2[*,*,0], SLev[*,*,0], std_EXP1, std_EXP2, start_end, _extra=ex
209
210      ;;;;;;; Arctic mean Salinity diff with Levitus at z=105 meters
211        ;;;;;;; ======================================================
212  PRINT, ' '
213  PRINT, '                               Arctic mean Salinity diff with Levitus at z=105 meters'
214  PRINT, '8 exp1-levitus'
215  xxx_EXP1_S_ARC_z105, S1, SLev, std_EXP1, std_EXP2, start_end, _extra = ex       
216  PRINT, '9 exp2-levitus'
217  xxx_EXP2_S_ARC_z105, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
218
219
220        ;;;;;;;; mean Temperature diff with Levitus at z=105 meters
221        ;;;;;;;; ==================================================
222  PRINT, ' '
223  PRINT, '                               mean Temperature diff with Levitus at z=105 meters'
224  PRINT, '10'
225  xxx_T_z105, T1, T2, TRey, std_EXP1, std_EXP2, start_end, _extra=ex
226                             
227
228        ;;;;;;;; mean Salinity diff with Levitus at z=105 meters
229        ;;;;;;;; ==================================================
230  PRINT, ' '
231  PRINT, '                               mean Salinity diff with Levitus at z=105 meters'
232  PRINT, '11'
233  xxx_S_z105, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra=ex
234                           
235
236  PRINT, '============================================= '
237  PRINT, ' PLOTS 3D '
238  PRINT, '============================================= '
239 
240  PRINT, '                         Mixed layer depth'
241  PRINT, '12 '
242  xxx_mxl10, MXL1, MXL2, MLD, std_EXP1, std_EXP2, start_end,  _extra = ex
243  PRINT, '13'
244  xxx_ZonMxl, MXL1, MXL2, MLD, std_EXP1, std_EXP2, start_end, _extra = ex
245 
246
247        ;;;;;;;;; Zonal mean Temperature diff with Levitus
248        ;;;;;;;;; ========================================
249  PRINT, ' '
250  PRINT, '                               Zonal mean Temperature diff with Levitus'
251  PRINT, '14 '
252  xxx_zonal_T, T1, T2, TLev, std_EXP1, std_EXP2, start_end, MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
253
254  PRINT, '14 '                     
255  xxx_zonal_T, T1, T2, TLev, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Atl', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
256 
257  PRINT, '14 '
258  xxx_zonal_T, T1, T2, TLev, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Ind', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
259 
260  PRINT, '14 '
261  xxx_zonal_T, T1, T2, TLev, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Pac', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
262 
263
264        ;;;;;;;;;; Zonal mean Salinity diff with Levitus
265        ;;;;;;;;;; ========================================
266  PRINT, ' '
267  PRINT, '                               Zonal mean Salinity diff with Levitus'
268  PRINT, '15 '
269  xxx_zonal_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
270                               
271  PRINT, '15 '
272  xxx_zonal_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Atl', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
273                             
274  PRINT, '15'
275  xxx_zonal_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Ind', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
276
277  PRINT, '15 '
278  xxx_zonal_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Pac', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
279 
280        ;;;;;;; Seasonal & Annual mean Arctic/Antarctic Ice Thickness & Ice Concentration
281        ;;;;;; ==========================================================================
282  PRINT, ' '
283  PRINT, '                               Arctic/Antarctic Ice Thickness'
284  PRINT, ' 16'
285  xxx_ARC_Icethick_MARS, Ithi_mars_1, Ithi_mars_2, std_EXP1, std_EXP2, start_end, _extra = ex
286 
287  PRINT, ' 16'
288  xxx_ARC_Icethick_SEPT, Ithi_sept_1, Ithi_sept_2, std_EXP1, std_EXP2, start_end, _extra = ex
289 
290  PRINT, ' 17'
291  xxx_ANT_Icethick_MARS, Ithi_mars_1, Ithi_mars_2, std_EXP1, std_EXP2, start_end, _extra = ex
292
293  PRINT, ' 17'
294  xxx_ANT_Icethick_SEPT, Ithi_sept_1, Ithi_sept_2, std_EXP1, std_EXP2, start_end, _extra = ex
295
296  PRINT, '                               Arctic/Antarctic Ice Concentration (area of sea-ice per grid cell area'
297  PRINT, ' 18'
298  xxx_Iceleadfrac_MARS, Ifra_mars_1, Ifra_mars_2, std_EXP1, std_EXP2, start_end, _extra = ex
299
300  PRINT, ' 18'
301  xxx_Iceleadfrac_SEPT, Ifra_sept_1, Ifra_sept_2, std_EXP1, std_EXP2, start_end, _extra = ex
302
303                       
304        ;;; Global and Atlantic Meridional Function
305        ;;; =======================================
306  PRINT, ' '
307  PRINT, '           Global and Atlantic Meridional Function'
308  PRINT, '19 '
309  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Glo', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
310  PRINT, '19 '
311  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Atl', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
312  PRINT, '19 '
313  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Ind', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
314  PRINT, '19 '
315  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Pac', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
316
317
318  PRINT, '============================================= '
319  PRINT, ' Local PLOTS '
320  PRINT, '============================================= '
321
322        ;;;;;;;;; Equatorial Temperature
323        ;;;;;;;;; ======================
324  PRINT, ' '
325  PRINT, '                               Equatorial Temperature'
326  PRINT, ' '
327  PRINT, '20 '
328  xxx_Eq_T, T1, T2, Tlev, std_EXP1, std_EXP2, start_end, _extra = ex
329
330        ;;;;;;;; Equatorial Salinity
331        ;;;;;;;; ===================
332  PRINT, ' '
333  PRINT, '                               Equatorial Salinity'
334  PRINT, '21'
335  xxx_Eq_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
336
337        ;;; Equatorial zonal velocity
338        ;;; =========================
339  PRINT, ' '
340  PRINT, '                               Equatorial zonal velocity'
341  PRINT, '22 '
342  xxx_Eq_U, U1, U2, std_EXP1, std_EXP2, start_end, _extra = ex
343 
344       ;;;;;;;;;;;; Mediterranean salt tongue
345       ;;;;;;;;;;;; ===============================================
346 
347  PRINT, ' '
348  PRINT, '                               Mediterranean salt tongue at depth=700 and lat 40°N'
349  PRINT, '23'
350  xxx_Med_S_tongue, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 700,  LAT = 40, _extra = ex
351  ;
352  PRINT, '                               Mediterranean salt tongue at depth=1000 and lat 38°N'
353  PRINT, '23'
354  xxx_Med_S_tongue, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 1000, LAT = 38, _extra = ex
355
356        ;;;;;;;;; Mediterranean
357        ;;;;;;;;; ===============================================
358  PRINT, ' '
359  PRINT, '                               Mediterranean water at 38°N'
360  PRINT, '24'
361  xxx_Med_S_depth, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 1000, LAT = 38, _extra = ex
362  PRINT, '                               Mediterranean water at 38°N'
363  PRINT, '24 '
364  xxx_Med_S_depth, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 700,  LAT = 40, _extra = ex
365
366        ;;;;;;;;;;; Vertical Global mean T & S
367        ;;;;;;;;;;; ===========================
368  PRINT, ' '
369  PRINT, '                                Vertical Global mean T & S'
370  PRINT, '25 '
371  xxx_TS_ZGlobm, T1, T2, TLev, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
372
373 
374  return
375END
Note: See TracBrowser for help on using the repository browser.