From ead073d89f08996e57c5f7bd0fcb08955aea7fa5 Mon Sep 17 00:00:00 2001 From: Emma Hogan Date: Thu, 23 May 2024 12:19:53 +0100 Subject: [PATCH] Update the name of the remapcon2 operator in R recipes (#3611) --- environment.yml | 2 +- environment_osx.yml | 4 ++-- esmvaltool/diag_scripts/hyint/hyint_etccdi_preproc.R | 2 +- esmvaltool/diag_scripts/hyint/hyint_functions.R | 8 ++++---- esmvaltool/diag_scripts/hyint/hyint_preproc.R | 2 +- esmvaltool/diag_scripts/miles/basis_functions.R | 4 ++-- .../diag_scripts/quantilebias/quantilebias_functions.R | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/environment.yml b/environment.yml index 3bda334367..ad4666aadd 100644 --- a/environment.yml +++ b/environment.yml @@ -11,7 +11,7 @@ channels: dependencies: - aiohttp - cartopy - - cdo >=1.9.7 + - cdo >=2.3.0 - cdsapi - cf-units - cftime diff --git a/environment_osx.yml b/environment_osx.yml index 17f4e6d963..290adb6b1c 100644 --- a/environment_osx.yml +++ b/environment_osx.yml @@ -11,7 +11,7 @@ channels: dependencies: - aiohttp - cartopy - - cdo >=1.9.7 + - cdo >=2.3.0 - cdsapi - cf-units - cftime @@ -48,7 +48,7 @@ dependencies: - psy-maps - psy-reg - psy-simple - - pyproj>=2.1 + - pyproj >=2.1 - pys2index # only from conda-forge - python >=3.9 - python-cdo diff --git a/esmvaltool/diag_scripts/hyint/hyint_etccdi_preproc.R b/esmvaltool/diag_scripts/hyint/hyint_etccdi_preproc.R index bb14906453..36c09f952d 100644 --- a/esmvaltool/diag_scripts/hyint/hyint_etccdi_preproc.R +++ b/esmvaltool/diag_scripts/hyint/hyint_etccdi_preproc.R @@ -29,7 +29,7 @@ hyint_etccdi_preproc <- sfile_tmp0 <- cdo("delvar", args = "time_bnds", input = sfile) gridf <- tempfile() cdo("griddes", input = hyint_file, stdout = gridf) - sfile_tmp1 <- cdo("remapcon2", + sfile_tmp1 <- cdo("remapscon2", args = gridf, input = sfile_tmp0 ) diff --git a/esmvaltool/diag_scripts/hyint/hyint_functions.R b/esmvaltool/diag_scripts/hyint/hyint_functions.R index 5cc2b9d07e..a1595c2a72 100644 --- a/esmvaltool/diag_scripts/hyint/hyint_functions.R +++ b/esmvaltool/diag_scripts/hyint/hyint_functions.R @@ -626,7 +626,7 @@ create_landseamask <- ## Regridding the topographic map to chosen grid cdo( - "remapcon2", + "remapscon2", args = paste0("'", regrid, "'"), input = ftopo, output = regridded_topo @@ -827,7 +827,7 @@ ncdf_opener_universal <- # nolint rotate = "full", interp2grid = F, grid = "r144x73", - remap_method = "remapcon2", + remap_method = "remapscon2", exportlonlat = TRUE, verbose = F) { # load package @@ -1090,7 +1090,7 @@ ncdf_opener <- function(namefile, rotate = "full", interp2grid = F, grid = "r144x73", - remap_method = "remapcon2", + remap_method = "remapscon2", exportlonlat = T) { field <- ncdf_opener_universal( @@ -1123,7 +1123,7 @@ ncdf_opener_time <- # nolint rotate = "full", interp2grid = F, grid = "r144x73", - remap_method = "remapcon2") { + remap_method = "remapscon2") { # function to open netcdf files. It uses ncdf4 library # time selection of month and years needed automatically rotate matrix # to place greenwich at the center (flag "rotate") diff --git a/esmvaltool/diag_scripts/hyint/hyint_preproc.R b/esmvaltool/diag_scripts/hyint/hyint_preproc.R index ec0807cf70..c8350a061d 100644 --- a/esmvaltool/diag_scripts/hyint/hyint_preproc.R +++ b/esmvaltool/diag_scripts/hyint/hyint_preproc.R @@ -22,7 +22,7 @@ hyint_preproc <- function(work_dir, } else { gridf <- rgrid } - tempf <- cdo("remapcon2", args = gridf, input = climofile) + tempf <- cdo("remapscon2", args = gridf, input = climofile) unlink(gridf) } else { tempf <- cdo("addc", args = "0", input = climofile) diff --git a/esmvaltool/diag_scripts/miles/basis_functions.R b/esmvaltool/diag_scripts/miles/basis_functions.R index 2eb65b0789..adab0c0d6a 100644 --- a/esmvaltool/diag_scripts/miles/basis_functions.R +++ b/esmvaltool/diag_scripts/miles/basis_functions.R @@ -336,7 +336,7 @@ ncdf_opener_universal <- # nolint interp2grid = FALSE, fillmiss = FALSE, grid = "r144x73", - remap_method = "remapcon2", + remap_method = "remapscon2", exportlonlat = TRUE, verbose = TRUE) { # load package @@ -645,7 +645,7 @@ ncdf_opener <- function(namefile, interp2grid = FALSE, fillmiss = FALSE, grid = "r144x73", - remap_method = "remapcon2", + remap_method = "remapscon2", exportlonlat = TRUE, verbose = FALSE) { field <- ncdf_opener_universal( diff --git a/esmvaltool/diag_scripts/quantilebias/quantilebias_functions.R b/esmvaltool/diag_scripts/quantilebias/quantilebias_functions.R index 8d520cf545..cbd9e72acf 100644 --- a/esmvaltool/diag_scripts/quantilebias/quantilebias_functions.R +++ b/esmvaltool/diag_scripts/quantilebias/quantilebias_functions.R @@ -62,7 +62,7 @@ ncdf_opener_universal <- # nolint rotate = "full", interp2grid = F, grid = "r144x73", - remap_method = "remapcon2", + remap_method = "remapscon2", exportlonlat = TRUE, verbose = F) { # load package @@ -326,7 +326,7 @@ ncdf_opener <- function(namefile, rotate = "full", interp2grid = F, grid = "r144x73", - remap_method = "remapcon2", + remap_method = "remapscon2", exportlonlat = T) { field <- ncdf_opener_universal(