51 USE modd_io_surf_aro
, ONLY : nblock
58 USE modi_init_io_surf_n
60 USE modi_end_io_surf_n
76 TYPE(
diag_t),
INTENT(INOUT) :: D
77 TYPE(
diag_t),
INTENT(INOUT) :: DC
79 CHARACTER(LEN=6),
INTENT(IN) :: HPROGRAM
85 CHARACTER(LEN=12) :: YRECFM
86 CHARACTER(LEN=100):: YCOMMENT
87 CHARACTER(LEN=2) :: YNUM
91 REAL(KIND=JPRB) :: ZHOOK_HANDLE
96 IF (
lhook)
CALL dr_hook(
'WRITE_DIAG_SEB_FLAKE_N',0,zhook_handle)
103 IF (
ldef) greset = .false.
106 CALL init_io_surf_n(dtco, u, hprogram,
'WATER ',
'FLAKE ',
'WRITE',
'FLAKE_DIAGNOSTICS.OUT.nc' 115 ycomment=
'Bulk-Richardson number for water' 116 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XRI(:),iresp,hcomment=ycomment
123 IF (dfo%LSURF_BUDGET)
THEN 126 ycomment=
'net radiation for water'//
' (W/m2)' 127 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XRN(:),iresp,hcomment=ycomment
130 ycomment=
'sensible heat flux for water'//
' (W/m2)' 131 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XH(:),iresp,hcomment=ycomment
134 ycomment=
'total latent heat flux for water'//
' (W/m2)' 135 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLE(:),iresp,hcomment=ycomment
138 ycomment=
'sublimation latent heat flux for water-ice'//
' (W/m2)' 139 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLEI(:),iresp,hcomment=ycomment
142 ycomment=
'conduction flux for water'//
' (W/m2)' 143 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XGFLUX(:),iresp,hcomment
146 ycomment=
'X_Y_'//yrecfm//
' (kg/m2/s)' 147 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XEVAP(:),iresp,hcomment=ycomment
150 ycomment=
'X_Y_'//yrecfm//
' (kg/m2/s)' 151 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSUBL(:),iresp,hcomment=ycomment
153 IF (dfo%LRAD_BUDGET)
THEN 156 ycomment=
'short wave downward radiation for water'//
' (W/m2)' 157 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWD(:),iresp,hcomment
160 ycomment=
'short wave upward radiation for water'//
' (W/m2)' 161 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWU(:),iresp,hcomment
164 ycomment=
'downward long wave radiation'//
' (W/m2)' 165 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLWD(:),iresp,hcomment
168 ycomment=
'upward long wave radiation'//
' (W/m2)' 169 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XLWU(:),iresp,hcomment
174 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 176 hprogram,yrecfm,d%XSWBD(:,:),iresp,hcomment=ycomment, hnam_dim
179 ycomment=
'X_Y_'//yrecfm//
' (W/m2)' 181 hprogram,yrecfm,d%XSWBD(:,:),iresp,hcomment=ycomment, hnam_dim
185 DO jsw=1,
SIZE(d%XSWBD,2)
188 yrecfm=
'SWD_WAT_'//ynum
189 ycomment=
'downward short wave radiation by spectral band '//
' (W/m2)' 190 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWBD(:,jsw),iresp
192 yrecfm=
'SWU_WAT_'//ynum
193 ycomment=
'upward short wave radiation by spectral band'//
' (W/m2)' 194 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWBU(:,jsw),iresp
203 ycomment=
'u-component of momentum flux for water'//
' (kg/ms2)' 204 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XFMU(:),iresp,hcomment=ycomment
207 ycomment=
'v-component of momentum flux for water'//
' (kg/ms2)' 208 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XFMV(:),iresp,hcomment=ycomment
212 IF (dfo%LSURF_BUDGET.OR.dfo%LSURF_BUDGETC)
THEN 215 ycomment=
'total albedo over tile water (-)' 216 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XALBT(:),iresp,hcomment=ycomment
219 ycomment=
'snow water equivalent over tile water (-)' 220 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XSWE(:),iresp,hcomment=ycomment
231 ycomment=
'drag coefficient for wind over water (W/s2)' 232 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XCD(:),iresp,hcomment=ycomment
235 ycomment=
'drag coefficient for heat (W/s)' 236 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XCH(:),iresp,hcomment=ycomment
239 ycomment=
'drag coefficient for vapor (W/s/K)' 240 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XCE(:),iresp,hcomment=ycomment
243 ycomment=
'roughness length over water (m)' 244 CALL write_surf(duo%CSELECT, hprogram,yrecfm,d%XZ0(:),iresp,hcomment=ycomment
247 ycomment=
'thermal roughness length over water (m)' 248 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XZ0H(:),iresp,hcomment=ycomment
256 IF (dfo%LSURF_VARS)
THEN 259 ycomment=
'specific humidity over water'//
' (KG/KG)' 260 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XQS(:),iresp,hcomment=ycomment
272 ycomment=
'2 meters temperature'//
' (K)' 273 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XT2M(:),iresp,hcomment=ycomment
276 ycomment=
'X_Y_'//yrecfm//
' (K)' 277 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XT2M_MIN(:),iresp,hcomment
278 IF(greset)d%XT2M_MIN(:)=
xundef 281 ycomment=
'X_Y_'//yrecfm//
' (K)' 282 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XT2M_MAX(:),iresp,hcomment
283 IF(greset)d%XT2M_MAX(:)=0.0
286 ycomment=
'2 meters specific humidity'//
' (KG/KG)' 287 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XQ2M(:),iresp,hcomment=ycomment
290 ycomment=
'2 meters relative humidity'//
' (KG/KG)' 291 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XHU2M(:),iresp,hcomment=ycomment
294 ycomment=
'X_Y_'//yrecfm//
' (-)' 295 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XHU2M_MIN(:),iresp,hcomment
296 IF(greset)d%XHU2M_MIN(:)=
xundef 299 ycomment=
'X_Y_'//yrecfm//
' (-)' 300 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XHU2M_MAX(:),iresp,hcomment
301 IF(greset)d%XHU2M_MAX(:)=-
xundef 304 ycomment=
'10 meters zonal wind'//
' (M/S)' 305 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XZON10M(:),iresp,hcomment
308 ycomment=
'10 meters meridian wind'//
' (M/S)' 309 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XMER10M(:),iresp,hcomment
312 ycomment=
'X_Y_'//yrecfm//
' (M/S)' 313 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XWIND10M(:),iresp,hcomment
316 ycomment=
'X_Y_'//yrecfm//
' (M/S)' 317 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XWIND10M_MAX(:),iresp,hcomment
318 IF(greset)d%XWIND10M_MAX(:)=0.0
326 IF (chf%SVF%NBEQ>0 .AND. chf%CCH_DRY_DEP==
"WES89 ")
THEN 327 DO jsv = 1,
SIZE(chf%CCH_NAMES,1)
328 yrecfm=
'DVWT'//
trim(chf%CCH_NAMES(jsv))
329 WRITE(ycomment,
'(A13,I3.3)')
'(m/s) DV_WAT_',jsv
330 CALL write_surf(duo%CSELECT,hprogram,yrecfm,chf%XDEP(:,jsv),iresp,hcomment
338 IF(duo%LPROVAR_TO_DIAG)
THEN 341 ycomment=
'TS_WATER (K)' 342 CALL write_surf(duo%CSELECT,hprogram,yrecfm,d%XTS(:),iresp,hcomment=ycomment
346 IF (dfo%LSURF_BUDGETC)
THEN 349 CALL init_io_surf_n(dtco, u, hprogram,
'WATER ',
'FLAKE ',
'WRITE',
'FLAKE_DIAGNOSTICS.OUT.nc' 352 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 353 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XRN(:),iresp,hcomment=ycomment
356 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 357 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XH(:),iresp,hcomment=ycomment
360 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 361 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLE(:),iresp,hcomment=ycomment
364 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 365 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLEI(:),iresp,hcomment=ycomment
368 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 369 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XGFLUX(:),iresp,hcomment
372 ycomment=
'X_Y_'//yrecfm//
' (kg/m2)' 373 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XEVAP(:),iresp,hcomment
376 ycomment=
'X_Y_'//yrecfm//
' (kg/m2)' 377 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XSUBL(:),iresp,hcomment
379 IF (dfo%LRAD_BUDGET .OR. (dfo%LSURF_BUDGETC .AND. .NOT.duo%LRESET_BUDGETC
THEN 382 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 383 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XSWD(:),iresp,hcomment
386 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 387 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XSWU(:),iresp,hcomment
390 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 391 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLWD(:),iresp,hcomment
394 ycomment=
'X_Y_'//yrecfm//
' (J/m2)' 395 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XLWU(:),iresp,hcomment
400 ycomment=
'X_Y_'//yrecfm//
' (kg/ms)' 401 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XFMU(:),iresp,hcomment=ycomment
404 ycomment=
'X_Y_'//yrecfm//
' (kg/ms)' 405 CALL write_surf(duo%CSELECT,hprogram,yrecfm,dc%XFMV(:),iresp,hcomment=ycomment
414 IF (
lhook)
CALL dr_hook(
'WRITE_DIAG_SEB_FLAKE_N',1,zhook_handle)
static const char * trim(const char *name, int *n)
subroutine write_diag_seb_flake_n(DTCO, DUO, U, CHF, DFO, 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