Broadcast one of the input parameters according to target_parameter_switch
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout), | dimension(:) | :: | scan_hflux | ||
real, | intent(inout), | dimension(:) | :: | scan_momflux | ||
real, | intent(inout), | dimension(:) | :: | scan_phi2 |
subroutine bcast_scan_parameter(scan_hflux, scan_momflux, scan_phi2)
use mp, only: broadcast
use parameter_scan, only: target_parameter_switch,target_parameter_hflux_tot
use parameter_scan, only: target_parameter_momflux_tot,target_parameter_phi2_tot
implicit none
real, dimension(:), intent(in out) :: scan_hflux, scan_momflux, scan_phi2
select case(target_parameter_switch)
case(target_parameter_hflux_tot)
call broadcast(scan_hflux) !This is only set if write_fluxes
case(target_parameter_momflux_tot)
call broadcast(scan_momflux) !This is only set if write_fluxes
case(target_parameter_phi2_tot)
call broadcast(scan_phi2)
case default
!Nothing as should generate warning/error within parameter_scan
endselect
end subroutine bcast_scan_parameter