60 USE yomhook
,ONLY : lhook, dr_hook
61 USE parkind1
,ONLY : jprb
63 USE modi_get_type_dim_n
77 CHARACTER(LEN=6),
INTENT(IN) :: hprogram
84 INTEGER :: jmth, inmth
85 CHARACTER(LEN=2 ) :: ymth
86 CHARACTER(LEN=5) :: ylvl
88 CHARACTER(LEN=6) :: yicecat
89 CHARACTER(LEN=20) :: yform
90 CHARACTER(LEN=12) :: yrecfm
91 CHARACTER(LEN=12) :: ycateg
92 CHARACTER(LEN=12) :: ylevel
93 CHARACTER(LEN=100):: ycomment
97 REAL(KIND=JPRB) :: zhook_handle
100 IF (lhook) CALL dr_hook(
'WRITESURF_SEAICE_n',0,zhook_handle)
105 hprogram,
'SEAICE_SCHEM',s%CSEAICE_SCHEME,iresp,ycomment)
108 IF (s%CSEAICE_SCHEME ==
'GELATO')
THEN
109 ycomment=
'Number of sea-ice layers'
111 hprogram,
'ICENL',nl,iresp,ycomment)
112 ycomment=
'Number of ice categories'
114 hprogram,
'ICENT',nt,iresp,ycomment)
118 ycomment=
'ICEUSTAR ()'
120 hprogram,
'ICEUSTAR',s%TGLT%ust(:,1),iresp,ycomment)
125 WRITE(yicecat,
'(I2)') jk
126 ycateg=
'_'//adjustl(yicecat)
128 ycomment=
'X_Y_ICEAGE'//ycateg//
' (s)'
130 hprogram,
'ICEAGE'//ycateg,s%TGLT%sit(jk,:,1)%age,iresp,ycomment)
132 ycomment=
'X_Y_ICEVMP'//ycateg//
' (m3)'
134 hprogram,
'ICEVMP'//ycateg,s%TGLT%sit(jk,:,1)%vmp,iresp,ycomment)
136 ycomment=
'X_Y_ICEASN'//ycateg//
' ([0-1])'
138 hprogram,
'ICEASN'//ycateg,s%TGLT%sit(jk,:,1)%asn,iresp,ycomment)
140 ycomment=
'X_Y_ICEFSI'//ycateg//
' ([0-1])'
142 hprogram,
'ICEFSI'//ycateg, s%TGLT%sit(jk,:,1)%fsi,iresp,ycomment)
144 ycomment=
'X_Y_ICEHSI'//ycateg//
' (m)'
146 hprogram,
'ICEHSI'//ycateg, s%TGLT%sit(jk,:,1)%hsi,iresp,ycomment)
148 ycomment=
'X_Y_ICESSI'//ycateg//
' (psu)'
150 hprogram,
'ICESSI'//ycateg, s%TGLT%sit(jk,:,1)%ssi,iresp,ycomment)
152 ycomment=
'X_Y_ICETSF'//ycateg//
' (K)'
154 hprogram,
'ICETSF'//ycateg, s%TGLT%sit(jk,:,1)%tsf,iresp,ycomment)
156 ycomment=
'X_Y_ICEHSN'//ycateg//
' (m)'
158 hprogram,
'ICEHSN'//ycateg, s%TGLT%sit(jk,:,1)%hsn,iresp,ycomment)
160 ycomment=
'X_Y_ICERSN'//ycateg//
' (kg m-3)'
162 hprogram,
'ICERSN'//ycateg, s%TGLT%sit(jk,:,1)%rsn,iresp,ycomment)
167 WRITE(ylvl,
'(I2)') jl
168 ylevel=ycateg(1:len_trim(ycateg))//
'_'//adjustl(ylvl)
170 IF (jl >= 10) yform=
'(A6,I2.2,A4)'
171 WRITE(ycomment,fmt=yform)
'X_Y_ICEH',jl,
' (J/kg)'
174 hprogram,
'ICEH'//ylevel, s%TGLT%sil(jl,jk,:,1)%ent,iresp,ycomment)
186 IF(s%LINTERPOL_SIC)
THEN
188 inmth=
SIZE(s%XSIC_MTH,2)
191 WRITE(ymth,
'(I2)') (jmth-1)
192 yrecfm=
'SIC_MTH'//adjustl(ymth(:len_trim(ymth)))
193 ycomment=
'Sea ice coverage at month t'//adjustl(ymth(:len_trim(ymth)))
195 hprogram,yrecfm,s%XSIC_MTH(:,jmth),iresp,hcomment=ycomment)
201 ycomment=
'Sea ice coverage'
203 hprogram,yrecfm,s%XSIC(:),iresp,hcomment=ycomment)
208 IF(s%LINTERPOL_SIT)
THEN
210 inmth=
SIZE(s%XSIT_MTH,2)
213 WRITE(ymth,
'(I2)') (jmth-1)
214 yrecfm=
'SIT_MTH'//adjustl(ymth(:len_trim(ymth)))
215 ycomment=
'Sea ice thickness constraint at month t'//adjustl(ymth(:len_trim(ymth)))
217 hprogram,yrecfm,s%XSIT_MTH(:,jmth),iresp,hcomment=ycomment)
222 IF (lhook) CALL dr_hook(
'WRITESURF_SEAICE_n',1,zhook_handle)
subroutine writesurf_seaice_n(DGU, U, S, HPROGRAM)