updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_setup_structures / da_setup_obs_interp_wts.inc
blobc28a57e91495bfd52419c9cd0c566b6bdc280fd0
1 subroutine da_setup_obs_interp_wts (iv)
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
7    implicit none
9    type (iv_type), intent(inout)  :: iv         ! Innovation vector (O-B).
11    integer                        :: i         ! Loop counter.
13    if (trace_use) call da_trace_entry("da_setup_obs_interp_wts")
15    do i=1,num_ob_indexes
16       if (i /= radiance .and. iv%info(i)%nlocal > 0) then ! i=22 is radiance , should be excluded here
17          if ( ob_format == ob_format_ascii ) then
18             call da_store_obs_grid_info (iv%info(i))
19          else if ( ob_format == ob_format_bufr ) then
20             call da_store_obs_grid_info (iv%info(i))
21          end if
22       end if
23    end do
25    if ( use_gpsephobs .and. gpseph_loadbalance ) then
26       do i=1,iv%info(gpseph)%nlocal
27          iv%info(gpseph)%proc_domain(:,i) = .true.
28       end do
29    endif
31    do i = 1, iv % num_inst
32       if (iv % instid(i) % num_rad < 1) cycle
33       call da_store_obs_grid_info_rad (iv%instid(i)%info)
34    end do
36    if (trace_use) call da_trace_exit("da_setup_obs_interp_wts")
38 end subroutine da_setup_obs_interp_wts