% % this routine is called by pwpg.m % initializes gas profiles, as well as gas factors % starts with all gases as equilibrium (may alter later) % Must be called *after* inihydro.m % % The gases used in this model are by number % 1 - helium (my first love) % 2 - neon % 3 - argon % 4 - krypton % 5 - xenon % 6 - oxygen (abiotic) % global tcoeff scoeff load solcoef % loads solubility params [ngas,ndummy]=size(tcoeff); % get number of gases load scno % load schmidt number coeff ascno=dt*ascno*sqrt(600)/dz; % normalize to scno = 600, cell size, time for igas=1:ngas Gas(:,igas)=gassol(T,S,igas); end Ga=Gas(:); % storage matrix anom=zeros(nz,igas); Anom=anom(:); % storage matrix % % also set up vector of air injection factors % (normalized for atmospheric abundance and the % fact that data are expressed as % ncc/g (He, Ne, Kr, Xe) % ucc/g (Ar) % umol/Kg (O2) (x1/1024 kg/cc) % multiply base injection (2e-4 cc/m2/s) % times the scaling factor airamp, divide by % box volume = dz m3 / 1.e6 for cc/g -> cc/m3 % and multiply by time step for total gas flux % abund=[5240 18180 9340 1140 87 9.3446*1024]/1.e9; %airamp=1; abund=abund*airamp*2.0e-2*dt/dz; load airinj; % get air injection partition coefficients fpart=1-ftrap; % % add this for biological oxygen: % linearly interpolate from 150m at solubility % equilibrium to a climatological 218 umol/kg at 300m % Gas(75:150,6)=Gas(75,6)+(218-Gas(75,6))*[0:75]'/75;