You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the spearfish is yielding errors solely for OHC and HYCOM likelihood calculations. I tried removing days with only a surface layer (depth = 0 m) PDT observation but that didn't solve it.
The OHC error reads:
Error in { : task 8 failed - "newsplit: out of vertex space"
The HYCOM error reads:
Error in { :
task 8 failed - "C stack usage 8012680 is too close to the limit"
MWE below....
dir <- '~/Google Drive/Shared drives/MPG_WHOI/data/shortbill_spearfish/MiniPAT/'
#Read in metadata
meta <- read.csv('add_shortbillspearfish_meta.csv',header=T)
## format dates
meta$time_coverage_start <- lubridate::parse_date_time(meta$time_coverage_start, orders='Ymd HMS', tz='UTC')
meta$time_coverage_end <- lubridate::parse_date_time(meta$time_coverage_end, orders='Ymd HMS', tz='UTC')
fish <- list.files(dir)
fish <- fish[-c(8,9)]
i <- 5 #spearfish PTT 227133
fishID <- fish[i] # specify the individual
data_dir <- paste(dir, fishID, sep='')
#### 3.1 Load and prepare the tag data ####
# SET START/END LOCATIONS iniloc is dataframe containing cols: day, month,
# year, lat, lon and rows: start, end
meta.i <- which(meta$ptt == fishID)
iniloc <- data.frame(matrix(c(day(meta[meta.i,"time_coverage_start"]), month(meta[meta.i,"time_coverage_start"]), year(meta[meta.i,"time_coverage_start"]), meta$geospatial_lat_start[meta.i], meta$geospatial_lon_start[meta.i], #start
day(meta[meta.i,"time_coverage_end"]), month(meta[meta.i,"time_coverage_end"]), year(meta[meta.i,"time_coverage_end"]), meta$geospatial_lat_end[meta.i], meta$geospatial_lon_end[meta.i]), #end
nrow = 2, ncol = 5, byrow = T))
names(iniloc) <- list("day", "month", "year", "lat", "lon")
tag <- as.POSIXct(paste(iniloc[1, 1], "/", iniloc[1, 2], "/", iniloc[1, 3],
sep = ""), format = "%d/%m/%Y", tz = "UTC")
pop <- as.POSIXct(paste(iniloc[2, 1], "/", iniloc[2, 2], "/", iniloc[2, 3],
sep = ""), format = "%d/%m/%Y", tz = "UTC")
# VECTOR OF DATES FROM DATA. THIS WILL BE THE TIME STEPS, T, IN THE
# LIKELIHOODS
dateVec <- seq.POSIXt(tag, pop, by = "24 hours")
#### 3.1.2 Depth-Temperature Data ####
pdtFile <- paste(data_dir,paste(fishID,"-PDTs.csv",sep=""),sep="/")
pdt <- read.wc(pdtFile, type = "pdt", tag = tag, pop = pop, verbose = T)
pdt <- pdt[, c("Date", "Depth", "MinTemp", "MaxTemp")]
#### 3.3.3 3D Depth-Temperature Likelihood ####
# OCEAN HEAT CONTENT (INTEGRATED PDTs)
if (!file.exists(paste0(data_dir, "/L.ohc.rds"))) {
L.ohc <- calc.ohc.par(pdt, filename = "hycom", ohc.dir = hycom.dir, dateVec = dateVec,
isotherm = "", use.se = T, ncores = 8)
saveRDS(L.ohc,paste0(data_dir, "/L.ohc.rds"))
} else {L.ohc <- readRDS(paste0(data_dir, "/L.ohc.rds"))}
# DEPTH-TEMP LEVELS
if (!file.exists(paste0(data_dir, "/L.hycom.rds"))) {
L.hycom <- calc.hycom.par(pdt, filename = "hycom", hycom.dir = hycom.dir, dateVec = dateVec,
use.se = T, ncores = 8)
saveRDS(L.hycom,paste0(data_dir, "/L.hycom.rds"))
} else {L.hycom <- readRDS(paste0(data_dir, "/L.hycom.rds"))}
I believe I fixed this in the last few months but its possible its a local change that has not yet been pushed to github. Try the following and remove any days that have <=3 bins. This is an issue because we use regression to predict at the appropriate depth levels to match HYCOM, which obviously fails with too few data points.
One of the spearfish is yielding errors solely for OHC and HYCOM likelihood calculations. I tried removing days with only a surface layer (depth = 0 m) PDT observation but that didn't solve it.
The OHC error reads:
Error in { : task 8 failed - "newsplit: out of vertex space"
The HYCOM error reads:
Error in { :
task 8 failed - "C stack usage 8012680 is too close to the limit"
MWE below....
add_shortbillspearfish_meta.csv
The text was updated successfully, but these errors were encountered: