# Scuba gas management

Scuba gas management is the aspect of scuba diving which includes the gas planning, blending, filling, analysing, marking, storage, and transportation of gas cylinders for a dive, the monitoring and switching of breathing gases during a dive, efficient and correct use of the gas, and the provision of emergency gas to another member of the dive team. The primary aim is to ensure that everyone has enough to breathe of a gas suitable for the current depth at all times, and is aware of the gas mixture in use and its effect on decompression obligations, nitrogen narcosis, and oxygen toxicity risk. Some of these functions may be delegated to others, such as the filling of cylinders, or transportation to the dive site, but others are the direct responsibility of the diver using the gas.
Management of breathing gas during the dive is a critical skill to avoid potentially fatal consequences. For the basic case of no-decompression open-water diving, which allows a free emergency ascent, this requires ensuring sufficient gas remains for a safe ascent (plus a contingency reserve) and for the possibility of an assisted ascent, where the diver shares gas with another diver. Gas management becomes more complex when solo diving, decompression diving, penetration diving, or diving with more than one gas mixture. Other necessary knowledge includes awareness of personal and other team members' gas consumption rates under varying conditions, such as at the surface, at varying depths, for different dive task loadings and personal physical effort and mental states.$^{:Sect.3}$
Divers need to be aware of the remaining gas available, so a submersible pressure gauge is fitted to each diving cylinder to indicate the remaining gas pressure, and the cylinder is clearly labelled to indicate the gas mixture. The amount of available gas remaining can be calculated from the cylinder pressure, the cylinder internal volume, and the planned reserve allowance. The time that a diver can dive on the available gas depends on the depth, work load, the fitness of the diver and that the gas is safe to breathe at that depth. Breathing rates can vary considerably, and estimates are largely derived from experience. Conservative estimates are generally used for planning purposes. The divers must turn the dive and start the exit and ascent while there is enough gas to surface safely. This may require the calculation of minimum acceptable pressures for various stages of a dive, known as critical pressures.
To limit the risk of equipment malfunctions that could cause a loss of breathing gas, divers maintain their breathing apparatus in good order, assemble it with care and test it before use. This does not entirely eliminate the possibility of a malfunction that could cause a loss of gas, so the requisite skills for dealing with the reasonably foreseeable malfunctions should be learned and maintained, and redundant supplies carried to allow for circumstances of unrecoverable malfunction.

## Gas planning

Scuba gas planning is the aspect of dive planning and of gas management which deals with the calculation or estimation of the amounts and mixtures of gases to be used for a planned dive profile. It usually assumes that the dive profile, including decompression, is known, but the process may be iterative, involving changes to the dive profile as a consequence of the gas requirement calculation, or changes to the gas mixtures chosen. Use of calculated reserves based on planned dive profile and estimated gas consumption rates rather than an arbitrary pressure is sometimes referred to as rock bottom gas management. The purpose of gas planning is to ensure that for all reasonably foreseeable contingencies, the divers of a team have sufficient breathing gas to safely return to a place where more breathing gas is available. In most cases this will be the surface.
Gas planning includes the following tasks:$^{:Sect.3}$
* Choice of breathing gases to suit the dive,
* Choice of scuba configuration for primary breathing gas,
* Choice of scuba configuration for emergency breathing gas,
* Estimation of gas quantities required for the planned dive, including bottom gas, travel gas, and decompression gases, as appropriate to the planned profile.
* Estimation of gas quantities for reasonably foreseeable contingencies. Under stress it is likely that a diver will increase breathing rate and decrease swimming speed. Both of these lead to a higher gas consumption during an emergency exit or ascent.
* Choice of cylinders to carry the required gases. Each cylinder's volume must be sufficient to contain the required quantity of gas at or below its working pressure.
* Calculation of the required pressures for each of the gases in each of the cylinders to provide the required quantities.
* Specifying the critical pressures of relevant gas mixtures for appropriate sectors (waypoints) of the planned dive profile, taking into account the estimated breathing rates of the divers who may have to use the gas in a contingency (gas matching).
Gas planning is a personal responsibility of the recreational and technical diver, but in professional diving it is one of the responsibilities of the diving supervisor, and the required procedures should be detailed in the operations manual.

