5 module module_sf_scmskintemp
8 !-------------------------------------------------------------------
10 subroutine scmskintemp(tsk, julian_in, itimestep, &
11 ids, ide, jds, jde, kds, kde, &
12 ims, ime, jms, jme, kms, kme, &
13 its, ite, jts, jte, kts, kte )
14 !-------------------------------------------------------------------
16 !-------------------------------------------------------------------
18 integer, intent(in) :: ids, ide, jds, jde, kds, kde, &
19 ims, ime, jms, jme, kms, kme, &
20 its, ite, jts, jte, kts, kte, &
23 real, intent(in) :: julian_in
25 real, dimension( ims:ime, jms:jme ) , &
30 integer, parameter :: n_max = 1200
31 integer :: i, j, n, nm, nt, m
32 real :: julian_s, julian_e, fc_int
33 real, dimension( 0:n_max ) :: fc_tsk, fc_julian
34 logical :: end_of_file
36 !-----open scmtemp_bdy and read the julian_s, julian_e, fc_int
38 open(unit=11, file='scmtemp_bdy', form='formatted', status='old')
39 read(11,*) julian_s, julian_e, fc_int
43 do while (.not. end_of_file)
44 read(11,*,end=100) fc_tsk(n)
45 fc_julian(n)=julian_s+real(n-1)*fc_int/86400.
48 100 end_of_file = .true.
54 !-----linear interpolation of the skin temperature for each time step
57 if (julian_in.ge.fc_julian(n) .and. julian_in.lt.fc_julian(n+1)) then
58 fc_tsk(0)= fc_tsk(n) &
59 +(fc_tsk(n+1)-fc_tsk(n))*(julian_in-fc_julian(n))/fc_int/86400.
63 !-----compute skin temperature
71 end subroutine scmskintemp
72 !-------------------------------------------------------------------
73 end module module_sf_scmskintemp