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_Q.pro in branches/dev_r2586_dynamic_mem/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts – NEMO

source: branches/dev_r2586_dynamic_mem/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/ts_mean_Q.pro @ 2713

Last change on this file since 2713 was 2713, checked in by rblod, 13 years ago

Phasing dynamic memory branch with version 2712 off the trunk

File size: 1.9 KB
Line 
1pro ts_mean_Q, 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 if KEYWORD_SET(POSTSCRIPT) then begin
10    openps, sEXP1+'_Heat_mean.ps', portrait = 1
11 endif
12 
13 ts_Heat = 0.
14 ts_Heat2 = 0.
15 ts_Time = 0.
16
17 masknp = read_ncdf('tmaskutil', file = 'mesh_mask_partial.nc', /nostruct)
18
19
20 for year=year1,year2 do begin
21   
22    date1 = year * 10000L + 101
23    date2 = year * 10000L + 1231
24    filename = getname(s_iodir_data,sEXP1,'1Y','grid_T',date1)
25    filename2 = getname(s_iodir_data,sEXP2,'1Y','grid_T',date1)
26
27    if filename eq '' then stop
28    Heat = read_ncdf('qns+qsr',date1 ,date2 , filename = filename, /nostruct)
29    Heat2 = read_ncdf('qns+qsr',date1 ,date2 , filename = filename2, /nostruct)
30
31    ts_Heat = [ ts_Heat, moyenne(Heat, 'xy', mask2d = masknp)]
32    ts_Heat2 = [ ts_Heat2, moyenne(Heat2, 'xy', mask2d = masknp)]
33    ts_Time = [ ts_Time, Time]  ; Time = date
34
35 endfor
36 
37 ts_Heat = ts_Heat[1:*]         ; remove first record of 0
38 ts_Heat2 = ts_Heat2[1:*]         ; remove first record of 0
39 Time = ts_Time[1:*]            ; remove first record of 0
40 
41 jpt = n_elements(Time)
42 
43 title = sEXP1+' Global Annual Mean Surface Heat Flux --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
44 pltt,ts_Heat,'t', -4., 4., year1 * 10000L + 101, year2 * 10000L + 1231 , /REMPLI $
45      , small = [1,2,1], YTITLE = 'W/m2',  TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
46
47 if sEXP2 ne sEXP1 then begin
48
49    title = sEXP1+' - '+sEXP2+' Global Annual Mean Surface Heat Flux --- year '+strtrim(year1,1)+' - '+strtrim(year2,1)
50    pltt,ts_Heat - ts_Heat2,'t', -4., 4., year1 * 10000L + 101, year2 * 10000L + 1231 , /REMPLI, /NOERASE $
51         ,  COLOR = 250, small = [1,2,2], YTITLE = 'W/m2', TITLE = title, FORMAT = '(I3)', /PORTRAIT, _extra = ex
52   
53 endif
54
55 
56 if KEYWORD_SET(POSTSCRIPT) then begin
57    closeps
58 endif
59 
60 
61 return
62end
Note: See TracBrowser for help on using the repository browser.