1 subroutine da_transform_xtoy_gpsref (grid, iv, y)
3 !-------------------------------------------------------------------------
5 !-------------------------------------------------------------------------
9 type (domain), intent(in) :: grid
10 type (iv_type), intent(in) :: iv ! Innovation vector (O-B).
11 type (y_type), intent(inout) :: y ! y = h (grid%xa)
13 integer :: n ! Loop counter.
15 real, allocatable :: model_ref(:,:)
17 if (trace_use_dull) call da_trace_entry("da_transform_xtoy_gpsref")
19 allocate (model_ref(iv%info(gpsref)%max_lev,iv%info(gpsref)%n1:iv%info(gpsref)%n2))
21 call da_interp_lin_3d (grid%xa%ref, iv%info(gpsref), model_ref)
23 do n=iv%info(gpsref)%n1,iv%info(gpsref)%n2
24 y%gpsref(n)%ref(:) = model_ref(1:iv%info(gpsref)%levels(n),n)
27 deallocate (model_ref)
29 if (trace_use_dull) call da_trace_exit("da_transform_xtoy_gpsref")
31 end subroutine da_transform_xtoy_gpsref