00001 subroutine calc_gradvep_from_corot_id(potf,potxf,potyf,potzf)
00002 use phys_constant, only : long
00003 use grid_parameter
00004 use def_metric_on_SFC_CF
00005 use def_matter
00006 use coordinate_grav_r, only : rg
00007 use def_metric, only : alph, psi, bvxd, bvyd, bvzd
00008 use def_matter_parameter, only : ome, ber
00009 use def_vector_phi, only : vec_phif
00010
00011 use interface_flgrad_4th_gridpoint
00012 use interface_flgrad_2nd_gridpoint
00013 implicit none
00014 real(long), pointer :: potf(:,:,:), potxf(:,:,:), potyf(:,:,:), potzf(:,:,:)
00015 real(long) :: qq, hh, pre, rho0, ene, ovdfc(3), vphif(3), ut, psi4
00016 integer :: irf, itf, ipf
00017
00018 call interpo_gr2fl_metric_CF
00019
00020 do ipf = 0, npf
00021 do itf = 0, ntf
00022 do irf = 0, nrf
00023 qq = emd(irf,itf,ipf)
00024 call peos_q2hprho(qq, hh, pre, rho0, ene)
00025
00026 vphif(1) = vec_phif(irf,itf,ipf,1)
00027 vphif(2) = vec_phif(irf,itf,ipf,2)
00028 vphif(3) = vec_phif(irf,itf,ipf,3)
00029 ovdfc(1) = bvxdf(irf,itf,ipf) + ome*vphif(1)
00030 ovdfc(2) = bvydf(irf,itf,ipf) + ome*vphif(2)
00031 ovdfc(3) = bvzdf(irf,itf,ipf) + ome*vphif(3)
00032 psi4 = psif(irf,itf,ipf)**4
00033 ut = hh/ber
00034
00035 potxf(irf,itf,ipf) = ovdfc(1)*psi4*hh*ut
00036 potyf(irf,itf,ipf) = ovdfc(2)*psi4*hh*ut
00037 potzf(irf,itf,ipf) = ovdfc(3)*psi4*hh*ut
00038 end do
00039 end do
00040 end do
00041
00042 write(6,*) " ", ome, ber
00043 write(6,*) "gradvep x component:", potxf(nrf,ntf/2,0), potxf(0,0,0), potxf(nrf,ntf/2,npf/2)
00044 write(6,*) "gradvep y component:", potyf(nrf,ntf/2,0), potyf(0,0,0), potyf(nrf,ntf/2,npf/2)
00045
00046 end subroutine calc_gradvep_from_corot_id