-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_nc_epwshiftr.R
52 lines (41 loc) · 1.32 KB
/
get_nc_epwshiftr.R
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
# attempt to use CMIP6 downloading package
# set directory to store files
options(epwshiftr.dir = tempdir())
options(epwshiftr.verbose = TRUE)
# get CMIP6 data nodes
(nodes <- get_data_node())
# create a CMIP6 output file index
idx <- init_cmip6_index(
# only consider ScenarioMIP activity
activity = "ScenarioMIP",
# specify variables POC, NPP, and MLD
variable = c("expc", "epc100", "pp", "ppos", "mlotst", "mlotstmax", "mlotstmin"),
# specify report frequency
frequency = c("yr", "mon"),
# specify experiment name
experiment = c("ssp585"),
# specify GCM names
source = c("CESM2", "CESM2-WACCM", "GFDL-ESM4", "MPI-ESM1-2-HR",
"MPI-ESM1-2-LR", "IPSL-CM6A-LR", "UKESM1-0-L"),
# specify variant,
variant = NULL,
# save to data dictionary
save = TRUE
)
#saving CMIP6 data list
write.csv(idx,"~/walker_thesis/cmip6_index.csv", row.names = TRUE)
esgf_query(
activity = "ScenarioMIP",
variable = c("expc", "epc100", "pp", "ppos", "mlotst", "mlotstmax", "mlotstmin"),
frequency = c("yr", "mon"),
experiment = "ssp585",
source = c("CESM2", "CESM2-WACCM", "GFDL-ESM4", "MPI-ESM1-2-HR",
"MPI-ESM1-2-LR", "IPSL-CM6A-LR", "UKESM1-0-L"),
variant = NULL,
replica = FALSE,
latest = TRUE,
resolution = NULL,
type = "Dataset",
limit = 10000L,
data_node = NULL
)