Skip to content

run and analyse all measCamp of 2023 together (MR !4)

Jan Engel requested to merge feature/analyse-all-meascamp-together into main

run and analyse all measCamp of 2023 together (MR !4 (merged))

issue

  • run flux calculation for all measurement campaigns 2023 together

solution

  • append measCamp to meas_ID to have unique identifier of each measurement period across measurement campaigns
    • the measID is now a number combining [year][month] = measCamp and measID as four digit number
    • e.g.: 2023050001 is the measurement period 1 of measCamp 202305
  • change main script so all measCamp can be run in one go for statistical analyses
    • split the main script into preprocess and flux calculation scripts
    • create a function for each of them
    • call the functions in the new run_main.R script
    • by running run_main.R all processing & calculation is done
    • the list of measurement campaigns measCampList <- c("202305", "202307", "202309") variable defines the measCamp the script runs for
      • tested only for 2023!
  • modify flux calculation in the way that all measCamp can be calculated together
    • essentially removing all code that writes/reads files
    • and rename few data frames for consistency
  • the result DF of the script is:
    • goflux_data_metadata_df
    • provided by combine_all_data_and_meta_data.R
    • and written as file to paste0(fluxResOutDir, "/", currentDateTime, "__goflux_n2o_data_metadata_corrected__mc", measCampListString, ".csv")
      • e.g.: 20240223_213649__goflux_n2o_data_metadata_corrected__mc_202305_202307_202309.csv
  • improve calculation of environmental var:
    • soil temperature per mp is calculated from all four sensors, using the last 10 values of the mp to calc the median
    • soil moisture per mp is calculated as median of the last 10 values of the mp
    • this already solves !3 (closed)
  • multiple minor changes
  • testing:
    • works at BGC HPC with latest packages and R 4.3.2
    • works at private Laptop with latest packages and R 4.3.2

Closes #11 (closed)

Edited by Jan Engel

Merge request reports