### Rule of thumb gas planning

The formal and relatively complete procedure for scuba gas planning assumes that a dive plan is available that is sufficiently detailed that most of the variables are known, but many recreational dives are conducted on a more ad hoc basis.
The majority of recreational divers do not do penetration dives or dives exceeding the no decompression limit, and can safely ascend directly to the surface at any point of a dive. Such ascents do not use a large volume of gas, and these divers are commonly taught to start the ascent at a given remaining pressure in the cylinder, regardless of the depth, size of cylinder, or breathing rate expected, just because it is easy to remember and makes the dive leader's work simpler on group dives. It may occasionally be insufficiently conservative, but is more often unnecessarily conservative, particularly on shallow dives with a large cylinder. Divers may be told to notify the dive leader at 80 or 100 bar and to return to the boat with not less than 50 bar or 700 psi or something similar remaining, but one of the reasons for having the 50 bar in reserve is to make the return to the boat safer, by allowing the diver to swim on the surface in choppy water while breathing off the regulator. This residual gas may also be well used for an extended or additional safety stop when the dive approached the no decompression limit, but it is good practice not to entirely use up the gas, as an empty cylinder is easier to contaminate during handling, and the filling operator may be required to internally inspect any cylinder which does not register a residual pressure when presented for filling, or reject it for filling until a competent person has made an internal inspection.
For deeper dives, dives with some planned decompression, or solo dives, a bailout cylinder can be carried, with sufficient gas suitable to surface safely from any point on the planned dive profile. If the bailout cylinder is reserved for use only in emergencies, it can last for many dives, as very little gas need to be used when performing the pre-dive checks on the cylinder and regulator.
The rule of thirds is another such rule of thumb. This rule generally only applies to diving in overhead environments, such as caves and wrecks, where a direct ascent to the surface is impossible and the divers must return the way they came, and no decompression stops are intended.
For divers following this rule, one third of the gas supply is used for the outward journey, one third for the return journey and one third is held in reserve in case of an emergency. The dive is turned when the first diver reaches one third of the starting pressure. However, when diving with a buddy with a higher breathing rate or a different volume of gas, it may be necessary to set one third of the buddy's gas supply as the remaining 'third'. This means that the turn point to exit is earlier, or that the diver with the lower breathing rate carries a larger volume of gas than would be required if both had the same breathing rate. The rule of thirds does not allow for higher consumption rates under stress.
Reserves are needed at the end of dives in case the diver has gone deeper or longer than planned and must remain underwater to do decompression stops before being able to ascend safely to the surface. A diver without gas cannot do the stops and risks decompression sickness. In an overhead environment, where it is not possible to ascend directly to the surface, the reserve third allows the diver to donate gas to an out-of-gas buddy, providing enough gas to let both divers exit the enclosure and ascend to the surface.

### Rock bottom gas planning

The term "rock bottom gas planning" is used for the method of gas planning based on a planned dive profile where a reasonably accurate estimate of the depths, times, and level of activity is available, do the calculations for gas mixtures and the appropriate quantities of each mixture are known well enough to make fairly rigorous calculations useful.

## Gas blending

Gas blending for scuba diving (or gas mixing) is the filling of diving cylinders with non-air breathing gas mixtures such as nitrox, trimix and heliox. Use of these gases is generally intended to improve overall safety of the planned dive, by reducing the risk of decompression sickness and/or nitrogen narcosis, and may improve ease of breathing.
Filling cylinders with a mixture of gases has dangers for both the filler and the diver. During filling there is a risk of fire due to use of oxygen and a risk of explosion due to the use of high-pressure gases. The composition of the mix must be safe for the depth and duration of the planned dive. If the concentration of oxygen is too lean the diver may lose consciousness due to hypoxia and if it is too rich the diver may suffer oxygen toxicity. The concentration of inert gases, such as nitrogen and helium, are planned and checked to avoid nitrogen narcosis and decompression sickness.
Methods used include batch mixing by partial pressure or by mass fraction, and continuous blending processes. Completed blends are analysed for composition for the safety of the user. Gas blenders may be required by legislation to prove competence if filling for other persons.

