25 subroutine sfc_nst_pre_run &
26 (im, wet, tgice, tsfco, tsurf_wat, &
27 tseal, xt, xz, dt_cool, z_c, tref, cplflx, &
28 oceanfrac, nthreads, errmsg, errflg)
31 integer,
intent(in) :: im, nthreads
32 logical,
dimension(:),
intent(in) :: wet
33 real (kind=kind_phys),
intent(in) :: tgice
34 real (kind=kind_phys),
dimension(:),
intent(in) :: tsfco, oceanfrac
35 real (kind=kind_phys),
dimension(:),
intent(in),
optional :: xt, xz, dt_cool, z_c
36 logical,
intent(in) :: cplflx
39 real (kind=kind_phys),
dimension(:),
intent(inout) :: tsurf_wat, tseal
40 real (kind=kind_phys),
dimension(:),
intent(inout),
optional :: tref
43 character(len=*),
intent(out) :: errmsg
44 integer,
intent(out) :: errflg
48 real(kind=kind_phys),
parameter :: omz1 = 2.0_kind_phys
49 real(kind=kind_phys) :: tem2, dnsst
50 real(kind=kind_phys),
dimension(im) :: dtzm, z_c_0
57 if (wet(i) .and. oceanfrac(i) > 0.0)
then
72 call get_dtzm_2d (xt, xz, dt_cool, z_c_0, wet, zero, omz1, im, 1, nthreads, dtzm)
74 if (wet(i) .and. oceanfrac(i) > zero )
then
76 tref(i) = max(tgice, tsfco(i) - dtzm(i))
79 if (abs(xz(i)) > zero)
then
84 tseal(i) = tref(i) + (xt(i)+xt(i)) * tem2 - dt_cool(i)
85 tsurf_wat(i) = tseal(i)
subroutine, public get_dtzm_2d(xt, xz, dt_cool, zc, wet, z1, z2, nx, ny, nth, dtm)