58 USE yomhook
,ONLY : lhook, dr_hook
59 USE parkind1
,ONLY : jprb
71 TYPE(isba_canopy_t
),
INTENT(INOUT) :: icp
72 TYPE(isba_t
),
INTENT(INOUT) :: i
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_ISBA_CANOPY_N',0,zhook_handle)
95 ycomment=
'flag to use canopy levels'
97 hprogram,yrecfm,i%LCANOPY,iresp,hcomment=ycomment)
99 IF (.NOT. i%LCANOPY .AND. lhook) CALL dr_hook(
'WRITESURF_ISBA_CANOPY_N',1,zhook_handle)
100 IF (.NOT. i%LCANOPY)
RETURN
104 yrecfm=
'ISBA_CAN_LVL'
105 ycomment=
'number of canopy levels'
107 hprogram,yrecfm,icp%NLVL,iresp,hcomment=ycomment)
112 WRITE(yrecfm,
'(A10,I2.2)')
'ISBA_CAN_Z',jlayer
113 ycomment=
'altitudes of canopy levels (m)'
115 hprogram,yrecfm,icp%XZ(:,jlayer),iresp,hcomment=ycomment)
118 IF (hwrite/=
'PRE')
THEN
123 WRITE(yrecfm,
'(A10,I2.2)')
'ISBA_CAN_U',jlayer
124 ycomment=
'wind at canopy levels (m/s)'
126 hprogram,yrecfm,icp%XU(:,jlayer),iresp,hcomment=ycomment)
132 WRITE(yrecfm,
'(A10,I2.2)')
'ISBA_CAN_T',jlayer
133 ycomment=
'temperature at canopy levels (K)'
135 hprogram,yrecfm,icp%XT(:,jlayer),iresp,hcomment=ycomment)
141 WRITE(yrecfm,
'(A10,I2.2)')
'ISBA_CAN_Q',jlayer
142 ycomment=
'humidity at canopy levels (kg/m3)'
144 hprogram,yrecfm,icp%XQ(:,jlayer),iresp,hcomment=ycomment)
150 WRITE(yrecfm,
'(A10,I2.2)')
'ISBA_CAN_E',jlayer
151 ycomment=
'Tke at canopy levels (m2/s2)'
153 hprogram,yrecfm,icp%XTKE(:,jlayer),iresp,hcomment=ycomment)
158 yrecfm=
'ISBA_CAN_LMO'
160 hprogram,yrecfm,icp%XLMO(:),iresp,hcomment=ycomment)
165 WRITE(yrecfm,
'(A10,I2.2)')
'ISBA_CAN_P',jlayer
166 ycomment=
'Pressure at canopy levels (Pa)'
168 hprogram,yrecfm,icp%XP(:,jlayer),iresp,hcomment=ycomment)
173 IF (lhook) CALL dr_hook(
'WRITESURF_ISBA_CANOPY_N',1,zhook_handle)
subroutine writesurf_isba_canopy_n(DGU, U, ICP, I, HPROGRAM, HWRITE)