mvdh7 / PyCO2SYS

Marine carbonate system calculations in Python
https://PyCO2SYS.readthedocs.io
GNU General Public License v3.0
50 stars 9 forks source link

EZIO: Easy Input/Output #47

Closed d-sandborn closed 3 years ago

d-sandborn commented 3 years ago

The tentatively-named "EZIO" functionality is ready for review. It includes a call in PyCO2SYS.init.py , which should call upon the main 'ezio.py' script in PyCO2SYS.PyCO2SYS.EZIO. Example input and output files generated with this script are included in the same folder.

This functionality aims to replicate the Excel-based CO2SYS.xlsx as closely as possible. It takes columns A-L of that program (copied into a new .csv or .xlsx spreadsheet) as input, and returns/saves the output columns. The header columns (row 3) must match the CO2SYS.xlsx, though some flexibility in naming conventions for carbonate parameters has been allowed (e.g. DIC vs. TC).

In its simplest form, EZIO should be called and executed: import PyCO2SYS as pyco2 results = pyco2.ezio(filepath) Which returns a Pandas dataframe and saves a file of the same name with a '_processed.csv' tag appended. It also takes the optional carbonic, fluoride, bisulfate, and total borate arguments as pyco2.sys(), and retains the same default values.

Potential problems, uncertainties, and future improvements: