58 USE yomhook
,ONLY : lhook, dr_hook
59 USE parkind1
,ONLY : jprb
71 TYPE(flake_t),
INTENT(INOUT) :: f
74 CHARACTER(LEN=6),
INTENT(IN) :: hprogram
75 CHARACTER(LEN=3),
INTENT(IN) :: hwrite
81 CHARACTER(LEN=12) :: yrecfm
82 CHARACTER(LEN=100):: ycomment
85 REAL(KIND=JPRB) :: zhook_handle
93 IF (lhook) CALL dr_hook(
'WRITESURF_FLAKE_SBL_N',0,zhook_handle)
95 ycomment=
'flag to use SBL levels'
97 hprogram,yrecfm,f%LSBL,iresp,hcomment=ycomment)
99 IF (.NOT. f%LSBL .AND. lhook) CALL dr_hook(
'WRITESURF_FLAKE_SBL_N',1,zhook_handle)
100 IF (.NOT. f%LSBL)
RETURN
105 ycomment=
'number of SBL levels'
107 hprogram,yrecfm,fsb%NLVL,iresp,hcomment=ycomment)
112 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_Z',jlayer,
' '
113 ycomment=
'altitudes of SBL levels (m)'
115 hprogram,yrecfm,fsb%XZ(:,jlayer),iresp,hcomment=ycomment)
118 IF (hwrite/=
'PRE')
THEN
123 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_U',jlayer,
' '
124 ycomment=
'wind at SBL levels (m/s)'
126 hprogram,yrecfm,fsb%XU(:,jlayer),iresp,hcomment=ycomment)
132 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_T',jlayer,
' '
133 ycomment=
'temperature at SBL levels (K)'
135 hprogram,yrecfm,fsb%XT(:,jlayer),iresp,hcomment=ycomment)
141 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_Q',jlayer,
' '
142 ycomment=
'humidity at SBL levels (kg/m3)'
144 hprogram,yrecfm,fsb%XQ(:,jlayer),iresp,hcomment=ycomment)
150 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_E',jlayer,
' '
151 ycomment=
'Tke at SBL levels (m2/s2)'
153 hprogram,yrecfm,fsb%XTKE(:,jlayer),iresp,hcomment=ycomment)
158 yrecfm=
'WAT_SBL_LMO '
160 hprogram,yrecfm,fsb%XLMO(:),iresp,hcomment=ycomment)
165 WRITE(yrecfm,
'(A9,I2.2,A1)')
'WAT_SBL_P',jlayer,
' '
166 ycomment=
'Pressure at SBL levels (Pa)'
168 hprogram,yrecfm,fsb%XP(:,jlayer),iresp,hcomment=ycomment)
173 IF (lhook) CALL dr_hook(
'WRITESURF_FLAKE_SBL_N',1,zhook_handle)
subroutine writesurf_flake_sbl_n(DGU, U, F, FSB, HPROGRAM, HWRITE)