sapfluxnet / sapfluxnetQC1

R package with functions related to sapfluxnet project
6 stars 0 forks source link

QC3 *The Final Countdown* #44

Open MalditoBarbudo opened 6 years ago

MalditoBarbudo commented 6 years ago

In order to provide a clean and curated data, the last stage of QC checks must be performed. This includes uniformizing metadata tables (code is not perfect, sometimes variables are coded as character, other as factors), or ensuring solar TIMESTAMP is UTC among other things.

In summary, this is the last cleaning before data is considered ready to production.

List of processes performed in QC3:

  1. pl_name is converted to character in all cases (Sometimes if plant name is numeric this generates problems when joining the metadata)
  2. si_biome is converted to character (Sometimes is saved as factor, again this generates useless warnings when joining the metadata)
  3. solarTIMESTAMP must be UTC (standard, as it refers to solar aparent time [ast]), but package used to calculate ast set the timezone as "" (empty). This generates problems, as the solarTIMESTAMP is automatically converted to user time zone (EST in our case), which is not desired. So we force timezo to UTC.
  4. Get ride of non-ascii characters. In order to publish sapfluxnetr package in the CRAN, metadata values can not contain non-ascii characters (the weird-excel-generated comets in the sapflow units for example)
  5. Fix sites affected by leag area level units bug (in some sites, due to an already fixed bug, leaf area units were not updated in the metadata).