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

source: trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plots.pro @ 2711

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

update idl scripts, see ticket 724

File size: 17.2 KB
Line 
1pro std_plots, std_EXP1, std_EXP2, ystart, _extra=ex
2 
3 ; scripts for nemo v3_3
4
5
6PRINT, 'usage: postscript '
7PRINT, '========================================================================'
8PRINT, 'std_plots, ''std_EXP1'', ''std_EXP2'', ystart, /postscript'
9PRINT, '========================================================================'
10PRINT, 'std_plots, ''core2000'', ''core2000'', 1991, /postscript'
11PRINT, '========================================================================'
12
13
14  compile_opt idl2, strictarrsubs
15
16  PRINT, ''
17  PRINT, '  ############################################'
18  PRINT, ''
19  PRINT, '                    LAUNCH of std_plots'
20  PRINT, ''
21  PRINT, '  ############################################'
22  PRINT, ''
23
24
25@common
26@initorca2
27@std_com
28
29  year_start = ystart * 10000L + 101L                                                 ; year of start (corresponding to filename)
30  year_end = (ystart + 9L) * 10000L + 1231L                                           ; year of end (corresponding to filename)
31  start_end = string(year_start,format= '(I08)')+'_'+string(year_end,format ='(I08)') ; variable string for filename
32;  std_iodir_data    = '/Users/sflod/idl_PLOTS/DATA_STORE/RUN_INTERAN/brodie/'        ; path of data in NetCdf format
33  std_iodir_data    = '/Users/sflod/idl_PLOTS/DATA_STORE/RUN_CLIMATO/brodie/'        ; path of data in NetCdf format
34  std_iodir_climato = '/Users/sflod/idl_PLOTS/CLIMATOLOGIES/'                         ; path of climatological data
35  std_iodir_mask    = '/Users/sflod/idl_PLOTS/MASK/'                                  ; path of mask files (ex: subbasins)
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
92help,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('qt', d1, d2, filename = std_iodir_data+std_file1_T               )
101  Q2   = read_ncdf('qt', 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
105;climatology
106  QNET  = read_ncdf('qnet', filename = std_iodir_climato+'OAFlux_1my_01_12_1984_2004_orca2_qnet.nc'   )
107
108; erp (evaporation damping)
109  ERP1   = read_ncdf('wfcorr', d1, d2, filename = std_iodir_data+std_file1_T           )
110  ERP2   = read_ncdf('wfcorr', d1, d2, filename = std_iodir_data+std_file2_T           )
111  ERP1   = ERP1.arr * 86400
112  ERP2   = ERP2.arr * 86400
113
114; emp (evaporation minus precipitation)
115  EMP1   = read_ncdf('wfo', d1, d2, filename = std_iodir_data+std_file1_T           )
116  EMP2   = read_ncdf('wfo', d1, d2, filename = std_iodir_data+std_file2_T           )
117  EMP1   = EMP1.arr * 86400
118  EMP2   = EMP2.arr * 86400
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; velocities
127  U1   = read_ncdf('uocetr_eff', d1, d2, filename = std_iodir_data+std_file1_U             )
128  U2   = read_ncdf('uocetr_eff', d1, d2, filename = std_iodir_data+std_file2_U             )
129  e23 = e3u_3d(/e2)
130  e23 = e23[*]#replicate(1., jpt)
131  U1.arr = U1.arr /e23
132  U2.arr = U2.arr /temporary(e23)
133  U1.unit = 'm/s'
134  U2.unit = 'm/s'
135;
136  V1   = read_ncdf('vocetr_eff', d1, d2, filename = std_iodir_data+std_file1_V             )
137  V2   = read_ncdf('vocetr_eff', d1, d2, filename = std_iodir_data+std_file2_V             )
138  e13 = e3u_3d(/e1)
139  e13 = e13[*]#replicate(1., jpt)
140  V1.arr = V1.arr /e13
141  V2.arr = V2.arr /temporary(e13)
142  V1.unit = 'm/s'
143  V2.unit = 'm/s'
144
145; Take into account the Gent & McWilliams "Eddy Induced velocity"
146;  Veiv1 = read_ncdf('vomeeivv', filename = std_iodir_data+std_file2_V )
147;  Veiv2 = read_ncdf('vomeeivv', filename = std_iodir_data+std_file2_V )
148
149; ice
150  Ithi_mars_1   = read_ncdf('sit', id_mars_1, id_mars_2, filename = std_iodir_data+std_file1_I )
151  Ithi_mars_2   = read_ncdf('sit', id_mars_1, id_mars_2, filename = std_iodir_data+std_file2_I )
152
153  Ithi_sept_1   = read_ncdf('sit', id_sept_1, id_sept_2, filename = std_iodir_data+std_file1_I )
154  Ithi_sept_2   = read_ncdf('sit', id_sept_1, id_sept_2, filename = std_iodir_data+std_file2_I )
155
156  Ifra_mars_1   = read_ncdf('sic', id_mars_1, id_mars_2, filename = std_iodir_data+std_file1_I )
157  Ifra_mars_2   = read_ncdf('sic', id_mars_1, id_mars_2, filename = std_iodir_data+std_file2_I )
158
159  Ifra_sept_1   = read_ncdf('sic', id_sept_1, id_sept_2, filename = std_iodir_data+std_file1_I )
160  Ifra_sept_2   = read_ncdf('sic', id_sept_1, id_sept_2, filename = std_iodir_data+std_file2_I )
161
162 
163;#########################################################################
164
165;#########################################################################
166;######################  STANDARD PLOTS   ################################
167;#########################################################################
168
169; fixed color tabled
170  lct,64
171
172  PRINT, '  '
173  PRINT, '           Experience treated:', std_EXP1
174  PRINT, '  '
175  PRINT, '  '
176  PRINT, '  '
177
178       ;;;;;;;; ErP & Emp salinity damping term
179       ;;;;;;;; =============================================
180  PRINT, '============================================= '
181  PRINT, ' PLOTS 2D '
182  PRINT, '============================================= '
183  PRINT, '                                ErP salinity damping term'
184  PRINT, '1'
185  xxx_Erp, ERP1, ERP2, std_EXP1, std_EXP2, start_end, _extra = ex
186  PRINT, '2'
187  xxx_Emp, EMP1, EMP2, std_EXP1, std_EXP2, start_end, _extra = ex
188 
189       ;;;;; Net heat flux
190        ;;;;; =============
191  PRINT, ' '
192  PRINT, '                               Net heat flux'
193  PRINT, '3 '
194  xxx_Qnet, Q1, Q2, QNET, std_EXP1, std_EXP2, start_end, _extra = ex
195
196       ;;; Meridionnal Heat Transport
197        ;;; ===========================
198  PRINT, ' '
199  PRINT, '                               Meridionnal Heat Transport'
200  PRINT, '4 '
201  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
202
203        ;;; Global Barotropic Function
204        ;;; ===========================
205  PRINT, ' '
206  PRINT, '           Global Barotropic Function '
207  PRINT, '5 '
208  plt_bsf, U1, U2, std_EXP1, std_EXP2, start_end, _extra=ex
209
210  ;; mean Temperature diff with New Reynolds
211  ;; =======================================
212  PRINT, ' '
213  PRINT, '           mean Temperature diff with New Reynolds'
214  PRINT, '6 '
215  xxx_SST, T1[*,*,0], T2[*,*,0], TRey, std_EXP1, std_EXP2, start_end, _extra=ex
216
217
218        ;;;; mean Salinity diff with Levitus
219        ;;;; ===============================
220  PRINT, ' '
221  PRINT, '                               mean Salinity diff with Levitus'
222  PRINT, '7 '
223  xxx_SSS, S1[*,*,0], S2[*,*,0], SLev[*,*,0], std_EXP1, std_EXP2, start_end, _extra=ex
224
225      ;;;;;;; Arctic mean Salinity diff with Levitus at z=105 meters
226        ;;;;;;; ======================================================
227  PRINT, ' '
228  PRINT, '                               Arctic mean Salinity diff with Levitus at z=105 meters'
229  PRINT, '8 exp1-levitus'
230  xxx_EXP1_S_ARC, S1, SLev, std_EXP1, std_EXP2, start_end, _extra = ex       
231  PRINT, '9 exp2-levitus'
232  xxx_EXP2_S_ARC, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
233  PRINT, '10 exp1-levitus at 105 meters'
234  xxx_EXP1_S_ARC_z105, S1, SLev, std_EXP1, std_EXP2, start_end, _extra = ex       
235  PRINT, '11 exp2-levitus at 105 meters'
236  xxx_EXP2_S_ARC_z105, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
237
238
239        ;;;;;;;; mean Temperature diff with Levitus at z=105 meters
240        ;;;;;;;; ==================================================
241  PRINT, ' '
242  PRINT, '                               mean Temperature diff with Levitus at z=105 meters'
243  PRINT, '12'
244  xxx_T_z105, T1, T2, TRey, std_EXP1, std_EXP2, start_end, _extra=ex
245                             
246
247        ;;;;;;;; mean Salinity diff with Levitus at z=105 meters
248        ;;;;;;;; ==================================================
249  PRINT, ' '
250  PRINT, '                               mean Salinity diff with Levitus at z=105 meters'
251  PRINT, '13'
252  xxx_S_z105, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra=ex
253                           
254
255  PRINT, '============================================= '
256  PRINT, ' PLOTS 3D '
257  PRINT, '============================================= '
258 
259  PRINT, '                         Mixed layer depth'
260  PRINT, '14 '
261  xxx_mxl10, MXL1, MXL2, MLD, std_EXP1, std_EXP2, start_end,  _extra = ex
262  PRINT, '15'
263  xxx_ZonMxl, MXL1, MXL2, MLD, std_EXP1, std_EXP2, start_end, _extra = ex
264 
265
266        ;;;;;;;;; Zonal mean Temperature diff with Levitus
267        ;;;;;;;;; ========================================
268  PRINT, ' '
269  PRINT, '                               Zonal mean Temperature diff with Levitus'
270  PRINT, '16 '
271  xxx_zonal_T, T1, T2, TLev, std_EXP1, std_EXP2, start_end, MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
272
273  PRINT, '16 '                     
274  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
275 
276  PRINT, '16 '
277  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
278 
279  PRINT, '16 '
280  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
281 
282
283        ;;;;;;;;;; Zonal mean Salinity diff with Levitus
284        ;;;;;;;;;; ========================================
285  PRINT, ' '
286  PRINT, '                               Zonal mean Salinity diff with Levitus'
287  PRINT, '17 '
288  xxx_zonal_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
289                               
290  PRINT, '17 '
291  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
292                             
293  PRINT, '17 '
294  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
295
296  PRINT, '17 '
297  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
298 
299        ;;;;;;; Seasonal & Annual mean Arctic/Antarctic Ice Thickness & Ice Concentration
300        ;;;;;; ==========================================================================
301  PRINT, ' '
302  PRINT, '                               Arctic/Antarctic Ice Thickness'
303  PRINT, ' 18'
304  xxx_ARC_Icethick_MARS, Ithi_mars_1, Ithi_mars_2, std_EXP1, std_EXP2, start_end, _extra = ex
305 
306  PRINT, ' 19'
307  xxx_ARC_Icethick_SEPT, Ithi_sept_1, Ithi_sept_2, std_EXP1, std_EXP2, start_end, _extra = ex
308 
309  PRINT, ' 20'
310  xxx_ANT_Icethick_MARS, Ithi_mars_1, Ithi_mars_2, std_EXP1, std_EXP2, start_end, _extra = ex
311
312  PRINT, ' 21'
313  xxx_ANT_Icethick_SEPT, Ithi_sept_1, Ithi_sept_2, std_EXP1, std_EXP2, start_end, _extra = ex
314
315  PRINT, '                               Arctic/Antarctic Ice Concentration (area of sea-ice per grid cell area'
316  PRINT, ' 22'
317  xxx_Iceleadfrac_MARS, Ifra_mars_1, Ifra_mars_2, std_EXP1, std_EXP2, start_end, _extra = ex
318
319  PRINT, ' 23'
320  xxx_Iceleadfrac_SEPT, Ifra_sept_1, Ifra_sept_2, std_EXP1, std_EXP2, start_end, _extra = ex
321
322                       
323        ;;; Global and Atlantic Meridional Function
324        ;;; =======================================
325  PRINT, ' '
326  PRINT, '           Global and Atlantic Meridional Function'
327  PRINT, ' 24 '
328  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Glo', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
329  PRINT, ' 24 '
330  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Atl', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
331  PRINT, ' 24 '
332  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Ind', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
333  PRINT, ' 24 '
334  plt_msf, V1, V2, std_EXP1, std_EXP2, start_end, SUBBASIN = 'Pac', MASK_FILENAME = std_iodir_mask+'subbasins_orca21_nored.nc', _extra = ex
335
336
337  PRINT, '============================================= '
338  PRINT, ' Local PLOTS '
339  PRINT, '============================================= '
340
341        ;;;;;;;;; Equatorial Temperature
342        ;;;;;;;;; ======================
343  PRINT, ' '
344  PRINT, '                               Equatorial Temperature'
345  PRINT, ' '
346  PRINT, ' 25 '
347  xxx_Eq_T, T1, T2, Tlev, std_EXP1, std_EXP2, start_end, _extra = ex
348
349        ;;;;;;;; Equatorial Salinity
350        ;;;;;;;; ===================
351  PRINT, ' '
352  PRINT, '                               Equatorial Salinity'
353  PRINT, ' 26 '
354  xxx_Eq_S, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
355
356        ;;; Equatorial zonal velocity
357        ;;; =========================
358  PRINT, ' '
359  PRINT, '                               Equatorial zonal velocity'
360  PRINT, ' 27 '
361  xxx_Eq_U, U1, U2, std_EXP1, std_EXP2, start_end, _extra = ex
362 
363       ;;;;;;;;;;;; Mediterranean salt tongue
364       ;;;;;;;;;;;; ===============================================
365 
366  PRINT, ' '
367  PRINT, '                               Mediterranean salt tongue at depth=700 and lat 40°N'
368  PRINT, ' 28 '
369  xxx_Med_S_tongue, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 700,  LAT = 40, _extra = ex
370  ;
371  PRINT, '                               Mediterranean salt tongue at depth=1000 and lat 38°N'
372  PRINT, ' 28 '
373  xxx_Med_S_tongue, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 1000, LAT = 38, _extra = ex
374
375        ;;;;;;;;; Mediterranean
376        ;;;;;;;;; ===============================================
377  PRINT, ' '
378  PRINT, '                               Mediterranean water at 38°N'
379  PRINT, ' 29 '
380  xxx_Med_S_depth, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 1000, LAT = 38, _extra = ex
381  PRINT, '                               Mediterranean water at 38°N'
382  PRINT, ' 29 '
383  xxx_Med_S_depth, S1, S2, SLev, std_EXP1, std_EXP2, start_end, DEPTH = 700,  LAT = 40, _extra = ex
384
385;
386     
387        ;;;;;;;;;;; Vertical Global mean T & S
388        ;;;;;;;;;;; ===========================
389  PRINT, ' '
390  PRINT, '                                Vertical Global mean T & S'
391  PRINT, ' 30 '
392  xxx_TS_ZGlobm, T1, T2, TLev, S1, S2, SLev, std_EXP1, std_EXP2, start_end, _extra = ex
393
394 
395  return
396END
Note: See TracBrowser for help on using the repository browser.