58 USE yomhook
,ONLY : lhook, dr_hook
59 USE parkind1
,ONLY : jprb
74 CHARACTER(LEN=6),
INTENT(IN) :: hprogram
75 CHARACTER(LEN=3),
INTENT(IN) :: hwrite
82 CHARACTER(LEN=12) :: yrecfm
83 CHARACTER(LEN=100):: ycomment
86 REAL(KIND=JPRB) :: zhook_handle
94 IF (lhook) CALL dr_hook(
'WRITESURF_WATFLUX_SBL_N',0,zhook_handle)
96 ycomment=
'flag to use SBL levels'
98 hprogram,yrecfm,w%LSBL,iresp,hcomment=ycomment)
100 IF (.NOT. w%LSBL .AND. lhook) CALL dr_hook(
'WRITESURF_WATFLUX_SBL_N',1,zhook_handle)
101 IF (.NOT. w%LSBL)
RETURN
106 ycomment=
'number of SBL levels'
108 hprogram,yrecfm,wsb%NLVL,iresp,hcomment=ycomment)
113 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_Z',jlayer,
' '
114 ycomment=
'altitudes of SBL levels (m)'
116 hprogram,yrecfm,wsb%XZ(:,jlayer),iresp,hcomment=ycomment)
119 IF (hwrite/=
'PRE')
THEN
124 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_U',jlayer,
' '
125 ycomment=
'wind at SBL levels (m/s)'
127 hprogram,yrecfm,wsb%XU(:,jlayer),iresp,hcomment=ycomment)
133 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_T',jlayer,
' '
134 ycomment=
'temperature at SBL levels (K)'
136 hprogram,yrecfm,wsb%XT(:,jlayer),iresp,hcomment=ycomment)
142 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_Q',jlayer,
' '
143 ycomment=
'humidity at SBL levels (kg/m3)'
145 hprogram,yrecfm,wsb%XQ(:,jlayer),iresp,hcomment=ycomment)
151 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_E',jlayer,
' '
152 ycomment=
'Tke at SBL levels (m2/s2)'
154 hprogram,yrecfm,wsb%XTKE(:,jlayer),iresp,hcomment=ycomment)
159 yrecfm=
'WAT_SBL_LMO '
161 hprogram,yrecfm,wsb%XLMO(:),iresp,hcomment=ycomment)
166 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_P',jlayer,
' '
167 ycomment=
'Pressure at SBL levels (Pa)'
169 hprogram,yrecfm,wsb%XP(:,jlayer),iresp,hcomment=ycomment)
174 IF (lhook) CALL dr_hook(
'WRITESURF_WATFLUX_SBL_N',1,zhook_handle)
subroutine writesurf_watflux_sbl_n(DGU, U, W, WSB, HPROGRAM, HWRITE)