## Filling of cylinders

Diving cylinders are filled by attaching a high-pressure gas supply to the cylinder valve, opening the valve and allowing gas to flow into the cylinder until the desired pressure is reached, then closing the valves, venting the connection and disconnecting it. This process involves a risk of the cylinder or the filling equipment failing under pressure, both of which are hazardous to the operator, so procedures to control these risks are generally followed. Rate of filling must be limited to avoid excessive heating, the temperature of cylinder and contents must remain below the maximum working temperature specified by the applicable standard. A flexible high pressure hose used for this purpose is known as a filling whip.

### Filling from a compressor

Breathing air supply can come directly from a high-pressure breathing air compressor, from a high-pressure storage system, or from a combined storage system with compressor. Direct charging is energy intensive, and the charge rate will be limited by the available power source and capacity of the compressor. A large-volume bank of high-pressure storage cylinders allows faster charging or simultaneous charging of multiple cylinders, and allows for provision of more economical high-pressure air by recharging the storage banks from a low-power compressor, or using lower cost off-peak electrical power.
The quality of compressed breathing air for diving is usually specified by national or organisational standards, and the steps generally taken to assure the air quality include:
* use of a compressor rated for breathing air,
* use of compressor lubricants rated for breathing air,
* filtration of intake air to remove particulate contamination,
* positioning of the compressor air intake in clean air clear of known sources of contaminants such as internal combustion exhaust fumes, sewer vents etc.
* removal of condensate from the compressed air by water separators. This may be done between stages on the compressor as well as after compression,
* filtration after compression to remove remaining water, oil, and other contaminants using specialized filter media such as desiccants, molecular sieve or activated carbon,
* traces of carbon monoxide may be catalyzed to carbon dioxide by Hopcalite,
* periodical air quality tests,
* scheduled filter changes and maintenance of the compressor.

### Filling from high-pressure storage

Cylinders may also be filled directly from high-pressure storage systems by decanting, with or without pressure boosting to reach the desired charging pressure. Cascade filling may be used for efficiency when multiple storage cylinders are available. High-pressure storage is commonly used when blending nitrox, heliox and trimix diving gases, and for oxygen for rebreathers and decompression gas.
Nitrox and trimix blending may include decanting the oxygen and/or helium, and topping up to working pressure using a compressor, after which the gas mixture must be analysed and the cylinder labeled with the gas composition.

## Breathing gas analysis

Before a gas mix leaves the blending station and before the diver breathes from it, the fraction of oxygen in the mix should be checked. Usually electro-galvanic oxygen sensors are used to measure the oxygen fraction. Helium analyzers also exist, although they are relatively expensive, which allow the trimix diver to measure the fraction of helium in the mix.
It is important that the gas mixture in a cylinder is thoroughly mixed before analysing or the results will be inaccurate. When partial pressure or mass blending is done at low flow rates the gases entering the cylinder are not moving fast enough to ensure good mixing, and particularly when blends contain helium, they may tend to remain in layers due to density differences. This is termed stratification, and if left long enough, diffusion will ensure complete mixing. However, if the gas is to be analysed soon after blending, mechanical agitation is recommended. This may be by lying a single cylinder on a flat surface and rolling it for a short period, but twins are more usually inverted a few times. Stratification is more pronounced with blends containing helium, but can also lead to inaccurate analysis of nitrox blends.
Reliable specifications for the amount of agitation required for complete mixing are not available, but if the analysis remains the same before and after agitation the gas is probably fully mixed. Once mixed, gas will not stratify with time. When analysed, the gas composition is generally recorded on a label on the cylinder, along with the maximum operating depth for the gas, in a position that can be seen by the diver when it is to be used for gas switching during a dive.

