00001 subroutine sourceterm_MWspatial_current_WL(souvec)
00002 use phys_constant, only : long, pi
00003 use grid_parameter, only : nrf, ntf, npf
00004 use def_metric_on_SFC_CF, only : psif, alphf
00005 use def_metric_on_SFC_WL, only : hxxdf, hxydf, hxzdf, hyydf, hyzdf, hzzdf
00006 use def_matter, only : emd
00007 use def_emfield, only : jtuf, jxuf, jyuf, jzuf
00008 use def_matter_parameter, only : radi
00009 use make_array_3d
00010 implicit none
00011 real(long), pointer :: souvec(:,:,:,:)
00012 real(long) :: hijd(3,3)
00013 real(long) :: emdfc, jterm, jxufc, jyufc, jzufc
00014 real(long) :: psifc, alpfc
00015 integer :: ii, irf, itf, ipf
00016
00017
00018
00019
00020 do ii = 1, 3
00021 do ipf = 0, npf
00022 do itf = 0, ntf
00023 do irf = 0, nrf
00024 psifc = psif(irf,itf,ipf)
00025 hijd(1,1) = hxxdf(irf,itf,ipf)
00026 hijd(1,2) = hxydf(irf,itf,ipf)
00027 hijd(1,3) = hxzdf(irf,itf,ipf)
00028 hijd(2,2) = hyydf(irf,itf,ipf)
00029 hijd(2,3) = hyzdf(irf,itf,ipf)
00030 hijd(3,3) = hzzdf(irf,itf,ipf)
00031 hijd(2,1) = hijd(1,2)
00032 hijd(3,1) = hijd(1,3)
00033 hijd(3,2) = hijd(2,3)
00034 jxufc = jxuf(irf,itf,ipf)
00035 jyufc = jyuf(irf,itf,ipf)
00036 jzufc = jzuf(irf,itf,ipf)
00037 jterm = hijd(ii,1)*jxufc + hijd(ii,2)*jyufc + hijd(ii,3)*jzufc
00038
00039 souvec(irf,itf,ipf,ii) = - radi**2*4.0d0*pi*psifc**8*jterm
00040
00041 end do
00042 end do
00043 end do
00044 end do
00045
00046 end subroutine sourceterm_MWspatial_current_WL