-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
107 lines (73 loc) · 2.91 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
title: "R Tools for Observations, Receptors and Footprints (rtorf)"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
<img src="man/figures/logo.png" align="right" alt="" width="220" />

[](https://github.com/noaa-gml/rtorf/actions/workflows/R-CMD-check.yaml)

[NOAA Obspack](https://gml.noaa.gov/ccgg/obspack/) is a collection of greenhouse gases observations
`rtorf` only depends on `data.table` and `ncdf4`, which is basically parallel C,
so it can be installed in any machine.
## Installation
Using git bash/powershell
```{bash installb, eval = F}
git clone https://github.com/noaa-gml/rtorf
R CMD INSTALL rtorf
```
Using remotes R package
```{r install, eval = F}
remotes::install_github("noaa-gml/rtorf")
```
```{r call, include = T, message=F, warning=F}
library(rtorf)
library(data.table)
```
## ObsPack summary
The first step consists in constructing a summary for the ObsPack.
This is required to read the data, but also, identify `agl`,
which is present in some of the file names.
This function returns a `data.frame`.
Optionally, the user can indicate a path to store the `data.frame`.
`obs_summary` also prints a summary of the data. The second
argument is the categories, and by default includes the categories
shown below, to account for all the files.
Then the summary `data.frame` contains
the columns `id` as the full path to each
file, `name` which is the name or relative path of the file, `n`
just an id, `sector` such as tower, and the column `agl`
which indicates the `agl` indicated in the name of the file
if available. To read the documentation of this function,
the user must run `?obs_summary`.
> We first define the categories
```{r read1, eval = T}
cate = c("aircraft-pfp",
"aircraft-insitu",
"aircraft-flask",
"surface-insitu",
"surface-flask",
"surface-pfp",
"tower-insitu",
"aircore",
"shipboard-insitu",
"shipboard-flask")
obs <- "Z:/obspack/obspack_ch4_1_GLOBALVIEWplus_v5.1_2023-03-08/data/nc/"
index <- obs_summary(obs = obs, categories = cate)
```
For each one of these dataset ids, check the articles in the documentation
https://noaa-gml.github.io/rtorf/
## Implementation in python:
I'm currently implementing a version in python [pytorf](https://github.com/noaa-gml/pytorf):
## Special thanks to all the
**contributors**
[](https://github.com/noaa-gml/rtorf/graphs/contributors)
and
**Stargazers**
<p>
<a href="https://github.com/noaa-gml/rtorf/stargazers">
<img src="http://reporoster.com/stars/dark/noaa-gml/rtorf"/>
</a>
</p>