1 subroutine da_transform_vpatox(grid, nens, ep, vp, nobwin)
3 !----------------------------------------------------------------------
4 ! Purpose: Does 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")
22 if ( present(nobwin) ) then
26 if (nens > 0 .and. alphacv_method == alphacv_method_xa) then
27 !transform xa_ens from vp%alpha
28 !xa_ens holds the increment from ensemble perturbations for certain fgat time
33 grid%xa_ens%psfc = 0.0
39 if ( anal_type_hybrid_dual_res ) then
40 call da_calc_flow_dependence_xa_dual_res(grid, grid%xa_ens, nens, ep, vp, iobwin)
42 call da_calc_flow_dependence_xa(grid%xa_ens, nens, ep, vp, iobwin)
46 if (trace_use) call da_trace_exit("da_transform_vpatox")
48 end subroutine da_transform_vpatox