da_transform_xtoy_gpsref_adj.inc

References to this file elsewhere.
1 subroutine da_transform_xtoy_gpsref_adj(iv, jo_grad_y, jo_grad_x)
2 
3    !-------------------------------------------------------------------------
4    ! Purpose: TBD
5    !-------------------------------------------------------------------------
6 
7    implicit none
8 
9    type (iv_type), intent(in)    :: iv          ! obs. inc vector (o-b).
10    type (y_type) , intent(in)    :: jo_grad_y   ! grad_y(jo)
11    type (x_type) , intent(inout) :: jo_grad_x   ! grad_x(jo)
12 
13    integer                       :: n  ! Loop counter.
14 
15    real, allocatable :: model_ref(:,:)
16 
17    if (trace_use_dull) call da_trace_entry("da_transform_xtoy_gpsref_adj")
18 
19    allocate (model_ref(iv%info(gpsref)%max_lev,iv%info(gpsref)%n1:iv%info(gpsref)%n2))
20 
21    do n=iv%info(gpsref)%n1,iv%info(gpsref)%n2
22       model_ref(1:iv%info(gpsref)%levels(n),n) = jo_grad_y%gpsref(n)%ref(:)
23    end do
24 
25    call da_interp_lin_3d_adj (jo_grad_x%ref, iv%info(gpsref), model_ref)
26 
27    deallocate(model_ref)
28 
29    if (trace_use_dull) call da_trace_exit("da_transform_xtoy_gpsref_adj")
30 
31 end subroutine da_transform_xtoy_gpsref_adj
32 
33