49 | | > ip <- installed.packages() |
50 | | > # Path to the installed library |
51 | | > libPath <- ip[grep("ecomsUDG.Raccess", ip[ ,1]), 2] |
52 | | > # Path to the dictionaries folder |
53 | | > dicPath <- paste(libPath, "/ecomsUDG.Raccess/dictionaries", sep = "") |
54 | | > list.files(dicPath) |
55 | | [1] "CFSv2_seasonal_16.csv" "System4_annual_15.csv" "System4_seasonal_15.csv" |
56 | | [4] "System4_seasonal_51.csv" |
57 | | > dic <- read.csv(list.files(dicPath, full = TRUE)[grep("CFSv2", list.files(dicPath))]) |
58 | | > str(dic.cfs) |
59 | | 'data.frame': 5 obs. of 9 variables: |
60 | | $ identifier : Factor w/ 5 levels "psl","tas","tasmax",..: 3 4 2 5 1 |
61 | | $ short_name : Factor w/ 5 levels "Maximum_temperature_height_above_ground" ... |
62 | | $ time_step : Factor w/ 1 level "6h": 1 1 1 1 1 |
63 | | $ lower_time_bound: int 0 0 0 0 0 |
64 | | $ upper_time_bound: int 6 6 6 6 0 |
65 | | $ aggr_fun : Factor w/ 5 levels "max","mean","min",..: 1 3 2 5 4 |
66 | | $ offset : num -273 -273 -273 0 0 |
67 | | $ scale : int 1 1 1 21600 1 |
68 | | $ deaccum : int 0 0 0 0 0 |
| 50 | # Path to the installed library |
| 51 | libPath <- find.package("ecomsUDG.Raccess") |
| 52 | # Path to the dictionaries folder |
| 53 | dicPath <- file.path(libPath, "dictionaries") |
| 54 | list.files(dicPath) |
| 55 | }}} |
| 56 | {{{ |
| 57 | [1] "CFSv2_seasonal_16.dic" "NCEP.dic" |
| 58 | [3] "readme.txt" "System4_annual_15.dic" |
| 59 | [5] "System4_seasonal_15.dic" "System4_seasonal_51.dic" |
| 60 | [7] "WFDEI.dic" |
| 61 | }}} |
| 62 | |
| 63 | In this case, we inspect the dictionary of the CFSv2 dataset: |
| 64 | |
| 65 | {{{ |
| 66 | #!text/R |
| 67 | dic.cfs <- read.csv(list.files(dicPath, full = TRUE)[grep("CFSv2", list.files(dicPath))]) |
| 68 | str(dic.cfs) |
| 69 | }}} |
| 70 | {{{ |
| 71 | 'data.frame': 4 obs. of 11 variables: |
| 72 | $ identifier : Factor w/ 4 levels "tas","tasmax",..: 2 3 1 4 |
| 73 | $ short_name : Factor w/ 4 levels "Maximum_temperature_height_above_ground",..: 1 2 4 3 |
| 74 | $ time_step : Factor w/ 1 level "6h": 1 1 1 1 |
| 75 | $ lower_time_bound: int 0 0 0 0 |
| 76 | $ upper_time_bound: int 6 6 6 6 |
| 77 | $ cell_method : Factor w/ 4 levels "max","mean","min",..: 1 3 2 4 |
| 78 | $ offset : num -273 -273 -273 0 |
| 79 | $ scale : int 1 1 1 21600 |
| 80 | $ deaccum : int 0 0 0 0 |
| 81 | $ derived : int 0 0 0 0 |
| 82 | $ interface : logi NA NA NA NA}}} |
85 | | '''Example''': Suppose we have daily temperature data, each record associated to a date (e.g. 19780420 for 20th April 1978). The lower time bound in this case is 0, and the upper time bound 24, indicating that the verification period of the value starts 20 April 1978 at 00:00 and ends 20 April 1978 23:59:59 (i.e., the range {{{[19780420, 19780421)}}}. Because it is mean temperature, the aggregation function for this time interval would be "mean". If the same record has a time associated at 12:00 rather than 00:00 (i.e. 20 April 1978 at 12:00), then the lower and the upper time bounds would be 12. |
| 101 | '''Example''': Suppose we have daily temperature data, each record associated to a date (e.g. 19780420 for 20th April 1978). The lower time bound in this case is 0, and the upper time bound 24, indicating that the verification period of the value starts 20 April 1978 at 00:00 and ends 20 April 1978 23:59:59 (i.e., the time interval {{{[19780420, 19780421)}}}. Because it is mean temperature, the `cell_method` for this variable is "mean". If the same record has a time associated at 12:00 rather than 00:00 (i.e. 20 April 1978 at 12:00), then the lower and the upper time bounds would be 12. |