The present invention provides a drilling system for drilling oilfield boreholes or wellbores utilizing a drill string having a drilling assembly conveyed downhole by a tubing (usually a drill pipe or coiled tubing). The drilling assembly includes a bottom hole assembly (BHA) and a drill bit. The bottom hole assembly preferably contains commonly used measurement-while-drilling sensors. The drill string also contains a variety of sensors for determining downhole various properties of the drilling fluid. Sensors are provided to determine density, viscosity, flow rate, clarity, compressibility, pressure and temperature of the drilling fluid at one or more downhole locations. Chemical detection sensors for detecting the presence of gas (methane) and H
S are disposed in the drilling assembly. Sensors for determining fluid density, viscosity, pH, solid content, fluid clarity, fluid compressibility, and a spectroscopy sensor are also disposed in the BHA. Data from such sensors may is processed downhole and/or at the surface. Corrective actions are taken based upon the downhole measurements at the surface which may require altering the drilling fluid composition, altering the drilling fluid pump rate or shutting down the operation to clean wellbore. The drilling system contains one or more models, which may be stored in memory downhole or at the surface. These models are utilized by the downhole processor and the surface computer to determine desired fluid parameters for continued drilling. The drilling system is dynamic, in that the downhole fluid sensor data is utilized to update models and algorithms during drilling of the wellbore and the updated models are then utilized for continued drilling operations.