49 USE modd_io_surf_aro
, ONLY : nblock
60 USE modi_init_io_surf_n
62 USE modi_end_io_surf_n
78 TYPE(
diag_t),
INTENT(INOUT) :: D
79 TYPE(
diag_t),
INTENT(INOUT) :: DC
80 LOGICAL,
INTENT(IN) :: OHANDLE_SIC
82 CHARACTER(LEN=6),
INTENT(IN) :: HPROGRAM
88 CHARACTER(LEN=12) :: YRECFM
89 CHARACTER(LEN=100):: YCOMMENT
90 CHARACTER(LEN=2) :: YNUM
96 REAL(KIND=JPRB) :: ZHOOK_HANDLE
100 IF (
lhook)
CALL dr_hook(
'WRITE_DIAG_SEB_SEAFLUX_N',0,zhook_handle)
109 IF (
ldef) greset = .false.
112 CALL init_io_surf_n(dtco, u,hprogram,
'SEA ',
'SEAFLX',
'WRITE',
'SEAFLUX_DIAGNOSTICS.OUT.nc' 118 gmisc=(dso%N2M>=1.OR.dso%LSURF_BUDGET.OR.dso%LSURF_BUDGETC)
120 IF (gmisc.AND.ohandle_sic)
THEN 123 ycomment=
'X_Y_'//yrecfm//
' (K)' 125 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XTS(:),iresp,hcomment=ycomment
128 ycomment=
'X_Y_'//yrecfm//
' (K)' 130 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XTSRAD(:),iresp,hcomment
140 ycomment=
'X_Y_'//yrecfm
142 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XRI(:),iresp,hcomment=ycomment
149 IF (dso%LSURF_BUDGET)
THEN 152 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 154 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XRN(:),iresp,hcomment=ycomment
157 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 159 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XH(:),iresp,hcomment=ycomment
162 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 164 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLE(:),iresp,hcomment=ycomment
167 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 168 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLEI(:),iresp,hcomment=ycomment
171 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 173 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XGFLUX(:),iresp,hcomment
176 ycomment=
'X_Y_'//yrecfm//
' (kg/m2/s)' 178 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XEVAP(:),iresp,hcomment
181 ycomment=
'X_Y_'//yrecfm//
' (kg/m2/s)' 183 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSUBL(:),iresp,hcomment
185 IF (dso%LRAD_BUDGET)
THEN 188 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 190 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWD(:),iresp,hcomment
193 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 195 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWU(:),iresp,hcomment
198 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 200 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLWD(:),iresp,hcomment
203 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 205 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLWU(:),iresp,hcomment
210 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 212 hprogram,yrecfm,d%XSWBD(:,:),iresp,hcomment=ycomment, hnam_dim
215 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 217 hprogram,yrecfm,d%XSWBU(:,:),iresp,hcomment=ycomment, hnam_dim
221 DO jsw=1,
SIZE(d%XSWBD,2)
224 yrecfm=
'SWD_SEA_'//ynum
225 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 227 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWBD(:,jsw),iresp
229 yrecfm=
'SWU_SEA_'//ynum
230 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 232 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWBU(:,jsw),iresp
241 ycomment=
'X_Y_'//yrecfm//
' (kg/ms2)' 243 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XFMU(:),iresp,hcomment=ycomment
246 ycomment=
'X_Y_'//yrecfm//
' (kg/ms2)' 248 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XFMV(:),iresp,hcomment=ycomment
252 IF (dso%LSURF_BUDGET.OR.dso%LSURF_BUDGETC)
THEN 255 ycomment=
'total albedo over tile sea (-)' 256 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XALBT(:),iresp,hcomment=ycomment
266 ycomment=
'X_Y_'//yrecfm//
' (W/s2)' 268 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XCD(:),iresp,hcomment=ycomment
271 ycomment=
'X_Y_'//yrecfm//
' (W/s)' 273 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XCH(:),iresp,hcomment=ycomment
276 ycomment=
'X_Y_'//yrecfm//
' (W/s/K)' 278 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XCE(:),iresp,hcomment=ycomment
281 ycomment=
'X_Y_'//yrecfm//
' (M)' 283 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XZ0(:),iresp,hcomment=ycomment
286 ycomment=
'X_Y_'//yrecfm//
' (M)' 288 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XZ0H(:),iresp,hcomment=ycomment
296 IF (dso%LSURF_VARS)
THEN 299 ycomment=
'X_Y_'//yrecfm//
' (KG/KG)' 301 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XQS(:),iresp,hcomment=ycomment
312 ycomment=
'X_Y_'//yrecfm//
' (K)' 314 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XT2M(:),iresp,hcomment=ycomment
317 ycomment=
'X_Y_'//yrecfm//
' (K)' 319 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XT2M_MIN(:),iresp,hcomment
320 IF(greset)d%XT2M_MIN(:)=
xundef 323 ycomment=
'X_Y_'//yrecfm//
' (K)' 325 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XT2M_MAX(:),iresp,hcomment
326 IF(greset)d%XT2M_MAX(:)=0.0
329 ycomment=
'X_Y_'//yrecfm//
' (KG/KG)' 331 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XQ2M(:),iresp,hcomment=ycomment
334 ycomment=
'X_Y_'//yrecfm//
' (-)' 336 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XHU2M(:),iresp,hcomment
339 ycomment=
'X_Y_'//yrecfm//
' (-)' 341 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XHU2M_MIN(:),iresp,hcomment
342 IF(greset)d%XHU2M_MIN(:)=
xundef 345 ycomment=
'X_Y_'//yrecfm//
' (-)' 347 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XHU2M_MAX(:),iresp,hcomment
348 IF(greset)d%XHU2M_MAX(:)=-
xundef 351 ycomment=
'X_Y_'//yrecfm//
' (M/S)' 353 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XZON10M(:),iresp,hcomment
356 ycomment=
'X_Y_'//yrecfm//
' (M/S)' 358 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XMER10M(:),iresp,hcomment
361 ycomment=
'X_Y_'//yrecfm//
' (M/S)' 363 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XWIND10M(:),iresp,hcomment
366 ycomment=
'X_Y_'//yrecfm//
' (M/S)' 368 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XWIND10M_MAX(:),iresp,hcomment
369 IF(greset)d%XWIND10M_MAX(:)=0.0
377 IF (chs%SVS%NBEQ>0 .AND. chs%CCH_DRY_DEP==
"WES89 ")
THEN 378 DO jsv = 1,
SIZE(chs%CCH_NAMES,1)
379 yrecfm=
'DVSE'//
trim(chs%CCH_NAMES(jsv))
380 WRITE(ycomment,
'(A13,I3.3)')
'(m/s) DV_SEA_',jsv
381 CALL write_surf(duo%CSELECT,hprogram,yrecfm,chs%XDEP(:,jsv),iresp,hcomment
385 IF (dso%LSURF_BUDGETC)
THEN 388 CALL init_io_surf_n(dtco, u,hprogram,
'SEA ',
'SEAFLX',
'WRITE',
'SEAFLUX_DIAG_CUMUL.OUT.nc' 391 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 393 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XRN(:),iresp,hcomment=ycomment
396 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 398 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XH(:),iresp,hcomment=ycomment
401 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 403 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLE(:),iresp,hcomment=ycomment
406 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 407 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLEI(:),iresp,hcomment
410 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 412 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XGFLUX(:),iresp,hcomment
415 ycomment=
'X_Y_'//yrecfm//
' (kg/m2)' 417 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XEVAP(:),iresp,hcomment
420 ycomment=
'X_Y_'//yrecfm//
' (kg/m2)' 422 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XSUBL(:),iresp,hcomment
424 IF (dso%LRAD_BUDGET .OR. (dso%LSURF_BUDGETC .AND. .NOT.duo%LRESET_BUDGETC
THEN 427 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 429 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XSWD(:),iresp,hcomment
432 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 434 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XSWU(:),iresp,hcomment
437 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 439 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLWD(:),iresp,hcomment
442 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 444 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLWU(:),iresp,hcomment
449 ycomment=
'X_Y_'//yrecfm//
' (kg/ms)' 451 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XFMU(:),iresp,hcomment
454 ycomment=
'X_Y_'//yrecfm//
' (kg/ms)' 456 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XFMV(:),iresp,hcomment
466 IF (
lhook)
CALL dr_hook(
'WRITE_DIAG_SEB_SEAFLUX_N',1,zhook_handle)
static const char * trim(const char *name, int *n)
subroutine write_diag_seb_seaflux_n(DTCO, DUO, U, CHS, DSO, D, DC
character(len=30) yswband_dim_name
subroutine end_io_surf_n(HPROGRAM)
subroutine init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION