Line data Source code
1 : module edyn_solver_coefs
2 :
3 : use shr_kind_mod ,only: r8 => shr_kind_r8 ! 8-byte reals
4 :
5 : !
6 : ! nc(1:9) are pointers to beginning of coefficient blocks at each of
7 : ! levels of resolution:
8 : ! nc(1) = nc0, pointer to coefficients for highest resolution.
9 : ! nc(2) = nc1, pointer to coefficients at half the resolution of nc0,
10 : ! and so on for nc(3), nc(4), nc(5), etc.
11 : ! nc(9) = ncee, the dimension of the entire cee array, containing
12 : ! coefficients for all levels.
13 : !
14 : integer :: nc(9)
15 :
16 : !
17 : ! Coefficients are stored in 1-d array cee(ncee)
18 : ! cee transmits descretized dynamo PDE coefficients to the multi-grid
19 : ! mudpack solver. (cee was formerly in ceee.h)
20 : !
21 : real(r8), target, allocatable :: cee(:)
22 : !
23 : ! Unmodified coefficients for using modified mudpack:
24 : real(r8), allocatable :: cofum(:,:,:)
25 :
26 : contains
27 :
28 : !-----------------------------------------------------------------------
29 95 : subroutine ceee(cee,nx,ny,cf)
30 :
31 : !
32 : ! Called from mudpack solvers to transfer coefficients.
33 : !
34 : ! Args:
35 : integer,intent(in) :: nx,ny
36 : real(r8),intent(in) :: cee(nx,ny,*)
37 : real(r8),intent(out) :: cf(nx,ny,*)
38 : !
39 : ! Local:
40 : integer :: i,j,n
41 :
42 950 : do n = 1,9
43 17708 : do j = 1,ny
44 935541 : do i = 1,nx
45 934686 : cf(i,j,n) = cee(i,j,n)
46 : enddo
47 : enddo
48 : enddo
49 95 : end subroutine ceee
50 :
51 : end module edyn_solver_coefs
|