deeplycloudy / xlma-python

A future, Python-based version of xlma?
MIT License
6 stars 6 forks source link

Header parsing in LMA reader #6

Open deeplycloudy opened 4 years ago

deeplycloudy commented 4 years ago

This issue consolidates a few things discussed in #2. Quoting:

Potential issue: Header information (station locations, % contributions, etc.) are read in with a fixed width format since station names may white space. I'm unsure how consistent those widths are among existing file formats. — @vbalderdash

there's no Data format: 15.9f 12.8f 13.8f 9.2f 6.2f 5.1f 7x line like there is for the main data section. I think we just live with it. Maybe there are some simple checks that could be done to throw a warning / error if, say, lon lat for stations aren't close to the coord center. —@deeplycloudy

Maybe an check on whether the values read in are floats/strings would work? Pandas can infer the widths instead of specifying it. I have not had luck with that method, but maybe it's something that would be useful to troubleshoot. — @vbalderdash

deeplycloudy commented 4 years ago

As mentioned in #9, since there are a few flavors of data file in the wild, it would be good to include a truncated (a few data points) data file of each kind in the repository, and attach some testing infrastructure to make sure that future changes to the reader don't accidentally break anything.