48 USE modi_init_io_surf_n
50 USE modi_end_io_surf_n
51 USE modi_sum_on_all_procs
53 USE yomhook
,ONLY : lhook, dr_hook
54 USE parkind1
,ONLY : jprb
67 CHARACTER(LEN=6),
INTENT(IN) :: hprogram
74 CHARACTER(LEN=12) :: yrecfm
75 CHARACTER(LEN=100):: ycomment
76 CHARACTER(LEN=2) :: ynum
79 REAL(KIND=JPRB) :: zhook_handle
85 IF (lhook) CALL dr_hook(
'WRITE_DIAG_SEB_SURF_ATM_N',0,zhook_handle)
87 hprogram,
'FULL ',
'SURF ',
'WRITE')
96 ycomment=
'X_Y_'//yrecfm
99 hprogram,yrecfm,dgu%XAVG_RI(:),iresp,hcomment=ycomment)
106 IF (dgu%N2M>=1.OR.dgu%LSURF_BUDGET.OR.dgu%LSURF_BUDGETC)
THEN
109 ycomment=
'X_Y_'//yrecfm//
' (K)'
111 hprogram,yrecfm,dgu%XAVG_TS(:),iresp,hcomment=ycomment)
114 ycomment=
'X_Y_'//yrecfm//
' (K)'
116 hprogram,yrecfm,dgu%XDIAG_TRAD(:),iresp,hcomment=ycomment)
119 ycomment=
'X_Y_'//yrecfm//
' (-)'
121 hprogram,yrecfm,dgu%XDIAG_EMIS(:),iresp,hcomment=ycomment)
124 ycomment=
'X_Y_'//yrecfm//
' (M.kgCO2.S-1.kgAIR-1)'
126 hprogram,yrecfm,dgu%XAVG_SFCO2(:),iresp,hcomment=ycomment)
133 ycomment=
'X_Y_'//yrecfm//
' (K)'
135 hprogram,yrecfm,dgu%XAVG_T2M(:),iresp,hcomment=ycomment)
138 ycomment=
'X_Y_'//yrecfm//
' (K)'
140 hprogram,yrecfm,dgu%XAVG_T2M_MIN(:),iresp,hcomment=ycomment)
143 ycomment=
'X_Y_'//yrecfm//
' (K)'
145 hprogram,yrecfm,dgu%XAVG_T2M_MAX(:),iresp,hcomment=ycomment)
148 ycomment=
'X_Y_'//yrecfm//
' (KG/KG)'
150 hprogram,yrecfm,dgu%XAVG_Q2M(:),iresp,hcomment=ycomment)
153 ycomment=
'X_Y_'//yrecfm//
' (-)'
155 hprogram,yrecfm,dgu%XAVG_HU2M(:),iresp,hcomment=ycomment)
158 ycomment=
'X_Y_'//yrecfm//
' (-)'
160 hprogram,yrecfm,dgu%XAVG_HU2M_MIN(:),iresp,hcomment=ycomment)
163 ycomment=
'X_Y_'//yrecfm//
' (-)'
165 hprogram,yrecfm,dgu%XAVG_HU2M_MAX(:),iresp,hcomment=ycomment)
167 IF (
sum_on_all_procs(hprogram,ug%CGRID,dgu%XAVG_ZON10M(:)/= xundef) > 0. )
THEN
170 ycomment=
'X_Y_'//yrecfm//
' (M/S)'
172 hprogram,yrecfm,dgu%XAVG_ZON10M(:),iresp,hcomment=ycomment)
175 ycomment=
'X_Y_'//yrecfm//
' (M/S)'
177 hprogram,yrecfm,dgu%XAVG_MER10M(:),iresp,hcomment=ycomment)
180 ycomment=
'X_Y_'//yrecfm//
' (M/S)'
182 hprogram,yrecfm,dgu%XAVG_WIND10M(:),iresp,hcomment=ycomment)
185 ycomment=
'X_Y_'//yrecfm//
' (M/S)'
187 hprogram,yrecfm,dgu%XAVG_WIND10M_MAX(:),iresp,hcomment=ycomment)
191 IF (dgu%L2M_MIN_ZS)
THEN
194 ycomment=
'X_Y_'//yrecfm//
' (K)'
196 hprogram,yrecfm,dgu%XAVG_T2M_MIN_ZS(:),iresp,hcomment=ycomment)
199 ycomment=
'X_Y_'//yrecfm//
' (KG/KG)'
201 hprogram,yrecfm,dgu%XAVG_Q2M_MIN_ZS(:),iresp,hcomment=ycomment)
204 ycomment=
'X_Y_'//yrecfm//
' (KG/KG)'
206 hprogram,yrecfm,dgu%XAVG_HU2M_MIN_ZS(:),iresp,hcomment=ycomment)
215 IF (dgu%LSURF_BUDGET)
THEN
218 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
220 hprogram,yrecfm,dgu%XAVG_RN(:),iresp,hcomment=ycomment)
223 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
225 hprogram,yrecfm,dgu%XAVG_H(:),iresp,hcomment=ycomment)
228 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
230 hprogram,yrecfm,dgu%XAVG_LE(:),iresp,hcomment=ycomment)
233 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
235 hprogram,yrecfm,dgu%XAVG_LEI(:),iresp,hcomment=ycomment)
238 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
240 hprogram,yrecfm,dgu%XAVG_GFLUX(:),iresp,hcomment=ycomment)
243 ycomment=
'X_Y_'//yrecfm//
' (kg/m2/s)'
246 hprogram,yrecfm,dgu%XAVG_EVAP(:),iresp,hcomment=ycomment)
249 ycomment=
'X_Y_'//yrecfm//
' (kg/m2/s)'
252 hprogram,yrecfm,dgu%XAVG_SUBL(:),iresp,hcomment=ycomment)
254 IF (dgu%LRAD_BUDGET)
THEN
257 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
259 hprogram,yrecfm,dgu%XAVG_SWD(:),iresp,hcomment=ycomment)
262 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
264 hprogram,yrecfm,dgu%XAVG_SWU(:),iresp,hcomment=ycomment)
267 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
269 hprogram,yrecfm,dgu%XAVG_LWD(:),iresp,hcomment=ycomment)
272 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
274 hprogram,yrecfm,dgu%XAVG_LWU(:),iresp,hcomment=ycomment)
276 DO jsw=1,
SIZE(dgu%XAVG_SWBD,2)
280 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
282 hprogram,yrecfm,dgu%XAVG_SWBD(:,jsw),iresp,hcomment=ycomment)
285 ycomment=
'X_Y_'//yrecfm//
' (W/m2)'
287 hprogram,yrecfm,dgu%XAVG_SWBU(:,jsw),iresp,hcomment=ycomment)
294 ycomment=
'X_Y_'//yrecfm//
' (kg/ms2)'
296 hprogram,yrecfm,dgu%XAVG_FMU(:),iresp,hcomment=ycomment)
299 ycomment=
'X_Y_'//yrecfm//
' (kg/ms2)'
301 hprogram,yrecfm,dgu%XAVG_FMV(:),iresp,hcomment=ycomment)
304 ycomment=
'X_Y_'//yrecfm//
' (kg/ms2)'
306 hprogram,yrecfm,dgu%XSSO_FMU(:),iresp,hcomment=ycomment)
309 ycomment=
'X_Y_'//yrecfm//
' (kg/ms2)'
311 hprogram,yrecfm,dgu%XSSO_FMV(:),iresp,hcomment=ycomment)
317 IF (dgu%LSURF_BUDGETC)
THEN
320 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
322 hprogram,yrecfm,dgu%XAVG_RNC(:),iresp,hcomment=ycomment)
325 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
327 hprogram,yrecfm,dgu%XAVG_HC(:),iresp,hcomment=ycomment)
330 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
332 hprogram,yrecfm,dgu%XAVG_LEC(:),iresp,hcomment=ycomment)
335 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
337 hprogram,yrecfm,dgu%XAVG_LEIC(:),iresp,hcomment=ycomment)
340 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
342 hprogram,yrecfm,dgu%XAVG_GFLUXC(:),iresp,hcomment=ycomment)
345 ycomment=
'X_Y_'//yrecfm//
' (kg/m2)'
348 hprogram,yrecfm,dgu%XAVG_EVAPC(:),iresp,hcomment=ycomment)
351 ycomment=
'X_Y_'//yrecfm//
' (kg/m2)'
354 hprogram,yrecfm,dgu%XAVG_SUBLC(:),iresp,hcomment=ycomment)
356 IF (dgu%LRAD_BUDGET .OR. (dgu%LSURF_BUDGETC .AND. .NOT.dgu%LRESET_BUDGETC))
THEN
359 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
361 hprogram,yrecfm,dgu%XAVG_SWDC(:),iresp,hcomment=ycomment)
364 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
366 hprogram,yrecfm,dgu%XAVG_SWUC(:),iresp,hcomment=ycomment)
369 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
371 hprogram,yrecfm,dgu%XAVG_LWDC(:),iresp,hcomment=ycomment)
374 ycomment=
'X_Y_'//yrecfm//
' (J/m2)'
376 hprogram,yrecfm,dgu%XAVG_LWUC(:),iresp,hcomment=ycomment)
381 ycomment=
'X_Y_'//yrecfm//
' (kg/ms)'
383 hprogram,yrecfm,dgu%XAVG_FMUC(:),iresp,hcomment=ycomment)
386 ycomment=
'X_Y_'//yrecfm//
' (kg/ms)'
388 hprogram,yrecfm,dgu%XAVG_FMVC(:),iresp,hcomment=ycomment)
399 ycomment=
'X_Y_'//yrecfm
401 hprogram,yrecfm,dgu%XAVG_CD(:),iresp,hcomment=ycomment)
404 ycomment=
'X_Y_'//yrecfm
406 hprogram,yrecfm,dgu%XAVG_CH(:),iresp,hcomment=ycomment)
409 ycomment=
'X_Y_'//yrecfm
411 hprogram,yrecfm,dgu%XAVG_CE(:),iresp,hcomment=ycomment)
414 ycomment=
'X_Y_'//yrecfm
416 hprogram,yrecfm,dgu%XAVG_Z0(:),iresp,hcomment=ycomment)
419 ycomment=
'X_Y_'//yrecfm
421 hprogram,yrecfm,dgu%XAVG_Z0H(:),iresp,hcomment=ycomment)
424 ycomment=
'X_Y_'//yrecfm
426 hprogram,yrecfm,dgu%XDIAG_UREF(:),iresp,hcomment=ycomment)
429 ycomment=
'X_Y_'//yrecfm
431 hprogram,yrecfm,dgu%XDIAG_ZREF(:),iresp,hcomment=ycomment)
439 IF (dgu%LSURF_VARS)
THEN
442 ycomment=
'X_Y_'//yrecfm//
' (kg/kg)'
445 hprogram,yrecfm,dgu%XAVG_QS(:),iresp,hcomment=ycomment)
454 IF (lhook) CALL dr_hook(
'WRITE_DIAG_SEB_SURF_ATM_N',1,zhook_handle)
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
integer function sum_on_all_procs(HPROGRAM, HGRID, OIN, HNAME)
subroutine write_diag_seb_surf_atm_n(DTCO, DGU, U, UG, HPROGRAM)
subroutine end_io_surf_n(HPROGRAM)