1 | pro std_plot_all_last_year_5D, doplot = doplot, _extra = ex |
---|
2 | |
---|
3 | compile_opt idl2, strictarrsubs |
---|
4 | |
---|
5 | @common |
---|
6 | @std_common |
---|
7 | ; scripts for nemo v3_2 and v3_3 |
---|
8 | |
---|
9 | ;; script for max MLD, output 5 days |
---|
10 | |
---|
11 | PRINT, '' |
---|
12 | PRINT, ' ############################################' |
---|
13 | PRINT, '' |
---|
14 | PRINT, ' LAUNCH of std_plots_last_year_5D' |
---|
15 | PRINT, '' |
---|
16 | PRINT, ' ############################################' |
---|
17 | PRINT, '' |
---|
18 | ; |
---|
19 | std_iodir_data = isadirectory(getenv('DIR_DATA'), title = 'path of data in NetCdf format') |
---|
20 | std_iodir_climato = isadirectory(getenv('DIR_CLIMATO'), title = 'path of climatological data') |
---|
21 | std_iodir_mask = isadirectory(getenv('DIR_MASK'), title = 'path of mask files (ex: subbasins)') |
---|
22 | ; meshmask |
---|
23 | std_file_mesh = isafile(getenv('FILE_MESH_MASK'), title = 'mesh_mask', iodir = std_iodir_mask) |
---|
24 | std_file_msksub = isafile(getenv('FILE_MASK_SUBDOMAIN'), title = 'sub-bassin masks', iodir = std_iodir_mask) |
---|
25 | |
---|
26 | ; climatologies |
---|
27 | std_file_Levitus_T = isafile(getenv('FILE_TEMP_3D'), title = 'Levitus_T', iodir = std_iodir_climato) |
---|
28 | std_file_Levitus_S = isafile(getenv('FILE_SAL_3D'), title = 'Levitus_S', iodir = std_iodir_climato) |
---|
29 | std_file_reynolds = isafile(getenv('FILE_SST'), title = 'Reynolds', iodir = std_iodir_climato) |
---|
30 | std_file_oaflux = isafile(getenv('FILE_FLUX'), title = 'oaflux', iodir = std_iodir_climato) |
---|
31 | std_file_mld = isafile(getenv('FILE_MLD'), title = 'Mixed layer depth', iodir = std_iodir_climato) |
---|
32 | std_file_ice = isafile(getenv('FILE_ICE'), title = 'ICE', iodir = std_iodir_climato) |
---|
33 | std_file_snow_arc = isafile(getenv('FILE_SNOW_ARC'), title = 'SNOW_ARC', iodir = std_iodir_climato) |
---|
34 | std_file_snow_ant = isafile(getenv('FILE_SNOW_ANT'), title = 'SNOW_ANT', iodir = std_iodir_climato) |
---|
35 | |
---|
36 | IF strlowcase(getenv('FILE_GEOHEAT')) EQ 'no' THEN std_file_geoheat = 'no' $ |
---|
37 | ELSE std_file_geoheat = isafile(getenv('FILE_GEOHEAT'), title = 'Geothermal heating', iodir = std_iodir_climato) |
---|
38 | ; |
---|
39 | allrec = 1 - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD'))) |
---|
40 | ; Output run experience1 |
---|
41 | std_file1_T = isafile(getenv('FILE1_T'), title = 'exp1 grid T input file', iodir = std_iodir_data) |
---|
42 | std_file1_U = isafile(getenv('FILE1_U'), title = 'exp1 grid U input file', iodir = std_iodir_data) |
---|
43 | std_file1_V = isafile(getenv('FILE1_V'), title = 'exp1 grid V input file', iodir = std_iodir_data) |
---|
44 | std_file1_I = isafile(getenv('FILE1_I'), title = 'exp1 ice input file', iodir = std_iodir_data) |
---|
45 | |
---|
46 | ; Output run experience2 |
---|
47 | std_file2_T = isafile(getenv('FILE2_T'), title = 'exp2 grid T input file', iodir = std_iodir_data) |
---|
48 | std_file2_U = isafile(getenv('FILE2_U'), title = 'exp2 grid U input file', iodir = std_iodir_data) |
---|
49 | std_file2_V = isafile(getenv('FILE2_V'), title = 'exp2 grid V input file', iodir = std_iodir_data) |
---|
50 | std_file2_I = isafile(getenv('FILE2_I'), title = 'exp2 ice input file', iodir = std_iodir_data) |
---|
51 | |
---|
52 | PRINT, '' |
---|
53 | PRINT, ' std_iodir_data : ' + std_iodir_data |
---|
54 | PRINT, ' std_file1T : ' + std_file1_T |
---|
55 | PRINT, ' std_file1U : ' + std_file1_U |
---|
56 | PRINT, ' std_file1V : ' + std_file1_V |
---|
57 | ; PRINT, ' std_file1W : ' + std_file1_W |
---|
58 | PRINT, ' std_file2I : ' + std_file1_I |
---|
59 | PRINT, ' std_file2T : ' + std_file2_T |
---|
60 | PRINT, ' std_file2U : ' + std_file2_U |
---|
61 | PRINT, ' std_file2V : ' + std_file2_V |
---|
62 | ; PRINT, ' std_file2W : ' + std_file2_W |
---|
63 | PRINT, ' std_file2I : ' + std_file2_I |
---|
64 | PRINT, '' |
---|
65 | |
---|
66 | ;######################################################################### |
---|
67 | ;########################## Load Grids ################################ |
---|
68 | ;######################################################################### |
---|
69 | ; load the grid |
---|
70 | load_orca, std_file_mesh |
---|
71 | ; reading variables |
---|
72 | masknp = read_ncdf('tmaskutil', file = std_file_mesh, /nostruct, /cont_nofill) |
---|
73 | ;######################################################################### |
---|
74 | ;############################ Read Data ################################ |
---|
75 | ;######################################################################### |
---|
76 | ; |
---|
77 | allrec = 1; - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD'))) |
---|
78 | ; |
---|
79 | ;;; 3D ;;; |
---|
80 | ; temperature |
---|
81 | T1 = read_ncdf(getenv('VAR1_T'), allrecords = allrec, direc = 't', filename = std_file1_T ) |
---|
82 | IF std_file2_T NE std_file1_T THEN BEGIN |
---|
83 | T2 = read_ncdf(getenv('VAR2_T'), allrecords = allrec, direc = 't', filename = std_file2_T ) |
---|
84 | ENDIF ELSE T2 = {arr:-1} |
---|
85 | TLev = read_ncdf(getenv('VAR_TEMP_3D'), filename = std_file_Levitus_T ) |
---|
86 | TRey = read_ncdf(getenv('VAR_SST'), filename = std_file_reynolds ) |
---|
87 | |
---|
88 | ; salinity |
---|
89 | S1 = read_ncdf(getenv('VAR1_S'), allrecords = allrec, direc = 't', filename = std_file1_T ) |
---|
90 | IF std_file2_T NE std_file1_T THEN BEGIN |
---|
91 | S2 = read_ncdf(getenv('VAR2_S'), allrecords = allrec, direc = 't', filename = std_file2_T ) |
---|
92 | ENDIF ELSE S2 = {arr:-1} |
---|
93 | SLev = read_ncdf(getenv('VAR_SAL_3D'), filename = std_file_Levitus_S ) |
---|
94 | |
---|
95 | ;;; 2D ;;; |
---|
96 | ; Net Downward heat flux |
---|
97 | Q1 = read_ncdf(getenv('VAR1_QNET'), allrecords = allrec, direc = 't', filename = std_file1_T ) |
---|
98 | IF std_file2_T NE std_file1_T THEN BEGIN |
---|
99 | Q2 = read_ncdf(getenv('VAR2_QNET'), allrecords = allrec, direc = 't', filename = std_file2_T ) |
---|
100 | ENDIF ELSE Q2 = {arr:-1} |
---|
101 | ; Geothermal heating |
---|
102 | IF std_file_geoheat EQ 'no' THEN geo = {arr:float(getenv('VAR_GEOHEAT'))} $ |
---|
103 | ELSE geo = read_ncdf(getenv('VAR_GEOHEAT'), filename = std_file_geoheat ) |
---|
104 | geo = geo.arr*1.e-3 ; convert into W/m2 |
---|
105 | ;climatology |
---|
106 | QNET = read_ncdf(getenv('VAR_FLUX'), filename = std_file_oaflux ) |
---|
107 | |
---|
108 | ; erp (evaporation damping) |
---|
109 | ERP1 = read_ncdf(getenv('VAR1_ERP'), allrecords = allrec, direc = 't', filename = std_file1_T ) |
---|
110 | ERP1 = {arr:ERP1.arr * 86400., unit:'mm/day', grid:'T'} |
---|
111 | IF std_file2_T NE std_file1_T THEN BEGIN |
---|
112 | ERP2 = read_ncdf(getenv('VAR2_ERP'), allrecords = allrec, direc = 't', filename = std_file2_T ) |
---|
113 | ERP2 = {arr:ERP2.arr * 86400., unit:'mm/day', grid:'T'} |
---|
114 | ENDIF ELSE ERP2 = {arr:-1} |
---|
115 | |
---|
116 | ; emp (evaporation minus precipitation) |
---|
117 | EMP1 = read_ncdf(getenv('VAR1_EMP'), allrecords = allrec, direc = 't', filename = std_file1_T ) |
---|
118 | EMP1 = {arr:EMP1.arr * 86400., unit:'mm/day', grid:'T'} |
---|
119 | IF std_file2_T NE std_file1_T THEN BEGIN |
---|
120 | EMP2 = read_ncdf(getenv('VAR2_EMP'), allrecords = allrec, direc = 't', filename = std_file2_T ) |
---|
121 | EMP2 = {arr:EMP2.arr * 86400., unit:'mm/day', grid:'T'} |
---|
122 | ENDIF ELSE EMP2 = {arr:-1} |
---|
123 | |
---|
124 | ;mixed layer depth |
---|
125 | ;; nyear=jpt/73 |
---|
126 | MLD_1 = read_ncdf(getenv('VAR1_MLD'), allrecords = allrec, filename = std_file1_T ) |
---|
127 | caldat, time, mm |
---|
128 | march = where(mm EQ 3, cnt) |
---|
129 | MLD_march_1 = max(MLD_1.arr[*,*,march], dim=3) |
---|
130 | MLD_march_1 = {arr: MLD_march_1, unit: MLD_1.unit} |
---|
131 | sept = where(mm EQ 9, cnt) |
---|
132 | MLD_sept_1 = max(MLD_1.arr[*,*,sept], dim=3) |
---|
133 | MLD_sept_1 = {arr: MLD_sept_1, unit: MLD_1.unit} |
---|
134 | MLD_1 = {arr: max(MLD_1.arr[*,*,*], dim=3), unit: MLD_1.unit} |
---|
135 | IF std_file2_T NE std_file1_T THEN BEGIN |
---|
136 | MLD_2 = read_ncdf(getenv('VAR2_MLD'), allrecords = allrec, filename = std_file2_T ) ; 10 m |
---|
137 | caldat, time, mm |
---|
138 | march = where(mm EQ 3, cnt) |
---|
139 | MLD_march_2 = max(MLD_2.arr[*,*,march], dim=3) |
---|
140 | MLD_march_2 = {arr: MLD_march_2, unit: MLD_2.unit} |
---|
141 | sept = where(mm EQ 9, cnt) |
---|
142 | MLD_sept_2 = max(MLD_2.arr[*,*,sept], dim=3) |
---|
143 | MLD_sept_2 = {arr:MLD_sept_2, unit: MLD_2.unit} |
---|
144 | MLD_2 = {arr: max(MLD_2.arr[*,*,*], dim=3), unit: MLD_2.unit} |
---|
145 | ENDIF ELSE BEGIN |
---|
146 | MLD_2 = {arr:-1} |
---|
147 | MLD_march_2 = {arr:-1} |
---|
148 | MLD_sept_2 = {arr:-1} |
---|
149 | ENDELSE |
---|
150 | |
---|
151 | ;climatology |
---|
152 | MLD = read_ncdf(getenv('VAR_MLD'), filename = std_file_mld ) |
---|
153 | ; if monthly climatology |
---|
154 | ; MLD = {arr: max(MLD.arr[*,*,*], dim=3), unit: MLD.unit} |
---|
155 | |
---|
156 | ; velocities |
---|
157 | U1 = read_ncdf(getenv('VAR1_U'), allrecords = allrec, direc = 't', filename = std_file1_U ) |
---|
158 | IF strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff' THEN BEGIN |
---|
159 | U1.arr = U1.arr / e3u_3d(/e2) * umask() |
---|
160 | U1.unit = 'm/s' |
---|
161 | ENDIF |
---|
162 | IF std_file2_U NE std_file1_U THEN BEGIN |
---|
163 | U2 = read_ncdf(getenv('VAR2_U'), allrecords = allrec, direc = 't', filename = std_file2_U ) |
---|
164 | IF strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff' THEN BEGIN |
---|
165 | U2.arr = U2.arr / e3u_3d(/e2) * umask() |
---|
166 | U2.unit = 'm/s' |
---|
167 | ENDIF |
---|
168 | ENDIF ELSE U2 = {arr:-1} |
---|
169 | ; |
---|
170 | V1 = read_ncdf(getenv('VAR1_V'), allrecords = allrec, direc = 't', filename = std_file1_V ) |
---|
171 | IF strlowcase(getenv('VAR1_V')) EQ 'vocetr_eff' THEN BEGIN |
---|
172 | V1.arr = V1.arr / e3v_3d(/e1) * vmask() |
---|
173 | V1.unit = 'm/s' |
---|
174 | ENDIF |
---|
175 | IF std_file2_V NE std_file1_V THEN BEGIN |
---|
176 | V2 = read_ncdf(getenv('VAR2_V'), allrecords = allrec, direc = 't', filename = std_file2_V ) |
---|
177 | IF strlowcase(getenv('VAR2_V')) EQ 'vocetr_eff' THEN BEGIN |
---|
178 | V2.arr = V2.arr / e3v_3d(/e1) * vmask() |
---|
179 | V2.unit = 'm/s' |
---|
180 | ENDIF |
---|
181 | ENDIF ELSE V2 = {arr:-1} |
---|
182 | |
---|
183 | ; ice |
---|
184 | Ithi_1 = read_ncdf(getenv('VAR1_Ithick'), allrecords = allrec, filename = std_file1_I ) |
---|
185 | caldat, time, mm |
---|
186 | april = where(mm EQ 4, cnt) |
---|
187 | Ithi_april_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} |
---|
188 | jan = where(mm EQ 1, cnt) |
---|
189 | sept = where(mm EQ 9, cnt) |
---|
190 | Ithi_jan_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} |
---|
191 | Ithi_sept_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} |
---|
192 | undefine, Ithi_1 |
---|
193 | ; |
---|
194 | IF std_file2_I NE std_file1_I THEN BEGIN |
---|
195 | Ithi_2 = read_ncdf(getenv('VAR2_Ithick'), allrecords = allrec, filename = std_file2_I ) |
---|
196 | caldat, time, mm |
---|
197 | april = where(mm EQ 4, cnt) |
---|
198 | Ithi_april_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} |
---|
199 | jan = where(mm EQ 1, cnt) |
---|
200 | sept = where(mm EQ 9, cnt) |
---|
201 | Ithi_sept_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} |
---|
202 | Ithi_jan_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} |
---|
203 | undefine, Ithi_2 |
---|
204 | ENDIF ELSE BEGIN |
---|
205 | Ithi_april_2 = {arr:-1} |
---|
206 | Ithi_sept_2 = {arr:-1} |
---|
207 | Ithi_jan_2 = {arr:-1} |
---|
208 | ENDELSE |
---|
209 | ; |
---|
210 | Iage_1 = read_ncdf(getenv('VAR1_Iage'), allrecords = allrec, filename = std_file1_I ) |
---|
211 | caldat, time, mm |
---|
212 | febr = where(mm EQ 2, cnt) |
---|
213 | Iage_febr_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_1.unit} |
---|
214 | march = where(mm EQ 3, cnt) |
---|
215 | Iage_march_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_1.unit} |
---|
216 | sept = where(mm EQ 9, cnt) |
---|
217 | Iage_sept_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_1.unit} |
---|
218 | undefine, Iage_1 |
---|
219 | ; |
---|
220 | IF std_file2_I NE std_file1_I THEN BEGIN |
---|
221 | Iage_2 = read_ncdf(getenv('VAR2_Iage'), allrecords = allrec, filename = std_file2_I ) |
---|
222 | caldat, time, mm |
---|
223 | febr = where(mm EQ 2, cnt) |
---|
224 | Iage_febr_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_2.unit} |
---|
225 | march = where(mm EQ 3, cnt) |
---|
226 | Iage_march_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_2.unit} |
---|
227 | sept = where(mm EQ 9, cnt) |
---|
228 | Iage_sept_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_2.unit} |
---|
229 | undefine, Iage_2 |
---|
230 | ENDIF ELSE BEGIN |
---|
231 | Iage_febr_2 = {arr:-1} |
---|
232 | Iage_march_2 = {arr:-1} |
---|
233 | Iage_sept_2 = {arr:-1} |
---|
234 | ENDELSE |
---|
235 | ; |
---|
236 | Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) |
---|
237 | caldat, time, mm |
---|
238 | febr = where(mm EQ 2, cnt) |
---|
239 | Ifra_febr_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} |
---|
240 | march = where(mm EQ 3, cnt) |
---|
241 | Ifra_march_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} |
---|
242 | sept = where(mm EQ 9, cnt) |
---|
243 | Ifra_sept_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} |
---|
244 | undefine, Ifra_1 |
---|
245 | ; |
---|
246 | IF std_file2_I NE std_file1_I THEN BEGIN |
---|
247 | Ifra_2 = read_ncdf(getenv('VAR2_Ifrac'), allrecords = allrec, filename = std_file2_I ) |
---|
248 | caldat, time, mm |
---|
249 | febr = where(mm EQ 2, cnt) |
---|
250 | Ifra_febr_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_2.unit} |
---|
251 | march = where(mm EQ 3, cnt) |
---|
252 | Ifra_march_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Ifra_2.unit} |
---|
253 | sept = where(mm EQ 9, cnt) |
---|
254 | Ifra_sept_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ifra_2.unit} |
---|
255 | undefine, Ifra_2 |
---|
256 | ENDIF ELSE BEGIN |
---|
257 | Ifra_febr_2 = {arr:-1} |
---|
258 | Ifra_march_2 = {arr:-1} |
---|
259 | Ifra_sept_2 = {arr:-1} |
---|
260 | ENDELSE |
---|
261 | ; |
---|
262 | Isnow_1 = read_ncdf(getenv('VAR1_Isnow'), allrecords = allrec, filename = std_file1_I ) |
---|
263 | caldat, time, mm |
---|
264 | febr = where(mm EQ 2, cnt) |
---|
265 | Isnow_febr_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} |
---|
266 | march = where(mm EQ 3, cnt) |
---|
267 | Isnow_march_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} |
---|
268 | sept = where(mm EQ 9, cnt) |
---|
269 | Isnow_sept_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} |
---|
270 | ;undefine, Isnow_1 |
---|
271 | ; |
---|
272 | IF std_file2_I NE std_file1_I THEN BEGIN |
---|
273 | Isnow_2 = read_ncdf(getenv('VAR2_Isnow'), allrecords = allrec, filename = std_file2_I ) |
---|
274 | caldat, time, mm |
---|
275 | febr = where(mm EQ 2, cnt) |
---|
276 | Isnow_febr_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_2.unit} |
---|
277 | march = where(mm EQ 3, cnt) |
---|
278 | Isnow_march_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_2.unit} |
---|
279 | sept = where(mm EQ 9, cnt) |
---|
280 | Isnow_sept_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_2.unit} |
---|
281 | ; undefine, Isnow_2 |
---|
282 | ENDIF ELSE BEGIN |
---|
283 | Isnow_febr_2 = {arr:-1} |
---|
284 | Isnow_march_2 = {arr:-1} |
---|
285 | Isnow_sept_2 = {arr:-1} |
---|
286 | ENDELSE |
---|
287 | ; |
---|
288 | Isal_1 = read_ncdf(getenv('VAR1_Isal'), allrecords = allrec, filename = std_file1_I ) |
---|
289 | Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) |
---|
290 | msk = Ifra_1.arr gt 0.15 ; remove 0.15% for observations |
---|
291 | caldat, time, mm |
---|
292 | march = where(mm EQ 3, cnt) |
---|
293 | febr = where(mm EQ 2, cnt) |
---|
294 | ;SF Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} |
---|
295 | Isal_1.arr = Isal_1.arr * msk |
---|
296 | Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} |
---|
297 | Isal_febr_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_1.unit} |
---|
298 | sept = where(mm EQ 9, cnt) |
---|
299 | Isal_sept_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_1.unit} |
---|
300 | ;undefine, Isal_1 |
---|
301 | ; |
---|
302 | Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) |
---|
303 | Ifra_2 = read_ncdf(getenv('VAR2_Ifrac'), allrecords = allrec, filename = std_file2_I ) |
---|
304 | msk = Ifra_2.arr gt 0.15 ; remove 0.15% for observations |
---|
305 | IF std_file2_I NE std_file1_I THEN BEGIN |
---|
306 | Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) |
---|
307 | Isal_2.arr = Isal_2.arr * msk |
---|
308 | caldat, time, mm |
---|
309 | march = where(mm EQ 3, cnt) |
---|
310 | febr = where(mm EQ 2, cnt) |
---|
311 | Isal_march_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_2.unit} |
---|
312 | Isal_febr_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_2.unit} |
---|
313 | sept = where(mm EQ 9, cnt) |
---|
314 | Isal_sept_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_2.unit} |
---|
315 | ; undefine, Isal_2 |
---|
316 | ENDIF ELSE BEGIN |
---|
317 | Isal_febr_2 = {arr:-1} |
---|
318 | Isal_march_2 = {arr:-1} |
---|
319 | Isal_sept_2 = {arr:-1} |
---|
320 | ENDELSE |
---|
321 | ; |
---|
322 | jpt = 1 |
---|
323 | ; |
---|
324 | ; shorter file names for legends... |
---|
325 | ; |
---|
326 | std_file1_T = file_basename(std_file1_T,'.nc') |
---|
327 | std_file1_T = (strsplit(std_file1_T,'_grid_T',/extract,/regex))[0] |
---|
328 | std_file2_T = file_basename(std_file2_T,'.nc') |
---|
329 | std_file2_T = (strsplit(std_file2_T,'_grid_T',/extract,/regex))[0] |
---|
330 | std_file1_U = file_basename(std_file1_U,'.nc') |
---|
331 | std_file1_U = (strsplit(std_file1_U,'_grid_U',/extract,/regex))[0] |
---|
332 | std_file2_U = file_basename(std_file2_U,'.nc') |
---|
333 | std_file2_U = (strsplit(std_file2_U,'_grid_U',/extract,/regex))[0] |
---|
334 | std_file1_V = file_basename(std_file1_V,'.nc') |
---|
335 | std_file1_V = (strsplit(std_file1_V,'_grid_V',/extract,/regex))[0] |
---|
336 | std_file2_V = file_basename(std_file2_V,'.nc') |
---|
337 | std_file2_V = (strsplit(std_file2_V,'_grid_V',/extract,/regex))[0] |
---|
338 | std_file1_I = file_basename(std_file1_I,'.nc') |
---|
339 | std_file1_I = (strsplit(std_file1_I,'_icemod',/extract,/regex))[0] |
---|
340 | std_file2_I = file_basename(std_file2_I,'.nc') |
---|
341 | std_file2_I = (strsplit(std_file2_I,'_icemod',/extract,/regex))[0] |
---|
342 | |
---|
343 | ;######################################################################### |
---|
344 | ;###################### STANDARD PLOTS ################################ |
---|
345 | ;######################################################################### |
---|
346 | |
---|
347 | IF keyword_set(doplot) EQ 0 THEN doplot = 0 |
---|
348 | |
---|
349 | ; fixed color tabled |
---|
350 | lct, 64 |
---|
351 | cnt = 0 |
---|
352 | htmltxt = '' |
---|
353 | ; |
---|
354 | cnt = cnt+1 & blabla = 'Erp salinity damping term' |
---|
355 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_erp, ERP1, ERP2, _extra = ex |
---|
356 | ; |
---|
357 | cnt = cnt+1 & blabla = 'Evaporation - Precipitation - Runoff term' |
---|
358 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_emp, EMP1, EMP2, _extra = ex |
---|
359 | ; |
---|
360 | cnt = cnt+1 & blabla = 'Net heat flux' |
---|
361 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_qnet, Q1, Q2, QNET, _extra = ex |
---|
362 | ; |
---|
363 | cnt = cnt+1 & blabla = 'Meridionnal Heat Transport' |
---|
364 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mht, Q1.arr+geo, Q2.arr+geo, masknp, std_file_msksub, _extra = ex |
---|
365 | ; |
---|
366 | cnt = cnt+1 & blabla = 'Global Barotropic stream Function' |
---|
367 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_bsf, U1, U2, _extra = ex |
---|
368 | ; |
---|
369 | cnt = cnt+1 & blabla = 'mean Temperature diff with New Reynolds' |
---|
370 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_sst, T1, T2, TRey, _extra = ex |
---|
371 | ; |
---|
372 | cnt = cnt+1 & blabla = 'mean Salinity diff with Levitus' |
---|
373 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_sss, S1, S2, SLev, _extra = ex |
---|
374 | ; |
---|
375 | cnt = cnt+1 & blabla = 'Arctic mean Salinity diff with Levitus' |
---|
376 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, SLev, _extra = ex |
---|
377 | ; |
---|
378 | cnt = cnt+1 & blabla = 'Arctic mean Salinity diff with Levitus and exp2' |
---|
379 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, S2, SLev, _extra = ex |
---|
380 | ; |
---|
381 | cnt = cnt+1 & blabla = 'Arctic mean Salinity diff with Levitus at z=100 meters' |
---|
382 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, SLev, /z100, _extra = ex |
---|
383 | ; |
---|
384 | cnt = cnt+1 & blabla = 'Arctic mean Salinity diff with Levitus and exp2 at z=100 meters' |
---|
385 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, S2, SLev, /z100, _extra = ex |
---|
386 | ; |
---|
387 | cnt = cnt+1 & blabla = 'mean Temperature diff with Levitus at z=100 meters' |
---|
388 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_T100m, T1, T2, Tlev, _extra = ex |
---|
389 | ; |
---|
390 | cnt = cnt+1 & blabla = 'mean Salinity diff with Levitus at z=100 meters' |
---|
391 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_S100m, S1, S2, SLev, _extra = ex |
---|
392 | ; |
---|
393 | cnt = cnt+1 & blabla = 'Mixed layer depth' |
---|
394 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mld, MLD1, MLD, _extra = ex |
---|
395 | ; |
---|
396 | cnt = cnt+1 & blabla = 'Mixed layer depth differences' |
---|
397 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mld, MLD_1, MLD_2, MLD, _extra = ex |
---|
398 | |
---|
399 | ;SF: add 2 cases for max of Mixed Layer depth on march & septembre |
---|
400 | cnt = cnt+1 & blabla = 'Mixed layer depth on March' |
---|
401 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_max_mld, MLD_march_1, MLD_march_2, /MARCH, _extra = ex |
---|
402 | |
---|
403 | cnt = cnt+1 & blabla = 'Mixed layer depth on September' |
---|
404 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_max_mld, MLD_sept_1, MLD_sept_2, /SEPT, _extra = ex |
---|
405 | |
---|
406 | ;; SF: commented because not ok for max MLD, output 5 days |
---|
407 | ;; cnt = cnt+1 & blabla = 'Zonal mean Mixed layer depth' |
---|
408 | ;; IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ZonMld, MLD_1, MLD_2, MLD, _extra = ex |
---|
409 | |
---|
410 | cnt = cnt+1 & blabla = 'Zonal mean Temperature diff with Levitus: Global' |
---|
411 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, _extra = ex |
---|
412 | ; |
---|
413 | cnt = cnt+1 & blabla = 'Zonal mean Temperature diff with Levitus: Atlantic' |
---|
414 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Atl', _extra = ex |
---|
415 | ; |
---|
416 | cnt = cnt+1 & blabla = 'Zonal mean Temperature diff with Levitus: Indian' |
---|
417 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Ind', _extra = ex |
---|
418 | ; |
---|
419 | cnt = cnt+1 & blabla = 'Zonal mean Temperature diff with Levitus: Pacific' |
---|
420 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Pac', _extra = ex |
---|
421 | ; |
---|
422 | cnt = cnt+1 & blabla = 'Zonal mean Salinity diff with Levitus: Global' |
---|
423 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, _extra = ex |
---|
424 | ; |
---|
425 | cnt = cnt+1 & blabla = 'Zonal mean Salinity diff with Levitus: Atlantic' |
---|
426 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Atl', _extra = ex |
---|
427 | ; |
---|
428 | cnt = cnt+1 & blabla = 'Zonal mean Salinity diff with Levitus: Indian' |
---|
429 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Ind', _extra = ex |
---|
430 | ; |
---|
431 | cnt = cnt+1 & blabla = 'Zonal mean Salinity diff with Levitus: Pacific' |
---|
432 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Pac', _extra = ex |
---|
433 | ; |
---|
434 | cnt = cnt+1 & blabla = 'Meridional stream Function: Global (no Med)' |
---|
435 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'GloNoMed', _extra = ex |
---|
436 | ; |
---|
437 | cnt = cnt+1 & blabla = 'Meridional stream Function: Atlantic' |
---|
438 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'Atl', _extra = ex |
---|
439 | ; |
---|
440 | cnt = cnt+1 & blabla = 'Meridional stream Function: Indian' |
---|
441 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'Ind', _extra = ex |
---|
442 | ; |
---|
443 | cnt = cnt+1 & blabla = 'Meridional stream Function: Indo-Pacific' |
---|
444 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'IndoPac', _extra = ex |
---|
445 | ; |
---|
446 | cnt = cnt+1 & blabla = 'Equatorial Temperature' |
---|
447 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqT, T1, T2, Tlev, _extra = ex |
---|
448 | ; |
---|
449 | cnt = cnt+1 & blabla = 'Equatorial Salinity' |
---|
450 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqS, S1, S2, SLev, _extra = ex |
---|
451 | ; |
---|
452 | cnt = cnt+1 & blabla = 'Equatorial zonal velocity' |
---|
453 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqU, U1, U2, _extra = ex |
---|
454 | ; |
---|
455 | cnt = cnt+1 & blabla = 'Mediterranean salt tongue at depth=700' |
---|
456 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sspread, S1, S2, SLev, 700, _extra = ex |
---|
457 | ; |
---|
458 | cnt = cnt+1 & blabla = 'Mediterranean salt tongue at depth=1000' |
---|
459 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sspread, S1, S2, SLev, 1000, _extra = ex |
---|
460 | ; |
---|
461 | cnt = cnt+1 & blabla = 'Mediterranean water at lat=40°N' |
---|
462 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sdepth, S1, S2, SLev, 40, _extra = ex |
---|
463 | ; |
---|
464 | cnt = cnt+1 & blabla = 'Mediterranean water at lat=38°N' |
---|
465 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sdepth, S1, S2, SLev, 38, _extra = ex |
---|
466 | ; |
---|
467 | cnt = cnt+1 & blabla = 'Arctic Ice Thickness: JAN' |
---|
468 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_jan_1, Ithi_jan_2, /ARC, /JAN, _extra = ex |
---|
469 | ; |
---|
470 | cnt = cnt+1 & blabla = 'Arctic Ice Thickness: APRIL' |
---|
471 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_april_1, Ithi_april_2, /ARC, /APRIL, _extra = ex |
---|
472 | ; |
---|
473 | cnt = cnt+1 & blabla = 'Antarctic Ice Thickness: APRIL' |
---|
474 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_april_1, Ithi_april_2, /ANT, /APRIL, _extra = ex |
---|
475 | ; |
---|
476 | cnt = cnt+1 & blabla = 'Antarctic Ice Thickness: SEPT' |
---|
477 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_sept_1, Ithi_sept_2, /ANT, /SEPT, _extra = ex |
---|
478 | ; |
---|
479 | cnt = cnt+1 & blabla = 'Arctic Ice Age: MARCH' |
---|
480 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_march_1, Iage_march_2, /ARC, /MARCH, _extra = ex |
---|
481 | ; |
---|
482 | cnt = cnt+1 & blabla = 'Arctic Ice Age: SEPT' |
---|
483 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_sept_2, /ARC, /SEPT, _extra = ex |
---|
484 | ; |
---|
485 | cnt = cnt+1 & blabla = 'Antarctic Ice Age: MARCH' |
---|
486 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_febr_1, Iage_febr_2, /ANT, /FEBR, _extra = ex |
---|
487 | ; |
---|
488 | cnt = cnt+1 & blabla = 'Antarctic Ice Age: SEPT' |
---|
489 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_sept_2, /ANT, /SEPT, _extra = ex |
---|
490 | ; |
---|
491 | cnt = cnt+1 & blabla = 'Arctic Ice Fraction: MARCH' |
---|
492 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_march_1, Ifra_march_2, /ARC, /MARCH, _extra = ex |
---|
493 | ; |
---|
494 | cnt = cnt+1 & blabla = 'Arctic Ice Fraction: SEPT' |
---|
495 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_sept_1, Ifra_sept_2, /ARC, /SEPT, _extra = ex |
---|
496 | ; |
---|
497 | cnt = cnt+1 & blabla = 'Antarctic Ice Fraction: MARCH' |
---|
498 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_febr_1, Ifra_febr_2, /ANT, /FEBR, _extra = ex |
---|
499 | ; |
---|
500 | cnt = cnt+1 & blabla = 'Antarctic Ice Fraction: SEPT' |
---|
501 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex |
---|
502 | ; |
---|
503 | cnt = cnt+1 & blabla = 'Arctic SNOW Thickness: MARCH' |
---|
504 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_march_1, Isnow_march_2, /ARC, /MARCH, _extra = ex |
---|
505 | ; |
---|
506 | cnt = cnt+1 & blabla = 'Arctic SNOW Thickness: SEPT' |
---|
507 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ARC, /SEPT, _extra = ex |
---|
508 | ; |
---|
509 | cnt = cnt+1 & blabla = 'Antarctic SNOW Thickness: MARCH' |
---|
510 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_febr_1, Isnow_febr_2, /ANT, /FEBR, _extra = ex |
---|
511 | ; |
---|
512 | cnt = cnt+1 & blabla = 'Antarctic SNOW Thickness: SEPT' |
---|
513 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ANT, /SEPT, _extra = ex |
---|
514 | ; |
---|
515 | cnt = cnt+1 & blabla = 'Arctic Ice Salinity: MARCH' |
---|
516 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_march_1, Isal_march_2, /ARC, /MARCH, _extra = ex |
---|
517 | ; |
---|
518 | cnt = cnt+1 & blabla = 'Arctic Ice Salinity: SEPT' |
---|
519 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, /ARC, /SEPT, _extra = ex |
---|
520 | ; |
---|
521 | cnt = cnt+1 & blabla = 'Antarctic Ice Salinity: FEBRUARY' |
---|
522 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_febr_1, Isal_febr_2, /ANT, /FEBR, _extra = ex |
---|
523 | ; |
---|
524 | cnt = cnt+1 & blabla = 'Antarctic Ice Salinity: SEPT' |
---|
525 | IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, /ANT, /SEPT, _extra = ex |
---|
526 | ; |
---|
527 | |
---|
528 | IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_plot_html_body.txt', htmltxt[1:*] |
---|
529 | |
---|
530 | return |
---|
531 | END |
---|