Build data format ICOS from a datatable (DateTime format and Nodata)

dataFormatICOS(timeserieDatatable, dateformat = "%Y%m%d%H%M%S")

Arguments

timeserieDatatable

Timeserie datatable. Need a TIMESTAMP column name with as.POSIXct configuration.

dateformat

String of datetime format, by defaut ICOS format: "%Y%m%d%H%M%S"

Value

data.table with ICOS format

Examples

library(aigoual) confVariablePath <- system.file("extdata/", "_config/variablesMapping.csv", package = "aigoual") rawFilePath <- system.file("extdata/bm-cent_L03-atm/0_rawdata/F01-30s/", "lqu_bm-cent_L03-atm_F01-30s_2021_05_17_0000.dat", package = "aigoual") decC <- "." skipRow <- c(1,2) timestampColumn <- "TIMESTAMP" timestampFormat <- "%Y-%m-%d %H:%M:%S" timestampTZ <- "Africa/Algiers" # Run functions rawFileDatatable <- readRawFileBM(TRUE,rawFilePath, decC,skipRow, timestampColumn,timestampFormat, timestampTZ) mappingRawFilesBM(rawFileDatatable,confVariablePath,"L03")
#> Warning: length(LHS)==0; no columns to delete or assign RHS to.
#> TIMESTAMP RECORD Year Month DOM Hour Minute Second uSecond #> 1: 2021-05-17 14:01:30 1117129 2021 5 17 14 1 30 0 #> 2: 2021-05-17 14:02:00 1117130 2021 5 17 14 2 0 0 #> 3: 2021-05-17 14:02:30 1117131 2021 5 17 14 2 30 0 #> 4: 2021-05-17 14:03:00 1117132 2021 5 17 14 3 0 0 #> 5: 2021-05-17 14:03:30 1117133 2021 5 17 14 3 30 0 #> --- #> 1197: 2021-05-17 23:59:30 1118325 2021 5 17 23 59 30 0 #> 1198: 2021-05-18 00:00:00 1118326 2021 5 18 0 0 0 0 #> 1199: 2021-05-18 00:00:30 1118327 2021 5 18 0 0 30 0 #> 1200: 2021-05-18 00:01:00 1118328 2021 5 18 0 1 0 0 #> 1201: 2021-05-18 00:01:30 1118329 2021 5 18 0 1 30 0 #> WeekDay Day_of_Year Volt_Batterie Girouette_Wind_direction_WD_1_1_1 #> 1: 2 137 13.23 304.9 #> 2: 2 137 13.23 303.0 #> 3: 2 137 13.23 295.4 #> 4: 2 137 13.23 292.6 #> 5: 2 137 13.23 310.0 #> --- #> 1197: 2 137 13.32 282.3 #> 1198: 3 138 13.32 313.6 #> 1199: 3 138 13.32 294.8 #> 1200: 3 138 13.32 317.3 #> 1201: 3 138 13.32 284.8 #> Girouette_Wind_speed_WS_1_1_1_1 WindSonic_50_direction_WD_2_1_1 #> 1: 5.073 NaN #> 2: 5.344 NaN #> 3: 4.900 NaN #> 4: 5.978 NaN #> 5: 6.259 NaN #> --- #> 1197: 3.535 NaN #> 1198: 3.812 NaN #> 1199: 3.685 NaN #> 1200: 3.433 NaN #> 1201: 3.753 NaN #> WindSonic_50_speed_WS_2_1_1 WindSonic_200_direction_WD_2_2_1 #> 1: NaN 276 #> 2: NaN 280 #> 3: NaN 261 #> 4: NaN 267 #> 5: NaN 295 #> --- #> 1197: NaN 266 #> 1198: NaN 291 #> 1199: NaN 273 #> 1200: NaN 307 #> 1201: NaN 266 #> WindSonic_200_speed_WS_2_2_1 Pa_Laq_hPa Pa_Corr_hPa Pa_Laq_KPa #> 1: 5.29 898 1018 89.8 #> 2: 6.16 898 1018 89.8 #> 3: 4.06 898 1018 89.8 #> 4: 4.85 898 1018 89.8 #> 5: 4.54 898 1018 89.8 #> --- #> 1197: 3.90 900 1020 90.0 #> 1198: 3.79 900 1020 90.0 #> 1199: 4.36 900 1020 90.0 #> 1200: 4.87 900 1020 90.0 #> 1201: 4.64 900 1020 90.0 #> Pa_Corr_KPa Temp_reference Tair_50_Ta_1_1_1 Tair_200_Ta_1_2_1 #> 1: 101.8 10.270 6.3 6.3 #> 2: 101.8 10.250 6.3 6.3 #> 3: 101.8 10.240 6.3 6.3 #> 4: 101.8 10.220 6.3 6.3 #> 5: 101.8 10.210 6.4 6.4 #> --- #> 1197: 102.0 6.969 4.4 4.4 #> 1198: 102.0 6.968 4.4 4.4 #> 1199: 102.0 6.968 4.4 4.4 #> 1200: 102.0 6.966 4.4 4.4 #> 1201: 102.0 6.966 4.4 4.4 #> Hair_50_RH_1_1_1 Hair_200_RH_1_2_1 Temp_Corr_Distance_SR50 #> 1: 80.3 80.4 NaN #> 2: 80.3 80.7 NaN #> 3: 81.2 81.4 NaN #> 4: 81.7 81.5 NaN #> 5: 80.6 80.4 NaN #> --- #> 1197: 96.7 96.7 NaN #> 1198: 96.7 96.7 NaN #> 1199: 96.7 96.8 NaN #> 1200: 96.8 96.8 NaN #> 1201: 96.8 96.8 NaN #> Snow_Depth_cm_Corr_SNOWD Snow_Depth_cm_Estime Temp_corr_distance_fixe #> 1: NaN NaN 1.63 #> 2: NaN NaN 1.63 #> 3: NaN NaN 1.63 #> 4: NaN NaN 1.63 #> 5: NaN NaN 1.63 #> --- #> 1197: NaN NaN 1.62 #> 1198: NaN NaN 1.62 #> 1199: NaN NaN 1.62 #> 1200: NaN NaN 1.62 #> 1201: NaN NaN 1.62 #> Precipitation_P_Tot_Tot Evapo_saturee_Es Evapo_actuelle_Ea #> 1: 0.0 0.954 0.767 #> 2: 0.0 0.954 0.770 #> 3: 0.0 0.954 0.777 #> 4: 0.0 0.954 0.778 #> 5: 0.0 0.961 0.773 #> --- #> 1197: 0.0 0.836 0.809 #> 1198: 0.1 0.836 0.809 #> 1199: 0.0 0.836 0.810 #> 1200: 0.0 0.836 0.810 #> 1201: 0.0 0.836 0.810 #> Vapour_Pressure_Deficit_VPD PointRosee_Dewpoint_T_DP #> 1: 0.187 2.38 #> 2: 0.184 2.44 #> 3: 0.178 2.58 #> 4: 0.177 2.60 #> 5: 0.188 2.48 #> --- #> 1197: 0.028 3.74 #> 1198: 0.028 3.74 #> 1199: 0.027 3.76 #> 1200: 0.027 3.76 #> 1201: 0.027 3.76 #> en_une_minute_Pluviogravimetrique Poids_eau_Pluviogravimetrique #> 1: 0 0 #> 2: 0 0 #> 3: 0 0 #> 4: 0 0 #> 5: 0 0 #> --- #> 1197: 0 0 #> 1198: 0 0 #> 1199: 0 0 #> 1200: 0 0 #> 1201: 0 0 #> Somme_Pluviogravimetrique #> 1: -1477.47 #> 2: -1477.47 #> 3: -1477.47 #> 4: -1477.47 #> 5: -1477.47 #> --- #> 1197: -1477.47 #> 1198: -1477.47 #> 1199: -1477.47 #> 1200: -1477.47 #> 1201: -1477.47
buildTimestampBM(rawFileDatatable,timestampTZ)
#> TIMESTAMP RECORD Year Month DOM Hour Minute Second uSecond #> 1: 2021-05-17 00:00:30 NA NA NA NA NA NA NA NA #> 2: 2021-05-17 00:01:00 NA NA NA NA NA NA NA NA #> 3: 2021-05-17 00:01:30 NA NA NA NA NA NA NA NA #> 4: 2021-05-17 00:02:00 NA NA NA NA NA NA NA NA #> 5: 2021-05-17 00:02:30 NA NA NA NA NA NA NA NA #> --- #> 2876: 2021-05-17 23:58:00 1118322 2021 5 17 23 58 0 0 #> 2877: 2021-05-17 23:58:30 1118323 2021 5 17 23 58 30 0 #> 2878: 2021-05-17 23:59:00 1118324 2021 5 17 23 59 0 0 #> 2879: 2021-05-17 23:59:30 1118325 2021 5 17 23 59 30 0 #> 2880: 2021-05-18 00:00:00 1118326 2021 5 18 0 0 0 0 #> WeekDay Day_of_Year Volt_Batterie Girouette_Wind_direction_WD_1_1_1 #> 1: NA NA NA NA #> 2: NA NA NA NA #> 3: NA NA NA NA #> 4: NA NA NA NA #> 5: NA NA NA NA #> --- #> 2876: 2 137 13.32 311.3 #> 2877: 2 137 13.32 300.2 #> 2878: 2 137 13.32 298.0 #> 2879: 2 137 13.32 282.3 #> 2880: 3 138 13.32 313.6 #> Girouette_Wind_speed_WS_1_1_1_1 WindSonic_50_direction_WD_2_1_1 #> 1: NA NA #> 2: NA NA #> 3: NA NA #> 4: NA NA #> 5: NA NA #> --- #> 2876: 3.711 NaN #> 2877: 3.665 NaN #> 2878: 2.996 NaN #> 2879: 3.535 NaN #> 2880: 3.812 NaN #> WindSonic_50_speed_WS_2_1_1 WindSonic_200_direction_WD_2_2_1 #> 1: NA NA #> 2: NA NA #> 3: NA NA #> 4: NA NA #> 5: NA NA #> --- #> 2876: NaN 293 #> 2877: NaN 279 #> 2878: NaN 278 #> 2879: NaN 266 #> 2880: NaN 291 #> WindSonic_200_speed_WS_2_2_1 Pa_Laq_hPa Pa_Corr_hPa Pa_Laq_KPa #> 1: NA NA NA NA #> 2: NA NA NA NA #> 3: NA NA NA NA #> 4: NA NA NA NA #> 5: NA NA NA NA #> --- #> 2876: 4.04 900 1020 90 #> 2877: 3.15 900 1020 90 #> 2878: 2.64 900 1020 90 #> 2879: 3.90 900 1020 90 #> 2880: 3.79 900 1020 90 #> Pa_Corr_KPa Temp_reference Tair_50_Ta_1_1_1 Tair_200_Ta_1_2_1 #> 1: NA NA NA NA #> 2: NA NA NA NA #> 3: NA NA NA NA #> 4: NA NA NA NA #> 5: NA NA NA NA #> --- #> 2876: 102 6.971 4.4 4.4 #> 2877: 102 6.971 4.4 4.4 #> 2878: 102 6.971 4.4 4.4 #> 2879: 102 6.969 4.4 4.4 #> 2880: 102 6.968 4.4 4.4 #> Hair_50_RH_1_1_1 Hair_200_RH_1_2_1 Temp_Corr_Distance_SR50 #> 1: NA NA NA #> 2: NA NA NA #> 3: NA NA NA #> 4: NA NA NA #> 5: NA NA NA #> --- #> 2876: 96.7 96.7 NaN #> 2877: 96.7 96.7 NaN #> 2878: 96.7 96.7 NaN #> 2879: 96.7 96.7 NaN #> 2880: 96.7 96.7 NaN #> Snow_Depth_cm_Corr_SNOWD Snow_Depth_cm_Estime Temp_corr_distance_fixe #> 1: NA NA NA #> 2: NA NA NA #> 3: NA NA NA #> 4: NA NA NA #> 5: NA NA NA #> --- #> 2876: NaN NaN 1.62 #> 2877: NaN NaN 1.62 #> 2878: NaN NaN 1.62 #> 2879: NaN NaN 1.62 #> 2880: NaN NaN 1.62 #> Precipitation_P_Tot_Tot Evapo_saturee_Es Evapo_actuelle_Ea #> 1: NA NA NA #> 2: NA NA NA #> 3: NA NA NA #> 4: NA NA NA #> 5: NA NA NA #> --- #> 2876: 0.0 0.836 0.809 #> 2877: 0.0 0.836 0.809 #> 2878: 0.0 0.836 0.809 #> 2879: 0.0 0.836 0.809 #> 2880: 0.1 0.836 0.809 #> Vapour_Pressure_Deficit_VPD PointRosee_Dewpoint_T_DP #> 1: NA NA #> 2: NA NA #> 3: NA NA #> 4: NA NA #> 5: NA NA #> --- #> 2876: 0.028 3.74 #> 2877: 0.028 3.74 #> 2878: 0.028 3.74 #> 2879: 0.028 3.74 #> 2880: 0.028 3.74 #> en_une_minute_Pluviogravimetrique Poids_eau_Pluviogravimetrique #> 1: NA NA #> 2: NA NA #> 3: NA NA #> 4: NA NA #> 5: NA NA #> --- #> 2876: 0 0 #> 2877: 0 0 #> 2878: 0 0 #> 2879: 0 0 #> 2880: 0 0 #> Somme_Pluviogravimetrique #> 1: NA #> 2: NA #> 3: NA #> 4: NA #> 5: NA #> --- #> 2876: -1477.47 #> 2877: -1477.47 #> 2878: -1477.47 #> 2879: -1477.47 #> 2880: -1477.47
dataFormatICOS(rawFileDatatable,dateformat="%Y%m%d%H%M%S")
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 15 named 'WindSonic_50_direction_WD_2_1_1').
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 16 named 'WindSonic_50_speed_WS_2_1_1').
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 24 named 'Tair_50_Ta_1_1_1').
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 26 named 'Hair_50_RH_1_1_1').
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 28 named 'Temp_Corr_Distance_SR50').
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 29 named 'Snow_Depth_cm_Corr_SNOWD').
#> Warning: Coercing 'character' RHS to 'double' to match the type of the target column (column 30 named 'Snow_Depth_cm_Estime').
#> TIMESTAMP RECORD Year Month DOM Hour Minute Second uSecond WeekDay #> 1: 20210517140130 1117129 2021 5 17 14 1 30 0 2 #> 2: 20210517140200 1117130 2021 5 17 14 2 0 0 2 #> 3: 20210517140230 1117131 2021 5 17 14 2 30 0 2 #> 4: 20210517140300 1117132 2021 5 17 14 3 0 0 2 #> 5: 20210517140330 1117133 2021 5 17 14 3 30 0 2 #> --- #> 1197: 20210517235930 1118325 2021 5 17 23 59 30 0 2 #> 1198: 20210518000000 1118326 2021 5 18 0 0 0 0 3 #> 1199: 20210518000030 1118327 2021 5 18 0 0 30 0 3 #> 1200: 20210518000100 1118328 2021 5 18 0 1 0 0 3 #> 1201: 20210518000130 1118329 2021 5 18 0 1 30 0 3 #> Day_of_Year Volt_Batterie Girouette_Wind_direction_WD_1_1_1 #> 1: 137 13.23 304.9 #> 2: 137 13.23 303.0 #> 3: 137 13.23 295.4 #> 4: 137 13.23 292.6 #> 5: 137 13.23 310.0 #> --- #> 1197: 137 13.32 282.3 #> 1198: 138 13.32 313.6 #> 1199: 138 13.32 294.8 #> 1200: 138 13.32 317.3 #> 1201: 138 13.32 284.8 #> Girouette_Wind_speed_WS_1_1_1_1 WindSonic_50_direction_WD_2_1_1 #> 1: 5.073 NaN #> 2: 5.344 NaN #> 3: 4.900 NaN #> 4: 5.978 NaN #> 5: 6.259 NaN #> --- #> 1197: 3.535 NaN #> 1198: 3.812 NaN #> 1199: 3.685 NaN #> 1200: 3.433 NaN #> 1201: 3.753 NaN #> WindSonic_50_speed_WS_2_1_1 WindSonic_200_direction_WD_2_2_1 #> 1: NaN 276 #> 2: NaN 280 #> 3: NaN 261 #> 4: NaN 267 #> 5: NaN 295 #> --- #> 1197: NaN 266 #> 1198: NaN 291 #> 1199: NaN 273 #> 1200: NaN 307 #> 1201: NaN 266 #> WindSonic_200_speed_WS_2_2_1 Pa_Laq_hPa Pa_Corr_hPa Pa_Laq_KPa #> 1: 5.29 898 1018 89.8 #> 2: 6.16 898 1018 89.8 #> 3: 4.06 898 1018 89.8 #> 4: 4.85 898 1018 89.8 #> 5: 4.54 898 1018 89.8 #> --- #> 1197: 3.90 900 1020 90.0 #> 1198: 3.79 900 1020 90.0 #> 1199: 4.36 900 1020 90.0 #> 1200: 4.87 900 1020 90.0 #> 1201: 4.64 900 1020 90.0 #> Pa_Corr_KPa Temp_reference Tair_50_Ta_1_1_1 Tair_200_Ta_1_2_1 #> 1: 101.8 10.270 6.3 6.3 #> 2: 101.8 10.250 6.3 6.3 #> 3: 101.8 10.240 6.3 6.3 #> 4: 101.8 10.220 6.3 6.3 #> 5: 101.8 10.210 6.4 6.4 #> --- #> 1197: 102.0 6.969 4.4 4.4 #> 1198: 102.0 6.968 4.4 4.4 #> 1199: 102.0 6.968 4.4 4.4 #> 1200: 102.0 6.966 4.4 4.4 #> 1201: 102.0 6.966 4.4 4.4 #> Hair_50_RH_1_1_1 Hair_200_RH_1_2_1 Temp_Corr_Distance_SR50 #> 1: 80.3 80.4 NaN #> 2: 80.3 80.7 NaN #> 3: 81.2 81.4 NaN #> 4: 81.7 81.5 NaN #> 5: 80.6 80.4 NaN #> --- #> 1197: 96.7 96.7 NaN #> 1198: 96.7 96.7 NaN #> 1199: 96.7 96.8 NaN #> 1200: 96.8 96.8 NaN #> 1201: 96.8 96.8 NaN #> Snow_Depth_cm_Corr_SNOWD Snow_Depth_cm_Estime Temp_corr_distance_fixe #> 1: NaN NaN 1.63 #> 2: NaN NaN 1.63 #> 3: NaN NaN 1.63 #> 4: NaN NaN 1.63 #> 5: NaN NaN 1.63 #> --- #> 1197: NaN NaN 1.62 #> 1198: NaN NaN 1.62 #> 1199: NaN NaN 1.62 #> 1200: NaN NaN 1.62 #> 1201: NaN NaN 1.62 #> Precipitation_P_Tot_Tot Evapo_saturee_Es Evapo_actuelle_Ea #> 1: 0.0 0.954 0.767 #> 2: 0.0 0.954 0.770 #> 3: 0.0 0.954 0.777 #> 4: 0.0 0.954 0.778 #> 5: 0.0 0.961 0.773 #> --- #> 1197: 0.0 0.836 0.809 #> 1198: 0.1 0.836 0.809 #> 1199: 0.0 0.836 0.810 #> 1200: 0.0 0.836 0.810 #> 1201: 0.0 0.836 0.810 #> Vapour_Pressure_Deficit_VPD PointRosee_Dewpoint_T_DP #> 1: 0.187 2.38 #> 2: 0.184 2.44 #> 3: 0.178 2.58 #> 4: 0.177 2.60 #> 5: 0.188 2.48 #> --- #> 1197: 0.028 3.74 #> 1198: 0.028 3.74 #> 1199: 0.027 3.76 #> 1200: 0.027 3.76 #> 1201: 0.027 3.76 #> en_une_minute_Pluviogravimetrique Poids_eau_Pluviogravimetrique #> 1: 0 0 #> 2: 0 0 #> 3: 0 0 #> 4: 0 0 #> 5: 0 0 #> --- #> 1197: 0 0 #> 1198: 0 0 #> 1199: 0 0 #> 1200: 0 0 #> 1201: 0 0 #> Somme_Pluviogravimetrique #> 1: -1477.47 #> 2: -1477.47 #> 3: -1477.47 #> 4: -1477.47 #> 5: -1477.47 #> --- #> 1197: -1477.47 #> 1198: -1477.47 #> 1199: -1477.47 #> 1200: -1477.47 #> 1201: -1477.47