gremau / NMEG_FluxProc

Code used to process and manage eddy covariance data for the New Mexico Elevation Gradient.
8 stars 2 forks source link

Fix card_data_processor.m timestamp filling when creating fluxall from scratch #20

Open gremau opened 9 years ago

gremau commented 9 years ago

Fix card_data_processor timestamp filling

card_data_processor.m must be run twice to generate a complete fluxall file if that fluxall file is not already present.

When no fluxall file is present, the first run of card_data_processor will not produce a fluxall file with all dates (Jan 1 00:30 to Jan 1 00:00 of next year) if there is missing data at the start of the year. This creates a problem for the Remove Bad Process, which is expecting full-year datasets. For some reason, on the second run, when cdp.m first loads an existing fluxall file, this problem does not occur and the missing timestamps at the start of the year are filled present (with all NaN values) as they should be.