PecanProject/pecan — pull request #166 by ankurdesai (2014-07-02 14:37:38+00:00)
Title: First version of MDS gap filling

R script in data.atmosphere to use the REddyProc library to gap fill a set of met variables in Ameriflux2CF created met files. Framework for adding in NARR gap filling in comments and also on making it more generic to work across other CF gappy time series. Also adds REddyProc library to install.dependencies.

Feedback needed and future changes to be done: Which variables to actually gap fill (some are Ameriflux specific, should only do CF ones if we want to make this generic), need to add ncdf-helper library and check if variables exist in nc file, add optional variable option to select NARR or other gap-filled CF time series file to merge in, add list variable to choose which variables to fill. Currently, overwrites existing variables into a new .nc file in outfolder, maintains -9999 for bad values. REddyProc also produces a series of uncertainty estimates from comparing gap model to actual values and other metrics, which we could also extract and add to .nc file. Finally, merge in or link to David's or other downscaling algorithm for NCEP and NARR.

But this is a start and takes a few minutes on my laptop to run and fill a dozen met vars in a standard Ameriflux L2 file converted with the Ameriflux2CF script.