24 subroutine sfc_nst_pre_run &
25 (im, wet, tgice, tsfco, tsurf_wat, &
26 tseal, xt, xz, dt_cool, z_c, tref, cplflx, &
27 oceanfrac, nthreads, errmsg, errflg)
30 integer,
intent(in) :: im, nthreads
31 logical,
dimension(:),
intent(in) :: wet
32 real (kind=kind_phys),
intent(in) :: tgice
33 real (kind=kind_phys),
dimension(:),
intent(in) :: tsfco, oceanfrac
34 real (kind=kind_phys),
dimension(:),
intent(in),
optional :: xt, xz, dt_cool, z_c
35 logical,
intent(in) :: cplflx
38 real (kind=kind_phys),
dimension(:),
intent(inout) :: tsurf_wat, tseal
39 real (kind=kind_phys),
dimension(:),
intent(inout),
optional :: tref
42 character(len=*),
intent(out) :: errmsg
43 integer,
intent(out) :: errflg
47 real(kind=kind_phys),
parameter :: omz1 = 2.0_kind_phys
48 real(kind=kind_phys) :: tem2, dnsst
49 real(kind=kind_phys),
dimension(im) :: dtzm, z_c_0
56 if (wet(i) .and. oceanfrac(i) > 0.0)
then
71 call get_dtzm_2d (xt, xz, dt_cool, z_c_0, wet, zero, omz1, im, 1, nthreads, dtzm)
73 if (wet(i) .and. oceanfrac(i) > zero )
then
75 tref(i) = max(tgice, tsfco(i) - dtzm(i))
78 if (abs(xz(i)) > zero)
then
83 tseal(i) = tref(i) + (xt(i)+xt(i)) * tem2 - dt_cool(i)
84 tsurf_wat(i) = tseal(i)
subroutine, public get_dtzm_2d(xt, xz, dt_cool, zc, wet, z1, z2, nx, ny, nth, dtm)