## Marking and identification of cylinders

A label identifying the cylinder contents by gas type and constituent fraction may be required by law, and is useful to the user as a record of what mixture was last analysed in the cylinder. Details of the format of the label and colour coding of the cylinder vary with jurisdiction. Information recommended by technical diving organisations includes the diver's name, which helps prevent accidentally using someone else's gas, and maximum operating depth, which is a simple but critical safety check to ensure that an oxygen rich gas is not used too deep. This information should be visible to the diver when selecting the regulator, and may be confirmed by sucking on the mouthpiece before opening the cylinder valve, then opening the valve and noting the immediate availability of gas.

## Scuba configuration

There are two main configurations used to carry scuba sets: Back mount and side mount. Back mount is the conventional configuration where the cylinder or cylinders used for most of the dive are mounted on the back of the harness. The breathing gas carried in back mounted cylinders is conventionally referred to as back gas, and this is usually the largest amount of a specific mixture carried by the diver, and intended for use on the dive sector where the most gas is expected to be needed. This is usually the bottom sector, and may include all or most of the descent, and some or all of the ascent. It is the only gas carried by most recreational scuba divers. One of the advantages of side or sling mounting scuba cylinders, is that the valve is both relatively accessible for opening and closing, and the shoulder of the cylinder is visible in most water conditions, so the diver can read the label identifying the contents and trace the second stage hose from the first stage to the second stage by feel, allowing positive identification of the gas source in use at any time, and thereby ensuring that the mixture is appropriate for the depth. This is limited with back mounted cylinders, as the tops of the cylinders are behind the diver's head, but as the diver should be well aware of the back gas mixture, and can trace the hose back to the cylinder valve by feel, this is not generally a problem if there is only one mixture carried on the back.

## Gas quantities for open circuit

The quantity of open circuit breathing gas required will depend on the gases chosen, which affects decompression times, and the rate at which gas is consumed during each part of the dive.

### Choice of gases

The composition of a breathing gas mixture will depend on its intended use. The mix must be chosen to provide a safe partial pressure of oxygen (PO$_2$) at the working depth. Most dives will use the same mixture for the whole dive, so the composition will be selected to be breathable at all planned depths. There may be decompression considerations. The amount of inert gas that will dissolve in the tissues depends on the partial pressure of the gas its solubility and the time it is breathed at pressure, so the gas may be enriched with oxygen to reduce decompression requirements. The gas must also have a breathable density at the maximum depth intended for its use. A recommended value for maximum density is 6 grams per litre, as higher densities reduce the maximum ventilation rate sufficiently to induce hypercapnia.
Gases may be chosen for bottom gas, bailout gas, decompression gas and travel gas. In the simplest case these may all be the same gas.

### Gas quantities for the planned profile

Gas consumption depends on the ambient pressure, the breathing rate, and the duration of the dive sector under those conditions. Ambient pressure is a direct function of the depth. It is atmospheric pressure at the surface, plus hydrostatic pressure, at 1 bar per 10 m depth.
Gases quantities will be calculated for bottom gas, bailout gas, decompression gas and travel gas as may be applicable, and each different gas must be carried in one or more dedicated cylinders.

### Gas quantities for contingencies

The basic problem with estimating a gas allowance for contingencies is to decide what contingencies to allow for. This is addressed in the risk assessment for the planned dive. A commonly considered contingency is to share gas with another diver from the point in the dive where the maximum time is needed to reach the surface or other place where more gas is available. It is likely that both divers will have a higher than normal RMV during an assisted ascent as it is a stressful situation, and it is prudent to take this into account. The values should be chosen according to recommendations of the code of practice in use or the training agency, but if a higher value is chosen to take into account personal experience, it is unlikely that anyone would object. Recreational divers may have the discretion to use RMV values of their own choice, based on personal experience and informed acceptance of risk. The procedure is identical to that for any other multi-sector gas consumption calculation, except that two divers are involved, doubling the effective RMV.
To check whether the bail-out cylinder has adequate gas (for one diver) in case of an emergency at the planned depth, critical pressure should be calculated based on the planned profile and should allow change-over, ascent and all planned decompression.

