stilt.observations.read_proffast#

stilt.observations.read_proffast(path, species, *, raw_dir=None)[source]#

Read a PROFFASTpylot run’s results into a table of soundings.

Reads the run’s comb_invparms_*.csv for the columns, and each day’s colsens.dat, pT_fast_out.dat and VMR_fast_out.dat for the averaging kernels and priors.

Parameters:
  • path (str | Path) – The run’s comb_invparms_*.csv.

  • species (str) – Column to read: xco2, xch4, xco, xh2o, or COCCON’s alternative retrievals xco2_str and xch4_s5p.

  • raw_dir (str | Path | None) – The folder of the daily files. Defaults to raw_output_proffast next to the CSV, where PROFFASTpylot puts them.

Returns:

One row per spectrum, all of them. value is the column in ppm, or ppb for xco, before any instrument calibration. PROFFAST reports no error for a single spectrum, so uncertainty is NaN. good is COCCON’s quality screen: solar zenith angle at most 75 degrees and XAIR between 0.98 and 1.02. ak is the day’s column sensitivity interpolated linearly to the spectrum’s apparent solar zenith angle, and ak_extrapolated marks spectra beyond the table’s last angle, which take its last column. ak_pressure and pressure_levels (hPa) and altitude_levels (m above sea level) are the day’s prior grid, and apriori the prior in the units of value, all from the surface up. zenith and azimuth are the solar angles, the direction the instrument looks, with the azimuth clockwise from north. sounding_id is the spectrum’s file name. The other columns of the results table, such as XAIR and each window’s fit statistics, are left out.

Return type:

DataFrame

Notes

COCCON’s GEOMS files (read_coccon()) hold the same retrieval with each instrument’s calibration factor applied, only the spectra that pass the screen above, and an uncertainty from the scatter of eleven neighboring spectra. Tested on a run of PROFFASTpylot (PROFFAST 2.4) on KIT’s example data, whose kernels and priors match its GEOMS files.