1 subroutine da_alloc_and_copy_be_arrays (vg , v, jts,jte, kts,kte)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 type (be_subtype), intent(inout) :: vg ! Global backgrd error struct.
10 type (be_subtype), intent(inout) :: v ! Local backgrd error struct.
11 integer, intent(in) :: jts,jte ! Tile dimension.
12 integer, intent(in) :: kts,kte ! Tile dimension.
14 ! Allocate local-grid structure.
17 allocate (v % val(jts:jte,1:v % mz))
18 allocate (v % evec(jts:jte,kts:kte,1:v % mz))
19 allocate (v % rf_alpha(1:v % mz))
22 ! Make local copies from global arrays.
24 v % val(jts:jte,1:v % mz) = vg % val(jts:jte,1:v % mz)
25 v % evec(jts:jte,kts:kte,1:v % mz) = vg % evec(jts:jte,kts:kte,1:v % mz)
26 v % rf_alpha(1:v % mz) = vg % rf_alpha(1:v % mz)
29 ! Deallocate global arrays.
31 deallocate (vg % val )
32 deallocate (vg % evec)
33 deallocate (vg % rf_alpha)
36 end subroutine da_alloc_and_copy_be_arrays