Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have a question about da_interpolation function da_to_zk_new #1939

Open
ivaNov-0042 opened this issue Nov 19, 2023 · 1 comment
Open

have a question about da_interpolation function da_to_zk_new #1939

ivaNov-0042 opened this issue Nov 19, 2023 · 1 comment
Assignees

Comments

@ivaNov-0042
Copy link

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
...
@weiwangncar
Copy link
Collaborator

@liujake Please see if you have a quick answer for this question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants