1 subroutine da_transform_vpatox_adj(grid, nens, ep, vp, nobwin)
3 !----------------------------------------------------------------------
4 ! Purpose: Does adjoint transform of alpha control variable (vp%alpha) to x
5 !----------------------------------------------------------------------
9 type(ep_type), intent(in) :: ep ! Ensemble perturbation structure.
10 type(vp_type), intent(inout) :: vp ! Grdipt/level CV.
11 type(domain), intent(inout) :: grid
12 integer, intent(in) :: nens ! number of ensembles
13 integer, intent(in), optional :: nobwin
17 if (nens <= 0 .or. alphacv_method /= alphacv_method_xa) return
19 if (trace_use) call da_trace_entry("da_transform_vpatox_adj")
22 if ( present(nobwin) ) then
26 if (nens > 0 .and. alphacv_method == alphacv_method_xa) then
27 !this is for getting vp%alpha only
29 if ( anal_type_hybrid_dual_res ) then
30 call da_calc_flow_dependence_xa_adj_dual_res(nens, ep, grid, grid%xa, vp, iobwin)
32 call da_calc_flow_dependence_xa_adj(nens, ep, grid%xa, vp, iobwin)
36 if (trace_use) call da_trace_exit("da_transform_vpatox_adj")
38 end subroutine da_transform_vpatox_adj