1 SUBROUTINE jcdfi_init_coef
3 USE module_domain, ONLY : domain, head_grid
8 INTEGER :: nstep2, rundfi, rc, i
9 TYPE(WRFU_TimeInterval) :: run_interval
13 SUBROUTINE optfil_driver(grid)
14 USE module_domain, ONLY : domain
15 TYPE (domain), POINTER :: grid
16 END SUBROUTINE optfil_driver
21 CALL optfil_driver(head_grid)
23 timestep=abs(head_grid%dt)
24 run_interval = head_grid%stop_subtime - head_grid%start_subtime
26 CALL WRFU_TimeIntervalGet( run_interval, S=rundfi, rc=rc )
29 nstep2= ceiling((1.0 + real(rundfi)/timestep) / 2.0)
31 IF ( MOD(int(1.0 + real(rundfi)/timestep),2) /= 0 ) THEN
33 head_grid%hcoeff(i) = -1.0 * head_grid%hcoeff(i)
37 head_grid%hcoeff(i) = -1.0 * head_grid%hcoeff(i)
41 head_grid%hcoeff(nstep2) = 1.0 + head_grid%hcoeff(nstep2)
43 END SUBROUTINE jcdfi_init_coef
45 SUBROUTINE jcdfi_zero_forcing ( grid )
47 USE module_domain, ONLY : domain
53 TYPE(domain) , INTENT(INOUT) :: grid
62 END SUBROUTINE jcdfi_zero_forcing
64 SUBROUTINE jcdfi_tl (grid)
66 USE module_domain, ONLY : domain
72 TYPE(domain) , INTENT(INOUT) :: grid
76 hn = grid%hcoeff(grid%itimestep+1)
78 grid%jcdfi_u = grid%jcdfi_u + hn * grid%g_u_2
79 grid%jcdfi_v = grid%jcdfi_v + hn * grid%g_v_2
80 grid%jcdfi_t = grid%jcdfi_t + hn * grid%g_t_2
81 grid%jcdfi_p = grid%jcdfi_p + hn * grid%g_p
83 END SUBROUTINE jcdfi_tl
85 SUBROUTINE jcdfi_add_forcing ( grid )
87 USE module_domain, ONLY : domain
91 TYPE ( domain ) , INTENT(INOUT) :: grid
95 hn = grid%hcoeff(grid%itimestep+1)
97 grid%a_u_2 = grid%a_u_2 + hn * grid%jcdfi_u
98 grid%a_v_2 = grid%a_v_2 + hn * grid%jcdfi_v
99 grid%a_t_2 = grid%a_t_2 + hn * grid%jcdfi_t
100 grid%a_p = grid%a_p + hn * grid%jcdfi_p
101 END SUBROUTINE jcdfi_add_forcing