From 3e41fd68f387e6c63bfd0ddae376b32160380b06 Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 13 Dec 2019 17:50:56 +0100 Subject: [PATCH] Add warnings to parameter 'crop' choice --- R/CDORemap.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/CDORemap.R b/R/CDORemap.R index a04d88a5..ea6ff137 100644 --- a/R/CDORemap.R +++ b/R/CDORemap.R @@ -406,6 +406,7 @@ CDORemap <- function(data_array = NULL, lons, lats, grid, method, } if (is.logical(crop)) { if (crop) { + warning("Parameter 'crop' = 'TRUE'. The output grid range will follow the input lons and lats.") if (length(lons) == 1 || length(lats) == 1) { stop("CDORemap cannot remap if crop = TRUE and values for only one ", "longitude or one latitude are provided. Either a) provide ", @@ -516,6 +517,8 @@ CDORemap <- function(data_array = NULL, lons, lats, grid, method, } ###--- } + } else if (crop == FALSE) { + warning("Parameter 'crop' = 'FALSE'. The output grid range will follow parameter 'grid'.") } } else if (is.numeric(crop)) { if (length(crop) != 4) { -- GitLab