* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/eixport.Rcheck’ * using R Under development (unstable) (2022-03-19 r81944) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘eixport/DESCRIPTION’ ... OK * this is package ‘eixport’ version ‘0.5.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘eixport’ can be installed ... [49s/122s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [70s/178s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking examples ... [39s/100s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [48s/125s] [48s/127s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(eixport) > > test_check("eixport") Please, choose one of the following sector: AWB CHE ENE FFF FOO_PAP IND IRO NFE NMM PRO RCO REF_TRF SWD_INC TNR_Aviation_CDS TNR_Aviation_CRS TNR_Aviation_LTO TNR_Other TNR_Ship TOTALS TRO_RES TRO_noRES AGS MNM PRU_SOL SWD_LDF WWT NEU Please, choose one of the following pollutants: BC CO NH3 NMVOC NOx PM2.5 PM10 SO2 Please, choose one of the following years: NA 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 Sum: 2090610.32 writing emissions: E_CO weight 1 on file /tmp/Rtmp3eVyq2/working_dir/RtmpdozfNh/wrfchemi_d02_2011-08-02_00:00:00 writing emissions: E_CO weight 1 on file /tmp/Rtmp3eVyq2/working_dir/RtmpdozfNh/wrfchemi_d02_2011-08-02_00_00_00 File /tmp/Rtmp3eVyq2/working_dir/RtmpdozfNh/EMISS/wrfchemi_d02_2011-08-01_00:00:00 (NC_FORMAT_CLASSIC): 39 variables (excluding dimension variables): char Times[DateStrLen,Time] float XLAT[west_east,south_north] MemoryOrder: XY description: LATITUDE, SOUTH IS NEGATIVE units: degree north stagger: FieldType: 104 float XLONG[west_east,south_north] MemoryOrder: XY description: LONGITUDE, WEST IS NEGATIVE units: degree east stagger: FieldType: 104 float E_ALD[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_C2H5OH[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_CH3OH[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_CO[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_CSL[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_ECC[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_ECI[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_ECJ[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_ETH[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_HC3[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_HC5[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_HC8[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_HCHO[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_ISO[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_KET[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_NH3[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_NO[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_NO2[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_NO3C[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_NO3I[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_NO3J[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_OL2[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_OLI[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_OLT[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_ORA2[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_ORGC[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_ORGI[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_ORGJ[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_PM25I[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_PM25J[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_SO2[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_SO4C[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_SO4I[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_SO4J[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: ug m^-2 s^-1 stagger: Z FieldType: 104 float E_TOL[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 float E_XYL[west_east,south_north,emissions_zdim_stag,Time] MemoryOrder: XYZ description: EMISSIONS units: mol km^-2 hr^-1 stagger: Z FieldType: 104 5 dimensions: DateStrLen Size:19 Time Size:1 *** is unlimited *** west_east Size:63 south_north Size:51 emissions_zdim_stag Size:1 79 global attributes: TITLE: Anthropogenic emissions for WRF V4.0 History: created on 2022-03-20 at 14:07 Author: R package eixport v0.5.0 WEST-EAST_GRID_DIMENSION: 64 SOUTH-NORTH_GRID_DIMENSION: 52 BOTTOM-TOP_GRID_DIMENSION: 35 DX: 3000 DY: 3000 GRIDTYPE: C DIFF_OPT: 1 KM_OPT: 4 DAMP_OPT: 3 DAMPCOEF: 0.200000002980232 KHDIF: 0 KVDIF: 0 MP_PHYSICS: 10 RA_LW_PHYSICS: 4 RA_SW_PHYSICS: 4 SF_SFCLAY_PHYSICS: 1 SF_SURFACE_PHYSICS: 2 BL_PBL_PHYSICS: 1 CU_PHYSICS: 0 SF_LAKE_PHYSICS: 0 SURFACE_INPUT_SOURCE: 1 SST_UPDATE: 0 GRID_FDDA: 0 GFDDA_INTERVAL_M: 0 GFDDA_END_H: 0 GRID_SFDDA: 0 SGFDDA_INTERVAL_M: 0 SGFDDA_END_H: 0 HYPSOMETRIC_OPT: 2 USE_THETA_M: 0 USE_MAXW_LEVEL: 0 USE_TROP_LEVEL: 0 GWD_OPT: 0 SF_URBAN_PHYSICS: 1 SF_OCEAN_PHYSICS: 0 SIMULATION_INITIALIZATION_TYPE: REAL-DATA CASE WEST-EAST_PATCH_START_UNSTAG: 1 WEST-EAST_PATCH_END_UNSTAG: 63 WEST-EAST_PATCH_START_STAG: 1 WEST-EAST_PATCH_END_STAG: 64 SOUTH-NORTH_PATCH_START_UNSTAG: 1 SOUTH-NORTH_PATCH_END_UNSTAG: 51 SOUTH-NORTH_PATCH_START_STAG: 1 SOUTH-NORTH_PATCH_END_STAG: 52 BOTTOM-TOP_PATCH_START_UNSTAG: 1 BOTTOM-TOP_PATCH_END_UNSTAG: 34 BOTTOM-TOP_PATCH_START_STAG: 1 BOTTOM-TOP_PATCH_END_STAG: 35 GRID_ID: 2 PARENT_ID: 1 I_PARENT_START: 48 J_PARENT_START: 40 PARENT_GRID_RATIO: 3 DT: 15 CEN_LAT: -23.7047119140625 CEN_LON: -46.5030517578125 TRUELAT1: -23 TRUELAT2: -24 MOAD_CEN_LAT: -23.5499954223633 STAND_LON: -45 POLE_LAT: 90 POLE_LON: 0 GMT: 0 JULYR: 2011 JULDAY: 213 MAP_PROJ: 1 MAP_PROJ_CHAR: Lambert Conformal MMINLU: MODIFIED_IGBP_MODIS_NOAH NUM_LAND_CAT: 21 ISWATER: 17 ISLAKE: 21 ISICE: 15 ISURBAN: 13 ISOILWATER: 14 HYBRID_OPT: -1 ETAC: 0 ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- ncdf4 --- call from context --- ncdf4::nc_open(file) --- call from argument --- (!is.character(filename)) || (nchar(filename) < 1) --- R stacktrace --- where 1: ncdf4::nc_open(file) where 2 at test-wrf_get.R#19: wrf_get(file = f1, name = "E_CO") where 3: eval(code, test_env) where 4: eval(code, test_env) where 5: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) where 6: doTryCatch(return(expr), name, parentenv, handler) where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 9: doTryCatch(return(expr), name, parentenv, handler) where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 11: tryCatchList(expr, classes, parentenv, handlers) where 12: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) where 13: test_code(NULL, exprs, env) where 14: source_file(path, child_env(env), wrap = wrap) where 15: FUN(X[[i]], ...) where 16: lapply(test_paths, test_one_file, env = env, wrap = wrap) where 17: doTryCatch(return(expr), name, parentenv, handler) where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 19: tryCatchList(expr, classes, parentenv, handlers) where 20: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL }) where 21: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, wrap = wrap)) where 22: test_files(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package) where 23: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package, parallel = parallel) where 24: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") where 25: test_check("eixport") --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (filename, write = FALSE, readunlim = TRUE, verbose = FALSE, auto_GMT = TRUE, suppress_dimvals = FALSE, return_on_error = FALSE) { safemode = FALSE if (verbose) print(paste("nc_open: entering, ncdf4 package version", nc_version())) if ((!is.character(filename)) || (nchar(filename) < 1)) stop("Passed a filename that is NOT a string of characters!") rv <- list() if (write) rv$cmode <- 1 else rv$cmode <- 0 rv$id <- -1 rv$error <- -1 rv <- .C("R_nc4_open", as.character(filename), as.integer(rv$cmode), id = as.integer(rv$id), error = as.integer(rv$error), PACKAGE = "ncdf4") if (rv$error != 0) { if (return_on_error) { print(paste("Error in nc_open trying to open file", filename, "(setting rv$error TRUE and returning because return_on_error==TRUE)")) rv$error = TRUE return(rv) } else stop(paste("Error in nc_open trying to open file", filename, "(return_on_error=", return_on_error, ")")) } rv$error = FALSE if (verbose) print(paste("nc_open: back from call to R_nc4_open, ncid=", rv$id)) nc <- list(filename = filename, writable = write, id = rv$id, error = rv$error) attr(nc, "class") <- "ncdf4" am_windows = (length(grep("windows", .Platform$OS.type, ignore.case = TRUE)) != 0) am_64 = (length(grep("x64", .Platform$r_arch, ignore.case = TRUE)) != 0) nc$safemode = FALSE if (nc$safemode && (!is.na(safemode)) && (safemode == FALSE)) { print(paste("***************** W A R N I N G *****************************")) print(paste("You are running on Windows-64 but have specified to force the")) print(paste("safemode OFF. Safemode protects from KNOWN BUGS of the netcdf")) print(paste("library on Windows-64. If you force safemode off YOU MUST NEVER")) print(paste("HAVE MORE THAN ONE NETCDF FILE OPEN AT THE SAME TIME, or you")) print(paste("may get errors of the type that the ncdf4 operators access the")) print(paste("WRONG FILE. You are proceeding at your own risk!!")) print(paste("***************************************************************")) } if (!is.na(safemode)) nc$safemode = safemode nc$format = ncdf4_format(nc$id) if (verbose) print(paste("file", filename, "is format", nc$format)) nc$is_GMT = FALSE if (auto_GMT) { dimlen_xysize = ncdim_len(nc$id, "xysize") dimlen_side = ncdim_len(nc$id, "side") varid_dimension = ncvar_id(nc$id, "dimension") varid_spacing = ncvar_id(nc$id, "spacing") varid_z = ncvar_id(nc$id, "z") if ((dimlen_xysize != -1) && (dimlen_side != -1) && (varid_dimension != -1) && (varid_spacing != -1) && (varid_z != -1)) { varsize_dimension = ncvar_size(nc$id, varid_dimension) if ((length(varsize_dimension) == 1) && (varsize_dimension[1] == dimlen_side)) { varsize_spacing = ncvar_size(nc$id, varid_spacing) if ((length(varsize_dimension) == 1) && (varsize_dimension[1] == dimlen_side)) { varsize_z = ncvar_size(nc$id, varid_z) if ((length(varsize_z) == 1) && (varsize_z[1] == dimlen_xysize)) { nc$is_GMT = TRUE } } } } } groups <- list() groups[[1]] <- nc_get_grp_info(nc$id, "", nc$format) if (nc$format == "NC_FORMAT_NETCDF4") { gg <- nc_groups_below(groups[[1]], nc$format) for (i in nc4_loop(1, length(gg))) groups[[1 + i]] <- gg[[i]] } nc$groups <- groups nc$fqgn2Rindex <- list() for (i in 1:length(groups)) nc$fqgn2Rindex[[groups[[i]]$fqgn]] = i if (verbose) { print("Group info:") for (ig in 1:length(groups)) { print(paste("Group", ig, ": ", "name=", groups[[ig]]$name, "id=", groups[[ig]]$id, "fqgn= \"", groups[[ig]]$fqgn, "\"", "nvars=", groups[[ig]]$nvars, "ndims=", groups[[ig]]$ndims, "dimid=")) print(groups[[ig]]$dimid) } } nc$ndims <- 0 nc$natts <- 0 tot_nvars_inc_dimvars <- 0 for (ig in 1:length(groups)) { nc$ndims <- nc$ndims + nc$groups[[ig]]$ndims nc$natts <- nc$natts + nc$groups[[ig]]$natts tot_nvars_inc_dimvars <- tot_nvars_inc_dimvars + nc$groups[[ig]]$nvars } nc$dim <- list() nc$unlimdimid <- -1 dimnames <- character() global_dim_counter <- 0 for (ig in 1:length(groups)) { for (idim in nc4_loop(1, groups[[ig]]$ndims)) { dimid2use <- groups[[ig]]$dimid[idim] if (is.na(dimid2use)) { print(paste("Error, got a NA as a dimid2use ... group=", groups[[ig]]$name, " which has ndims=", groups[[ig]]$ndims)) print("Here are the dimids from the ncgroup object:") print(groups[[ig]]$dimid) if (return_on_error) { print(paste("Error in nc_open trying to open file", filename, "(setting rv$error TRUE and returning because return_on_error==TRUE)")) nc$error = TRUE return(nc) } else stop("Error, cannot have NAs as dimids!") } if (verbose) print(paste("nc_open: getting dim info for dim number", idim, "in group \"", groups[[ig]]$name, "\" dim ID=", dimid2use)) d <- ncdim_inq(groups[[ig]]$id, dimid2use) if (groups[[ig]]$name != "") d$name <- paste(groups[[ig]]$fqgn, "/", d$name, sep = "") d$group_index <- ig d$group_id <- groups[[ig]]$id d$id <- dimid2use tt <- ncvar_id(groups[[ig]]$id, nc4_basename(d$name)) d$dimvarid = ncdf4_make_id(id = tt, group_index = ig, group_id = groups[[ig]]$id, list_index = -1, isdimvar = TRUE) if (verbose) print(paste(".....dim name is", d$name, " id=", d$id, " len=", d$len, " dimvarid=", d$dimvarid$id)) if (d$dimvarid$id == -1) { if (!suppress_dimvals) d$vals <- 1:d$len d$units <- "" d$create_dimvar <- FALSE } else { if (verbose) print(paste("nc_open: getting dimvar info for dim ", d$name)) attv <- ncatt_get_inner(d$dimvarid$group_id, d$dimvarid$id, "units") if (attv$hasatt) d$units <- attv$value else d$units <- "" attv <- ncatt_get_inner(d$dimvarid$group_id, d$dimvarid$id, "calendar") if (attv$hasatt) d$calendar <- attv$value if (!suppress_dimvals) { if (d$unlim && (!readunlim)) d$vals <- rep(NA, d$len) else d$vals <- ncvar_get_inner(d$dimvarid$group_id, d$dimvarid$id, default_missval_ncdf4(), verbose = verbose) } d$create_dimvar <- TRUE } attr(d, "class") <- "ncdim4" global_dim_counter <- global_dim_counter + 1 if (verbose) { print("------------------------------") print("Here is new dim:") print(paste("Global index=", global_dim_counter, "name=", d$name, "len=", d$len, "unlim=", d$unlim, "id=", d$id, "dimvarid=", d$dimvarid$id, "units=", d$units)) print("------------------------------") } if (d$unlim && (nc$unlimdimid == -1)) nc$unlimdimid = global_dim_counter nc$dim[[global_dim_counter]] <- d dimnames[global_dim_counter] <- d$name if (verbose) print(paste(".......nc_open: done processing dim ", d$name)) } } attr(nc$dim, "names") <- dimnames if (verbose) { print("nc_open: setting dim$ to:") print(dimnames) } if (verbose) print(paste("nc_open: getting var info. Number of vars (INCLUDING dimvars)=", tot_nvars_inc_dimvars)) nc$nvars <- 0 nc$var <- list() varnames <- character() have_warned_noncompliant <- FALSE for (ig in 1:length(groups)) { for (ivar in nc4_loop(1, groups[[ig]]$nvars)) { name <- ncvar_name(groups[[ig]]$id, ivar - 1) if (verbose) print(paste("Working on group", ig, "(of", length(groups), "), var", ivar, "(of", groups[[ig]]$nvars, "), name=", name)) if (ncdim_id(groups[[ig]]$id, name) == -1) { if (verbose) print(paste("nc_open var loop: will process with group id=", groups[[ig]]$id, " varid=", ivar, " var name=", name)) v <- ncvar_inq(groups[[ig]]$id, ivar - 1) attr(v, "class") <- "ncvar4" nc$nvars <- nc$nvars + 1 v$group_index = ig v$id$list_index = nc$nvars if (groups[[ig]]$name != "") v$name <- paste(groups[[ig]]$fqgn, "/", v$name, sep = "") if ((nc$format == "NC_FORMAT_NETCDF4") || (nc$format == "NC_FORMAT_NETCDF4_CLASSIC")) { chunkrv = ncvar_inq_chunking(groups[[ig]]$id, ivar - 1, v$ndims) v$chunksizes = chunkrv$chunksizes v$storage = chunkrv$storage comprv = ncvar_inq_deflate(groups[[ig]]$id, ivar - 1) v$shuffle = comprv$shuffle if (comprv$deflate == 0) v$compression = NA else v$compression = as.integer(comprv$deflate_level) } else { v$chunksizes = NA v$storage = 1 v$shuffle = FALSE v$compression = NA } v$dims <- list() varunlim <- FALSE if (v$ndims > 0) { for (j in 1:v$ndims) { dimid2find = v$dimids[j] matchidx = -1 for (iidim in 1:nc$ndims) { if (nc$dim[[iidim]]$id == dimid2find) { matchidx = iidim break } } if (matchidx == -1) stop(paste("internal error, did not find dim with id=", dimid2find, "in dim list!")) v$dim[[j]] = nc$dim[[matchidx]] if (v$dim[[j]]$unlim) varunlim <- TRUE v$varsize <- append(v$varsize, v$dim[[j]]$len) } } v$unlim <- varunlim if ((nc$format != "NC_FORMAT_NETCDF4") && varunlim) v$storage = 2 found_mv <- FALSE v$make_missing_value <- FALSE mv <- ncatt_get_inner(groups[[ig]]$id, ivar - 1, "missing_value") if (mv$hasatt) { found_mv <- TRUE v$missval <- mv$value v$make_missing_value <- TRUE } else { mv <- ncatt_get_inner(groups[[ig]]$id, ivar - 1, "_FillValue") if (mv$hasatt) { found_mv <- TRUE v$missval <- mv$value v$make_missing_value <- TRUE } } if (!found_mv) { if ((v$prec == "float") || (v$prec == "double")) v$missval <- default_missval_ncdf4() else v$missval <- NA } if ((v$prec == "float") || (v$prec == "double")) { if (storage.mode(v$missval) == "character") { v$missval <- as.double(v$missval) if (!have_warned_noncompliant) { print(paste("WARNING file", filename, "is not compliant netCDF; variable", name, " is numeric but has a character-type missing value! This is an error! Compensating, but you should fix the file!")) have_warned_noncompliant <- TRUE } } } ao <- ncatt_get_inner(groups[[ig]]$id, ivar - 1, "add_offset") if (ao$hasatt) { v$hasAddOffset <- TRUE v$addOffset <- ao$value } else v$hasAddOffset <- FALSE sf <- ncatt_get_inner(groups[[ig]]$id, ivar - 1, "scale_factor") if (sf$hasatt) { v$hasScaleFact <- TRUE v$scaleFact <- sf$value } else v$hasScaleFact <- FALSE nc$var[[nc$nvars]] <- v varnames <- append(varnames, v$name) if (verbose) { print("-----------------------") print("Here is new var:") print(paste("name=", v$name, " group_id=", v$id$group_id, " id=", v$id$id, " ndims=", v$ndims, " prec=", v$prec)) print("size=") print(v$size) print("dimids=") print(v$dimids) } } } } if ((nc$nvars == 1) && nc$is_GMT) { } attr(nc$var, "names") <- varnames if (nc$safemode) { rv = .C("R_nc4_close", as.integer(nc$id), PACKAGE = "ncdf4") nc$id = -1 } if (verbose) print(paste("nc_open: leaving for ncid=", nc$id)) return(nc) } --- function search by body --- Function nc_open in namespace ncdf4 has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/eixport.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 19:44.88, 448.40 + 26.05