subroutine Pumps_Inputs
    
    use CDrillingConsoleVariables
    use SimulationVariables
    use SimulationVariables
    use SimulationVariables
    Use MudSystemModule
    
	IMPLICIT NONE
    
    
    
!>>>>>>>>>>>>>>>>>>>>>>>  PUMP 1  <<<<<<<<<<<<<<<<<<<<<<<<<<<

    !data%State%Pump(1)%BlowPopOffMalf     = 0                  !??????? motaghayere voroudi
    
    if ( data%State%Pump(1)%BlowPopOffMalf==1 ) then            ! Pump1 Malfunction ----> Blow Pop-offs (Relief Valves)
        data%State%Pump(1)%StandPipe_Pressure = 0.d0
    else
        data%State%Pump(1)%StandPipe_Pressure = PumpPressure1   ![psi]
        if ( data%State%Pump(1)%StandPipe_Pressure<=14.d0 ) then
            data%State%Pump(1)%StandPipe_Pressure = 14.d0
        end if
    end if
    
    data%State%Pump(1)%AssignmentSwitchh  = data%EquipmentControl%DrillingConsole%AssignmentSwitch
    
    data%State%Pump(1)%Switch             = data%EquipmentControl%DrillingConsole%MP1CPSwitch
    
    data%State%Pump(1)%Throttle           = data%EquipmentControl%DrillingConsole%MP1Throttle         ![RPM]
    
    !data%State%Pump(1)%PowerFailMalf     = 0                   !??????? motaghayere voroudi   (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
    
    data%State%Pump(1)%Failure            = data%Warnings%Pump1Failure        !(Pump1 Warning ----> Failure)
        
    data%State%Pump(1)%N_new              = data%State%Pump(1)%Throttle
    
    
    
    

    
    
!>>>>>>>>>>>>>>>>>>>>>>>  PUMP 2  <<<<<<<<<<<<<<<<<<<<<<<<<<<

    !data%State%Pump(2)%BlowPopOffMalf     = 0                  !??????? motaghayere voroudi
    
    if ( data%State%Pump(2)%BlowPopOffMalf==1 ) then            ! Pump2 Malfunction ----> Blow Pop-offs (Relief Valves)
        data%State%Pump(2)%StandPipe_Pressure = 0.d0
    else
        data%State%Pump(2)%StandPipe_Pressure = PumpPressure2   ![psi]
        if ( data%State%Pump(2)%StandPipe_Pressure<=14.d0 ) then
            data%State%Pump(2)%StandPipe_Pressure = 14.d0
        end if
    end if
    
    data%State%Pump(2)%AssignmentSwitchh  = data%EquipmentControl%DrillingConsole%AssignmentSwitch
    
    data%State%Pump(2)%Switch             = data%EquipmentControl%DrillingConsole%MP2Switch
    
    data%State%Pump(2)%Throttle           = data%EquipmentControl%DrillingConsole%MP2Throttle         ![RPM]
    
    !data%State%Pump(2)%PowerFailMalf     = 0                   !??????? motaghayere voroudi   (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
    
    data%State%Pump(2)%Failure            = data%Warnings%Pump2Failure        !(Pump2 Warning ----> Failure)
    
    data%State%Pump(2)%N_new              = data%State%Pump(2)%Throttle
    
    
    
    
    
    
    
!!>>>>>>>>>>>>>>>>>>>>>>>  PUMP 3  <<<<<<<<<<<<<<<<<<<<<<<<<<<

    !data%State%Pump(3)%BlowPopOffMalf     = 0                  !??????? motaghayere voroudi
    
    if ( data%State%Pump(3)%BlowPopOffMalf==1 ) then            ! Pump3 Malfunction ----> Blow Pop-offs (Relief Valves)
        data%State%Pump(3)%StandPipe_Pressure = 0.d0
    else
        data%State%Pump(3)%StandPipe_Pressure = PumpPressure3   ![psi]
        if ( data%State%Pump(3)%StandPipe_Pressure<=14.d0 ) then
            data%State%Pump(3)%StandPipe_Pressure = 14.d0
        end if
    end if
        
    data%State%Pump(3)%Switch             = data%EquipmentControl%DrillingConsole%MP1CPSwitch
    
    data%State%Pump(3)%Throttle           = data%EquipmentControl%DrillingConsole%MP1Throttle         ![RPM]
    
    !data%State%Pump(3)%PowerFailMalf     = 0                   !??????? motaghayere voroudi   (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad
    
    data%State%Pump(3)%Failure            = data%Warnings%Pump3Failure        !(Pump1 Warning ----> Failure)
        
    data%State%Pump(3)%N_new              = data%State%Pump(3)%Throttle
  
    
    
    
    
    
!>>>>>>>>>>>>>>>>>>>>>>>  Total Pumps  <<<<<<<<<<<<<<<<<<<<<<<<<<<
    
    
    
    
    
    
    
    
end subroutine Pumps_Inputs