23 subroutine sfc_cice_run &
25 & ( im, cplflx, hvap, cp, rvrdm1, rd, &
26 & t1, q1, cm, ch, prsl1, &
27 & wind, flag_cice, flag_iter, dqsfc, dtsfc, &
28 & dusfc, dvsfc, snowd, &
30 & qsurf, cmm, chh, evap, hflx, stress, weasd, snwdph, ep, &
79 use machine ,
only : kind_phys
82 real(kind=kind_phys),
parameter :: one = 1.0_kind_phys
83 real(kind=kind_phys),
parameter :: dsi = one/0.33_kind_phys
84 real(kind=kind_phys),
intent(in) :: hvap, cp, rvrdm1, rd
87 integer,
intent(in) :: im
88 logical,
intent(in) :: cplflx
91 real (kind=kind_phys),
dimension(:),
intent(in) :: &
92 & t1, q1, cm, ch, prsl1, wind, snowd
94 real (kind=kind_phys),
dimension(:),
intent(in),
optional :: &
95 & dqsfc, dtsfc, dusfc, dvsfc
96 logical,
dimension(:),
intent(in) :: flag_cice, flag_iter
99 real (kind=kind_phys),
dimension(:),
intent(inout) :: qsurf, &
100 & cmm, chh, evap, hflx, stress
103 character(len=*),
intent(out) :: errmsg
104 integer,
intent(out) :: errflg
108 real (kind=kind_phys) :: rho, tem
110 real(kind=kind_phys) :: cpinv, hvapi, elocp
118 if (.not. cplflx)
return
125 if (flag_cice(i) .and. flag_iter(i))
then
128 & / (rd * t1(i) * (one + rvrdm1*max(q1(i), 1.0e-8_kind_phys)))
130 cmm(i) = wind(i) * cm(i)
131 chh(i) = wind(i) * ch(i) * rho
133 qsurf(i) = q1(i) + dqsfc(i) / (hvap*chh(i))
135 hflx(i) = dtsfc(i) * tem * cpinv
136 evap(i) = dqsfc(i) * tem * hvapi
137 stress(i) = sqrt(dusfc(i)*dusfc(i) + dvsfc(i)*dvsfc(i)) * tem
139 snwdph(i) = snowd(i) * 1000.0_kind_phys
140 weasd(i) = snwdph(i) * 0.33_kind_phys