00001 subroutine search_rhofmax_xaxis_grid(iremax) 00002 use phys_constant, only : long 00003 use grid_parameter, only : nrf, ntfxy 00004 use def_matter, only : rhof 00005 implicit none 00006 real(long) :: rhofmax 00007 integer :: ir, iremax 00008 ! 00009 ! search maximum emd on positive x-axis 00010 rhofmax = rhof(0,ntfxy,0) 00011 iremax = 0 00012 do ir = 0, nrf 00013 if (rhof(ir,ntfxy,0).gt.rhofmax) then 00014 rhofmax = rhof(ir,ntfxy,0) 00015 iremax = ir 00016 end if 00017 end do 00018 ! 00019 end subroutine search_rhofmax_xaxis_grid