00001 subroutine source_scalar_wave_moment_asympto(sousfv,irg)
00002   use phys_constant, only : long
00003   use grid_parameter, only : ntg, npg
00004   use def_metric, only : psi
00005   use coordinate_grav_r, only : rg
00006   use def_vector_x, only   : vec_xg
00007   use make_array_2d
00008   use interface_grgrad_gridpoint_4th_type0
00009   use interface_interpo_linear_type0_2Dsurf
00010   implicit none
00011   real(long), pointer :: sousfv(:,:,:)
00012   integer    :: irg
00013   real(long), pointer :: fnc(:,:)
00014   real(long) :: na, psigc, val, dfdx, dfdy, dfdz
00015   integer    :: itg, ipg, ia, ib, ii
00016 
00017   call alloc_array2d(fnc, 0,ntg, 0,npg)
00018 
00019 do ii = 1, 3
00020 
00021   do ipg = 0, npg
00022     do itg = 0, ntg
00023 
00024 
00025 
00026       call grgrad_gridpoint_4th_type0(psi,dfdx,dfdy,dfdz,irg,itg,ipg,'ns')
00027       if (ii.eq.1) fnc(itg,ipg) = dfdx
00028       if (ii.eq.2) fnc(itg,ipg) = dfdy
00029       if (ii.eq.3) fnc(itg,ipg) = dfdz
00030     end do
00031   end do
00032 
00033   do ipg = 1, npg
00034     do itg = 1, ntg
00035       call interpo_linear_type0_2Dsurf(val,fnc,itg,ipg)
00036       sousfv(itg,ipg,ii) = val
00037     end do
00038   end do
00039 
00040 end do
00041 
00042   deallocate(fnc)
00043 
00044 end subroutine source_scalar_wave_moment_asympto