### Drop cylinders

When considering gas redundancy for stage drop cylinders, it may be assumed that one drop cylinder may not be available, so the others must suffice for the whole team to get to the next place where gas is available. By the rule of thirds system the gas in stage cylinders is managed in the same way as the primary supply, whether the primary is carried as back gas or sidemounted. A third of the gas in the stage cylinder is used before the drop, leaving two thirds in the cylinder, the minimum amount for two divers to exit on one cylinder. The cylinder may be carried a few minutes beyond the point at which the first third was used, but is not breathed for this extra distance, to conserve the gas for the return, as this allows it to be reached a bit earlier if one diver loses all gas at the end of the next stage when gas supply is at critical pressure. If all goes to plan, the divers will surface with stages and primary cylinders each containing about one third of the original content.
A different option is the "half + 15 bar" (half + 200 psi) method, in which the contingency gas for the stage is carried in the primary cylinders. Some divers consider this method to be the most conservative when multi-staging. If all goes to plan when using this method, the divers surface with stages nearly empty, but with all the contingency gas still in their primary cylinders. With a single stage, this means the primaries will still be about half-full.

### Gas matching

Gas matching is the calculation of reserve and turn pressures for divers using different cylinder volumes or with different gas consumption rates on the same dive, allowing each diver to ensure that sufficient gas is retained to allow for foreseeable contingencies where divers may need to share gas, based on each diver's cylinder volumes, and both divers' individual gas consumption rates.

## Gas quantities for rebreathers

At shallow depths, a diver using open-circuit breathing apparatus typically only uses about a quarter of the oxygen in the air that is breathed in, which is about 4 to 5% of the inspired volume. The remaining oxygen is exhaled along with nitrogen and carbon dioxide – about 95% of the volume. As the diver goes deeper, and the mass of gas in a breath increases proportionally to the ambient pressure, much the same mass of oxygen is used for the same work rate, which represents an increasingly smaller fraction of the inhaled gas. Since only a small part of the oxygen, and virtually none of the inert gas is consumed, every exhaled breath from an open-circuit scuba set represents at least 95% wasted potentially useful gas volume, which has to be replaced from the breathing gas supply.
A rebreather retains most of the exhaled gas for re-use and does not discharge it immediately to the surroundings. The inert gas and unused oxygen is kept for reuse, and the rebreather adds gas to replace the oxygen that was consumed, and removes the carbon dioxide. Thus, the gas recirculated in the rebreather remains breathable and supports life and the diver needs only to carry a fraction of the gas that would be needed for an open-circuit system. The saving is proportional to the ambient pressure, so is greater for deeper dives, and is particularly significant when expensive mixtures containing helium are used as the inert gas diluent. The rebreather also adds gas to compensate for compression when dive depth increases, and vents gas to prevent overexpansion when depth decreases.
In most cases, two gases will be used in a closed circuit mixed gas rebreather. Oxygen, and a diluent suitable for bailout and diluent flush at the maximum planned depth of the dive. Off-board bailout on open circuit generally requires larger volumes if there is planned decompression or an overhead, and the method of calculation of quantities and choice of gases is very similar to open circuit.

### Rebreather bailout options

A rebreather cannot be used to donate gas to another diver, so bailout equipment is generally carried by each diver for their own use, though team redundancy considerations may allow a lesser amount of bailout equipment than would be necessary if all the divers had to bail out at the same time, which, while possible, is highly unlikely. However, statistically reliable failure rates are generally not available, so the risk cannot be accurately calculated. Open circuit bailout is as bulky as for open circuit diving, and for long penetrations, a bailout rebreather may be more practical. This must be kept ready for immediate use throughout the dive.

## Storage and transportation of cylinders
### Handling

