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