WRF
WRF copied to clipboard
have a question about da_interpolation function da_to_zk_new
In line 30 and 34 of file var/da/da_interpolation/da_to_zk_new.inc, why the first indices of mdl_v are all kts.
...
if (v_interp_optn == v_interp_p) then
if (anal_type_verify) then
do n=1,num
do k=1,nlevels
if (obs_v(k) > mdl_v(kts,n)) then
! below the lowest level:
zk(k,n) = r_ktsplus - &
(obs_v(k)-mdl_v(kts+1,n))/(mdl_v(kts,n)-mdl_v(kts+1,n))
else if (obs_v(k) < mdl_v(kts,n)) then ! why this is kts instead of kte
! above the highest level:
zk(k,n) = r_kteminus + &
(obs_v(k)-mdl_v(kte-1,n))/(mdl_v(kte,n)-mdl_v(kte-1,n))
else
do kk = kts,kte-1
if (obs_v(k) <= mdl_v(kk,n) .and. obs_v(k) >= mdl_v(kk+1,n)) then
zk(k,n) = real(kk) + (mdl_v(kk,n) - obs_v(k))/(mdl_v(kk,n) - mdl_v(kk+1,n))
exit
end if
end do
end if
end do
end do
else
...
@liujake Please see if you have a quick answer for this question.