Skip to content

Commit 92f4ee3

Browse files
committed
Fix chelsa and clc
1 parent 3accbfc commit 92f4ee3

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

R/dwf_chelsa_process.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ chelsa_process <- function(
164164
} else {
165165
ecokit::cat_time("Check input CHELSA files in parallel")
166166
ecokit::set_parallel(
167-
n_cores = n_cores, level = 1L, future_max_size = 800L,
167+
n_cores = n_cores, level = 1L, future_max_size = 1500L,
168168
strategy = strategy)
169169
withr::defer(future::plan("sequential", gc = TRUE))
170170
}

R/dwf_clc_plot.R

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,8 @@ clc_plot <- function(clc_name, clc_map, eu_map, crosswalk, path_jpeg) {
382382
plot <- cowplot::plot_grid(plotlist = plot, ncol = 4, nrow = 2) %>%
383383
cowplot::plot_grid(common_legend, rel_widths = c(4, 0.2)) %>%
384384
cowplot::plot_grid(main_title, ., ncol = 1, rel_heights = c(0.05, 1))
385-
path_jpeg_file <- out_path[.x]
386385
ragg::agg_jpeg(
387-
filename = path_jpeg_file, width = 28, height = 15, res = 600,
386+
filename = out_path[.x], width = 28, height = 15, res = 600,
388387
quality = 100, units = "cm")
389388
print(plot)
390389
grDevices::dev.off()
@@ -395,11 +394,9 @@ clc_plot <- function(clc_name, clc_map, eu_map, crosswalk, path_jpeg) {
395394
plotlist = plot_nozero, ncol = 4, nrow = 2) %>%
396395
cowplot::plot_grid(common_legend, rel_widths = c(4, 0.2)) %>%
397396
cowplot::plot_grid(main_title, ., ncol = 1, rel_heights = c(0.05, 1))
398-
path_jpeg_file <- stringr::str_replace(
399-
out_path[.x], "summary_jpeg", "summary_jpeg_nozero")
400397
ragg::agg_jpeg(
401-
filename = path_jpeg_file, width = 28, height = 15, res = 600,
402-
quality = 100, units = "cm")
398+
filename = stringr::str_replace(out_path[.x], ".jpeg$", "_nozero.jpeg"),
399+
width = 28, height = 15, res = 600, quality = 100, units = "cm")
403400
print(plot_nozero)
404401
grDevices::dev.off()
405402
})

0 commit comments

Comments
 (0)