Cylinders should not be left standing unattended unless secured so that they can not fall in reasonably foreseeable circumstances as an impact could damage the cylinder valve mechanism, and conceivably fracture the valve at the neck threads. This is more likely with taper thread valves, and when it happens most of the energy of the compressed gas is released within a second, and can accelerate the cylinder to speeds which can cause severe injury or damage to the surroundings.

### Long-term storage

Breathing quality gases do not normally deteriorate during storage in steel or aluminium cylinders. Provided there is insufficient water content to promote internal corrosion, the stored gas will remain unchanged for years if stored at temperatures within the allowed working range for the cylinder, usually below 65 °C. If there is any doubt, a check of oxygen fraction will indicate whether the gas has changed (the other components are inert). Any unusual smells would be an indication that the cylinder or gas was contaminated at the time of filling. However some authorities recommend releasing most of the contents and storing cylinders over long periodswith a small positive pressure.
Aluminium cylinders have a low tolerance for heat, and a 3,000 pounds per square inch (210 bar) cylinder containing less than 1,500 pounds per square inch (100 bar) may lose sufficient strength in a fire to explode before the internal pressure rises enough to rupture the bursting disc, so storing aluminium cylinders with a bursting disc has a lower explosion risk in case of fire if stored either full, as the disc will burst before the aluminium is severely weakened, or nearly empty, so the pressure cannot rise too high when heated.

### Transportation

Diving cylinders are classified by the UN as dangerous goods for transportation purposes (US: Hazardous materials). Selecting the proper shipping name (well known by the abbreviation PSN) is a way to help ensure that the dangerous goods offered for transport accurately represent the hazards. Legislation and restrictions regarding the transportation of compressed gas cylinders are complicated and can vary significantly by mode of transport and jurisdiction.

## Pre-dive checks

Pre-dive checks are recognised as a useful tool to reduce risk of equipment failure during dives, and are usually stipulated by professional diving operations manuals. Recreational divers are not obliged to do them, but studies have indicated that the correct performance of pre-dive checks result in a significant reduction in the rate of recreational diving incidents triggered by equipment malfunction, and that the use of a written checklist results in a higher incidence of correctly performed checks. Several of the open circuit pre-dive checks involve the breathing gas supply. These include:
* Adequate supply of breathing gases. (cylinder volume and pressure checks)
* Suitable type and quality of breathing gas. (correctly and unambiguously identified if applicable)
* Cylinders mounted securely and, where applicable, accessibly.
* Valves opened or closed as planned, accessible if applicable.
* Demand valves functioning correctly. (work of breathing low, no leaks or free-flows)
* Hose routing correct, no kinks or hoses trapped under other equipment, pressure gauges accessible.
* Inflation gas hoses connected, and inflation valves functioning correctly.
* Demand valves secured correctly where applicable.
* Dive computer gas settings for active and alternative gases correct.
For rebreathers the pre-dive checklist is longer, and in addition to most of the open-circuit checks, may include:
* Positive and negative pressure leak tests of the breathing loop
* Oxygen partial pressure within set-points
* Oxygen monitoring functioning and valve controls operating correctly.
* Prebreathing has been done to ensure scrubber function. (There is some question as to whether this test is reliable)

## Monitoring gas during a dive

