Anyone who can help me with this, I would be very grateful to him. Also thank you for communicating with me.
Here is my raw code...
from PyCO2SYS import CO2SYS
import math
par1type = 1 # The first parameter supplied is of type "1", which means "alkalinity"; type "4" which means Seawater partial pressure of CO2; 8" which means "Aqueous CO2""; "9", which is "Dry mole fraction of CO2""
alk = 8.2
par1 = alk*1000*0.36 # value of the first parameter
print("Tank measured Alk =", alk, "dKH (", par1, ")")
#par1 = 1500
#print("Tank target CO2 =", par1, "matm ")
par2type = 9 # The second parameter supplied is of type "3", which means "pH"; type "4" which means Seawater partial pressure of CO2; 8" which means "Aqueous CO2""; "9", which is "Dry mole fraction of CO2""
# par2 = 7.73 # value of the second parameter
# print("Tank measured pH =", par2, "NBS")
par2 = 400
print("Air CO2 =", par2, "ppm")
sal = 35 # Salinity of the sample
tempin = 25 # Temperature at input conditions
tempout = 25 # Temperature at output conditions
presin = 0 # Pressure at input conditions
presout = 0 # Pressure at output conditions
sil = 50 # Concentration of silicate in the sample (in umol/kg)
po4 = 2 # Concentration of phosphate in the sample (in umol/kg)
pHscale = 4 # pH scale at which the input pH is reported ("1" means "Total Scale") ("3" means Free Scale)("4" means NBS)
k1k2c = 4 # Choice of H2CO3 and HCO3- dissociation constants K1 and K2 ("4" means "Mehrbach refit")
kso4c = 1 # Choice of HSO4- dissociation constants KSO4 ("1" means "Dickson")
# Do the calculation. See CO2SYS's help for syntax and output format
CO2dict = CO2SYS(par1, par2, par1type, par2type, sal, tempin, tempout, presin, presout, sil, po4,pHscale, k1k2c, kso4c)
print()
print("Calculated Results:")
dkh = CO2dict["TAlk"][0]/1000/0.36
print("Alk =",dkh,"dKH")
print("pH =", CO2dict["pHoutTOTAL"][0], "Total")
print("pH =", CO2dict["pHoutNBS"][0], "NBS")
print("xCO2 = %.0f" % CO2dict["xCO2out"][0], "Dry mole fraction of CO2")
print("pCO2 = %.0f" % CO2dict["pCO2out"][0],"Seawater partial pressure of CO2")
print("CO3out =", CO2dict['CO3out'])
print("HCO3out =", CO2dict['HCO3out'])
print("CO3 % =", 100*CO2dict['CO3out']/(CO2dict['CO3out']+CO2dict['HCO3out']))
CarbonateAlk = (CO2dict['CO3out']/60 + CO2dict['HCO3out']/30)
#print("Carbonate Alk =", CarbonateAlk)
#print(CO2dict)