The diver monitors the pressure remaining in the cylinders to ensure that the remaining gas supply is sufficient to complete the dive safely. This is usually done by observing the display on the submersible pressure gauge of each cylinder, but can also be done using pressure transducers on the cylinders which display on the dive computer. The observed values are compared with the critical values from the dive plan, and are one of the criteria used to decide the turn-around point of the dive. After a gas switch it is customary to check that the pressure in the newly accessed cylinder is falling as expected. It is also common practice to close the cylinder valves of side-mounted or sling-mounted cylinders that are not in use to reduce the risk of losing gas by an unobserved leak or sudden free-flow. This does put the regulator at a greater risk of flooding by back-flow of water into the low-pressure hose, but that is an inconvenience requiring servicing after the dive, whereas a major free-flow during the dive could put the diver at immediate severe risk of running out of gas, and could be sufficient reason to terminate the dive.
Another aspect of gas monitoring during a dive is remaining aware of the gas status of the other members of the diving group. For most divers this is the buddy pair. For technical divers this may be a three diver team, and for the dive leader of a recreational group, it may be the entire group. There are hand signals specifically for this purpose.
Partial pressure of oxygen in closed circuit rebreathers is monitored at frequent intervals, particularly at the start of the dive, during descent, where transient increases due to compression may occur, and during ascent, where the risk of hypoxia is highest. On electronically controlled CCRs this is done by the control system, and the diver is normally warned of divergence from the set point by an alarm. The diver may need to manually adjust the mixture or decrease the rate of depth change to help the injection system to correct the mix. On manually controlled CCRs the diver also has to adjust the oxygen partial pressure by adding oxygen or flushing with diluent. On open circuit, the partial pressure is not measured directly, and is inferred from the depth and the oxygen fraction of the breathing mixture. The dive computer will keep track of the partial pressure based on the input value from the diver identifying the gas mixture. If the diver selects the wrong gas, the decompression obligation will be miscalculated. When breathing gas is switched it is usually necessary for the diver to manually set the new gas as active.
Carbon dioxide buildup is a severe hazard, and as of 2022 most rebreathers do not have electronic carbon dioxide monitoring. The diver must look out for indications of this problem at all times. The technology available is carbon dioxide partial pressure measurement after the scrubber, which when working correctly, will inform the diver of high partial pressure shortly before it is necessary to bail out, and temperature stick sensors which indicate the position along the sensor in the absorbent canister at which the exothermic absorption reaction is occurring, giving an indication of proportionately how much scrubber life is left. The displays for these sensors are usually incorporated in the control system display, with warning signals.

## Gas switching

Deep technical diving usually involves the use of several gas mixtures during the course of the dive. There will be a mixture known as the bottom gas, which is optimised for limiting inert gas narcosis and oxygen toxicity during the deep sector of the dive. This is generally the mixture which is needed in the largest amount for open circuit diving, as the consumption rate will be greatest at maximum depth. The oxygen fraction of the bottom gas suitable for a dive deeper than about 65 metres (213 ft) will not have sufficient oxygen to reliably support consciousness at the surface, so a travel gas must be carried to start the dive and get down to the depth at which the bottom gas is appropriate. There is generally a large overlap of depths where either gas can be used, and the choice of the point at which the switch will be made depends on considerations of cumulative toxicity, narcosis and gas consumption logistics specific to the planned dive profile. By some definitions the use of gas switching differentiates between a recreational and a technical dive.
During ascent, there will be a depth at which the diver can switch to a gas with a higher oxygen fraction, which will also accelerate decompression. If the travel gas is suitable, it can be used for decompression too. Additional oxygen rich decompression gas mixtures may be selected to optimise decompression times at shallower depths. These will usually be selected as soon as the partial pressure of oxygen is acceptable, to minimise required decompression, and there may be more than one such mixture depending on the planned decompression schedule. The shallowest stops may be done breathing pure oxygen. During prolonged decompression at high oxygen partial pressures, it may be advisable to take what is known as air breaks, where the diver switches back to a low oxygen fraction gas (usually bottom gas or travel gas) for a short period (usually about 5 minutes) to reduce the risk of developing oxygen toxicity symptoms, before continuing with the high oxygen fraction accelerated decompression. These multiple gas switches require the diver to select and use the correct demand valve and cylinder for each switch. An error of selection could compromise the decompression, or result in a loss of consciousness due to oxygen toxicity. Gas switching can also complicate the use of decompression computers.
The diver is faced with a problem of optimising for gas volume carried, number of different gases carried, depths at which switches can be made, bottom time, decompression time, gases available for emergency use, and at which depths they become available, both for themself and other members of the team, while using available cylinders and remaining able to manage the cylinders during the dive. This problem can be simplified if staging the cylinders is possible. This is the practice of leaving a cylinder at a point on the return route where it can be picked up and used, possibly depositing the previously used cylinder, which will be retrieved later, or having a support diver supply additional gas. These strategies rely on the diver being reliably able to get to the staged gas supply. The staged cylinders are usually clipped off to the distance line or shotline to make them easier to find.
Scuba gas switching is almost exclusively done by removing the second stage mouthpiece of the first gas from the mouth, inserting the mouthpiece of the selected gas, opening the cylinder valve to allow flow, and stowing the original regulator second stage. This procedure has been determined by trial and error to be safer than using a valved manifold to select the gas, as the consequences of mistakenly using an inappropriate gas for the depth can be fatal, or may compromise decompression and increase the risk of decompression sickness. Requiring the diver to manually open the cylinder valve to provide flow facilitates checking that the demand valve is connected to the correct cylinder before the diver can breathe from it, though it does slightly increase task loading for a short period. Using a different regulator for each gas also makes failure of a single regulator unlikely to have fatal consequences.
Valved manifolds (bailout blocks) are used for surface supply bailout to scuba, but in that application the bailout gas mixture is usually the same as the main gas supply, and is chosen to be suitable for the maximum planned depth of the dive.

## Emergency provision of gas

Emergency breathing gas sharing may involve sharing a single demand valve, or one diver providing a secondary gas source to another. The gas may be from the same scuba set or from a separate cylinder. When the gas source is from a separate cylinder, there may be an option to hand over the whole cylinder and regulator to the receiving diver, which will usually require buoyancy adjustment by both divers. The preferred technique of air sharing is donation of a demand valve that is not needed by the donor.
The standard approach is "octopus donation" in which the buddy offers the secondary "octopus" demand valve to the diver in trouble, although this is not universal. A variation on this approach is for the buddy to offer their primary demand valve to the diver in trouble, while switching to the octopus. The reasoning is that this is more likely to calm a diver in trouble, and the gas will be appropriate for the depth.
Alternatively, two divers can share a single demand valve. This is known as buddy breathing. Buddy breathing is no longer taught as widely, although some groups still teach it. The standard buddy breathing technique is for the divers to alternately breathe from the demand valve, each taking two breaths, although since the receiver is likely to initially be out of breath, he/she may need a few more breaths to stabilise.
Once air sharing has been established, the dive terminates, unless the underlying problem can be resolved. Assisted ascents using a secondary demand valve are simpler than buddy breathing ascents, the risk to both divers is lower, gas consumption may be less, and this skill is quicker to learn.
Another type of emergency gas provision is using gas from a cylinder when the regulator has failed, This can occur in any one of several ways. If the cylinder has been emptied by a free flow there is no gas to be used, but if the valve has been closed before the gas is all blown off, there are some ways for a skilled diver to make use of it if it is really needed. In most cases this should not be necessary, as effective gas management should ensure sufficient gas to surface safely if any single failure occurs.
* A working second stage can be swapped for one that has failed, while the cylinder valve is closed, if the diver has a suitable spanner (wrench). This is relatively easy and safe, and is usually the best option. The hose connections are usually compatible.
* A regulator that cannot be prevented from free-flowing can be controlled manually by opening and closing the cylinder valve for each breath.
* A regulator that is locked closed at the first stage can be removed, and it is possible to breathe directly, though inefficiently from the pillar valve, controlling the flow by adjusting the flow by hand. This is not safe, but it is safer than drowning, and may be safer than breathing a gas which is unsafe at that depth, or surfacing having missed a large amount of obligatory decompression.
* A working regulator from an empty cylinder, or one with gas that is unsuitable for the depth can be switched to the cylinder underwater. A scuba regulator can be switched from one cylinder to another underwater in an emergency, and will usually work correctly after such a switch, after any water that leaked into it during the changeout has been purged, but doing this contaminates the internal components and the regulator should be serviced as soon as reasonably possible after the dive, to prevent possible damage, particularly if seawater gets into the pressure gauge, which is difficult to rinse internally.