-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerateBenthosLandscapeOnNodes.R
457 lines (334 loc) · 24.4 KB
/
GenerateBenthosLandscapeOnNodes.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# GENERAL SETTINGS
args <- commandArgs(trailingOnly = TRUE)
general <- list()
if (length(args) < 2) {
if(.Platform$OS.type == "windows") {
general$application <- "testexample" # ...or myfish
general$main_path_gis <- file.path("C:","Users","fbas","Documents","GitHub","DISPLACE_input_gis", general$application)
general$main.path.ibm <- file.path("C:","Users","fbas","Documents","GitHub", paste("DISPLACE_input_", general$application, sep=''))
general$igraph <- 56 # caution: should be consistent with existing objects already built upon a given graph
do_plot <- TRUE
}
} else {
general$application <- args[1]
general$main_path_gis <- args[2]
general$main.path.ibm <- args[3]
general$igraph <- args[4] # caution: should be consistent with existing objects already built upon a given graph
do_plot <- FALSE
}
#if(general$application=="adriatic") name_GIS_file <- "Benthos_GSA17"
#if(general$application=="testexample") name_GIS_file <- "landscapes.tif"
#if(general$application=="testexample") name_GIS_file <- "biomc_rfmodel_Gogina_et_al_2016_Figure7_wgs84"
if(general$application=="testexample") name_GIS_file <- "habitat_landscapes" # this name used by the Objects Editor ui
cat(paste("START \n"))
## INFORM THE BENTHOS SPATIALLY ON NODES
# should be useful to model the dynamic of the benthic communities
# under different spatial fishing pressures
# obtain XXloss_after_one_passage_per_landscape_per_func_group.dat per metier
# per node
# 1. attach a marine landscape
# 2. attach benthos abundances
# 3. attach a mortality function
# 4. attach a recovery function
dir.create(file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep='')))
dir.create(file.path(general$main.path.ibm, "graphsspe"))
#load
coord <- read.table(file=file.path(general$main_path_gis, "GRAPH", paste("coord", general$igraph, ".dat", sep=""))) # build from the c++ gui
dd <- coord
coord <- as.matrix(as.vector(coord))
coord <- matrix(coord, ncol=3)
colnames(coord) <- c('x', 'y', 'harb')
if(do_plot) plot(coord[,1], coord[,2])
graph <- read.table(file=file.path(general$main_path_gis, "GRAPH", paste("graph", general$igraph, ".dat", sep=""))) # build from the c++ gui
graph <- as.matrix(as.vector(graph))
graph <- matrix(graph, ncol=3)
if(do_plot) segments(coord[graph[,1]+1,1], coord[graph[,1]+1,2], coord[graph[,2]+1,1], coord[graph[,2]+1,2], col=4) # CAUTION: +1, because c++ to R
cat(paste("Read graph...done\n"))
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##----------------------- OBTAIN A MARINE LANDSCAPE -------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
# the code is only provided as info here - better to use the DISPLACE GUI with Graph>Assign Landscape code
if(FALSE){
## FROM A SHAPE FILE
#------------------
# SHAPE-----------
#------------------
library(maptools)
anf <- function(x) as.numeric(as.character(x))
## load shape.......
landscapes <- readShapePoly(file.path(general$main_path_gis, "HABITATS", name_GIS_file),
proj4string=CRS("+proj=longlat +datum=WGS84") ) # probably need an update of rgdal here....
cat(paste("Read GIS shape file (this one must include a CATEGORY field)...done\n"))
coord <- cbind(x=anf(coord[,'x']), y=anf(coord[,'y']))
# convert to UTM
library(sp)
library(rgdal)
spo <- SpatialPoints(cbind(as.numeric(as.character(coord[,'x'])), as.numeric(as.character(coord[,'y']))),
proj4string=CRS("+proj=longlat +datum=WGS84"))
# use the magic 'over' function to see in which polygon it is located
idx <- over(spo, landscapes); #print(idx)
coord <- cbind.data.frame(as.data.frame(coord), landscapes_code=NA)
coord$landscapes_code <- as.character(idx$CATEGORY)
cat(paste("overlay...done\n"))
# assign 0 to the NA code
coord[is.na(coord$landscapes_code), 'landscapes_code'] <- 0
# a visual check
if(do_plot) plot(coord[,1], coord[,2], col=coord[,3])
# EXPORT FOR C++------------
write(coord[, 'landscapes_code'], file=file.path(general$main.path,"graphsspe", paste("coord", general$igraph,"_with_landscape.dat", sep='')), ncol=1)
nrow(coord)
ncol(coord)
cat(paste("Write coordXX_with_landscape.dat in /graphsspe...done\n"))
#----------------------------
}
if(FALSE){ # RASTER layer currently not handled by the DISPLACE Objects Editor
#------------------
# RASTER-----------
#------------------
library(maptools)
library(raster)
anf <- function(x) as.numeric(as.character(x))
## use point-raster overlay.......
library(raster)
landscapes <- raster(file.path(general$main_path_gis, "HABITATS", name_GIS_file)) # probably need an update of rgdal here....
coord <- cbind(x=anf(coord[,'x']), y=anf(coord[,'y']))
# convert to UTM
library(sp)
library(rgdal)
SP <- SpatialPoints(cbind(as.numeric(as.character(coord[,'x'])), as.numeric(as.character(coord[,'y']))),
proj4string=CRS("+proj=longlat +datum=WGS84"))
a_utm_zone <- "34"
coord <- cbind.data.frame(coord,
spTransform(SP, CRS(paste("+proj=utm +zone=",a_utm_zone," +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0", sep='')))) # convert to UTM
dd <- extract (landscapes, coord[,3:4]) # get the landscape on the coord points!
coord <- cbind(coord, landscapes_code=dd) # look at “Towards a representative MPA network in the Baltic Sea”.
# translate the coding, just for info...
bottom <- substr(coord$landscapes_code, 1,1)
photic <- substr(coord$landscapes_code, 2,2)
salinity <- substr(coord$landscapes_code, 3,3)
bottom_levels <- factor(bottom)
levels(bottom_levels) <- c('Bedrock', 'Hard Bottom', 'Sand', 'Hard Clay', 'Mud')
photic_levels <- factor(photic)
levels(photic_levels) <- c('Photic', 'Aphotic')
salinity_levels <- factor(salinity)
levels(salinity_levels) <- c('0-5psu', '5-7.5psu', '7.5-11psu', '11-18psu', '18-30psu', '>30psu')
coord <- cbind.data.frame (coord, landscape=paste(bottom_levels, photic_levels, salinity_levels, sep="_"))
# just for info...
percent_habitats <- round(table(coord$landscape)/sum(table(coord$landscape))*100, 2) # get an idea of the importance of a given landscape in terms of number of nodes over the total number of nodes
sum(percent_habitats) # should be 100
percent_habitats[order(percent_habitats, decreasing=TRUE)]
# assign 0 to the NA code
coord[is.na(coord$landscapes_code), 'landscapes_code'] <- 0
# EXPORT FOR C++------------
write(coord[, 'landscapes_code'], file=file.path(general$main.path.ibm, "graphsspe", paste("coord", general$igraph,"_with_landscape.dat", sep='')), ncol=1)
nrow(coord)
ncol(coord)
#----------------------------
} # end if raster
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##----------------------- OBTAIN A BIOMASS ON NODE -------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
# use the DISPLACE GUI with Graph>Assign Benthos Biomass
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##----------------------- OBTAIN A Number ON NODE -------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
# use the DISPLACE GUI with Graph>Assign Benthos Number
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
## FROM THE GRAPH file map
landscape_per_node <- read.table(file=file.path(general$main.path.ibm, "graphsspe",
paste("coord", general$igraph,"_with_landscape.dat", sep='')))
# translate the coding, CAUTION just a fake example here...
#bottom <- substr(as.numeric(as.character(landscape_per_node[,1])), 1,1)
#photic <- substr(as.numeric(as.character(landscape_per_node[,1])), 2,2)
#salinity <- substr(as.numeric(as.character(landscape_per_node[,1])), 3,3)
#bottom_levels <- factor(bottom)
#levels(bottom_levels) <- c('Deep', 'Not_deep')
#photic_levels <- factor(photic)
#levels(photic_levels) <- c('NA','Photic', 'Aphotic')
#salinity_levels <- factor(salinity)
#levels(salinity_levels) <- c('NA', '<30psu', '>30psu')
#landscape_per_node <- cbind.data.frame (landscape_per_node, landscape=paste(bottom_levels, photic_levels, salinity_levels, sep="_"))
codes <- unique(landscape_per_node[,1])
codes <- codes[order(codes)]
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##-------------- OBTAIN A RECOVERY FUNCTION PER FUNCTIONAL GROUP-------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
# logistic recovery rate (r, month-1) for habitat and functional group
# for the time being,
# creating files with fake copy/paste info
# and assuming at least two functional groups (--> will be a multimap in c++)
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "logistic_recovery_rates_per_month_per_funcgr.csv"))){
nbfuncgrps <-2
logistic_recovery_rates_per_month_per_funcgr <- cbind.data.frame(
landscape=rep(codes, each=nbfuncgrps), # assuming 2 func grps
logistic_recovery_rate_per_month=0.375 # month-1 (which is strictly equivalent to 0.375*12 for year-1)
)
write.table(logistic_recovery_rates_per_month_per_funcgr, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("logistic_recovery_rates_per_month_per_funcgr.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
recovery <- read.table(file.path(general$main_path_gis, "HABITATS", "logistic_recovery_rates_per_month_per_funcgr.csv"), header=TRUE, sep=";")
logistic_recovery_rates_per_month_per_funcgr <- recovery[,c('landscape', 'logistic_recovery_rate_per_month')]
write.table(logistic_recovery_rates_per_month_per_funcgr, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("logistic_recovery_rates_per_month_per_funcgr.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##-------------- INFORM A BENTHOS CARRYING CAPACITY K -----------------------##
##-------------- PER LANDSCAPE PER FUNCTIONAL GROUP -------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
# for the time being,
# creating files with fake copy/paste info
# and assuming at least two functional groups (--> will be a multimap in c++)
# biomass
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr.csv"))){
nbfuncgrps <-2
benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr <- cbind.data.frame(
landscape=rep(codes, each=nbfuncgrps), # assuming 2 func grps
benthos_biomass_carrying_capacity_K=500
)
write.table(benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
K <- read.table(file.path(general$main_path_gis, "HABITATS", "benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr.csv"), header=TRUE, sep=";")
benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr <- K[,c('landscape', 'benthos_biomass_carrying_capacity_K')]
write.table(benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("benthos_biomass_carrying_capacity_K_per_landscape_per_funcgr.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
# number
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "benthos_number_carrying_capacity_K_per_landscape_per_funcgr.csv"))){
nbfuncgrps <-2
benthos_number_carrying_capacity_K_per_landscape_per_funcgr <- cbind.data.frame(
landscape=rep(codes, each=nbfuncgrps), # assuming 2 func grps
benthos_number_carrying_capacity_K=500
)
write.table(benthos_number_carrying_capacity_K_per_landscape_per_funcgr, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("benthos_number_carrying_capacity_K_per_landscape_per_funcgr.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
K <- read.table(file.path(general$main_path_gis, "HABITATS", "benthos_number_carrying_capacity_K_per_landscape_per_funcgr.csv"), header=TRUE, sep=";")
benthos_number_carrying_capacity_K_per_landscape_per_funcgr <- K[,c('landscape', 'benthos_number_carrying_capacity_K')]
write.table(benthos_number_carrying_capacity_K_per_landscape_per_funcgr, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("benthos_number_carrying_capacity_K_per_landscape_per_funcgr.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##------------------CREATE ONE FILE .dat PER METIER FOR-----------------------##
##--------------------LOSS AFTER ONE PASSAGE----------------------------------##
##----------------------PER MARINE LANDSCAPE----------------------------------##
##----------------------------------------------------------------------------##
# for the time being,
# creating files with fake copy/paste info
# and assuming at least two functional groups (--> will be a multimap in c++)
# reuse the exported metier names in GenerateVesselConfigFiles.R
metier_names <- read.table(
file=file.path(general$main.path.ibm, paste("metiersspe_", general$application, sep=''), "metier_names.dat"),
header=TRUE)
max_met <- max(as.numeric(metier_names[,1]))
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "prop_loss_on_habitat_after_one_passage_per_metier_per_sz.csv"))){
for(met in 0: max_met){
loss_after_one_passage_this_metier <- cbind.data.frame(
landscape=rep(codes, each=2),
loss_after_one_passage=-0.79
)
write.table(loss_after_one_passage_this_metier, file=file.path(general$main.path.ibm, paste("metiersspe_", general$application, sep=''),
paste(met,"loss_after_one_passage_per_landscape_per_func_group.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
} else{
loss <- read.table(file.path(general$main_path_gis, "HABITATS", "prop_loss_on_habitat_after_one_passage_per_metier_per_sz.csv"), header=TRUE, sep=";")
for(met in 0: max_met){
loss_after_one_passage_this_metier <- loss[loss$metier==met, c('landscape', 'loss_after_one_passage')]
write.table(loss_after_one_passage_this_metier, file=file.path(general$main.path.ibm, paste("metiersspe_", general$application, sep=''),
paste(met,"loss_after_one_passage_per_landscape_per_func_group.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
}
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##------------------CREATE ONE FILE .dat FOR ESTIMATES OF---------------------##
##--------------------OF PROP BIOMASS OR NUMBER PER CELL PER FUNCTIONAL GROUP-##
##----------------------PER MARINE LANDSCAPE----------------------------------##
##----------------------------------------------------------------------------##
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "prop_funcgr_biomass_per_node_per_landscape.csv"))){
nbfuncgrps <- 2
prop_funcgr_biomass_per_node_per_landscape <- cbind.data.frame(landscape=rep(codes, each=nbfuncgrps), prop_funcgr_per_node=0.5) # sum to 1 per node per landscape
write.table(prop_funcgr_biomass_per_node_per_landscape, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("prop_funcgr_biomass_per_node_per_landscape.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
prop_funcgr_biomass_per_node_per_landscape <- read.table(file.path(general$main_path_gis, "HABITATS", "prop_funcgr_biomass_per_node_per_landscape.csv"), header=TRUE, sep=";")
write.table(prop_funcgr_biomass_per_node_per_landscape, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("prop_funcgr_biomass_per_node_per_landscape.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "prop_funcgr_number_per_node_per_landscape.csv"))){
nbfuncgrps <- 2
prop_funcgr_number_per_node_per_landscape <- cbind.data.frame(landscape=rep(codes, each=nbfuncgrps), prop_funcgr_per_node=0.5) # sum to 1 per node per landscape
write.table(prop_funcgr_number_per_node_per_landscape, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("prop_funcgr_number_per_node_per_landscape.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
prop_funcgr_number_per_node_per_landscape <- read.table(file.path(general$main_path_gis, "HABITATS", "prop_funcgr_number_per_node_per_landscape.csv"), header=TRUE, sep=";")
write.table(prop_funcgr_number_per_node_per_landscape, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("prop_funcgr_number_per_node_per_landscape.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##------------------CREATE ONE FILE .dat FOR ESTIMATES OF---------------------##
##--------------------MEAN WEIGHT PER FUNCTIONAL GROUP-##
##----------------------PER MARINE LANDSCAPE----------------------------------##
##----------------------------------------------------------------------------##
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "meanw_funcgr_per_landscape.csv"))){
nbfuncgrps <- 2
meanw_funcgr_per_landscape <- cbind.data.frame(landscape=rep(codes, each=nbfuncgrps), meanweight_funcgr_per_node=30) # gram per sq meter
write.table(meanw_funcgr_per_landscape, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("meanw_funcgr_per_landscape.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
meanw_funcgr_per_landscape <- read.table(file.path(general$main_path_gis, "HABITATS", "meanw_funcgr_per_landscape.csv"), header=TRUE, sep=";")
write.table(meanw_funcgr_per_landscape, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("meanw_funcgr_per_landscape.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
##----------------------------------------------------------------------------##
##----------------------------------------------------------------------------##
##------------------INFORM DISPLACE HARVEST FUNCTION WITH A SPECIFIC FACTOR---##
##--------------------LINKED TO HABITAT TYPE BEING VISITED -------------------##
##----------------------i.e. DELTA PARAMETERS PER MARINE LANDSCAPE------------##
##----------------------------------------------------------------------------##
# (caution: give the order for naming stocks in integer from 0 to n-1)
spp_table <- read.table(file=file.path(general$main_path_gis, "POPULATIONS",
paste("pop_names_", general$application,".txt",sep='')), header=TRUE)
spp <- as.character(spp_table$spp)
cat(paste("Reading the stock names in", paste(general$main_path_gis, "POPULATIONS",
paste("pop_names_", general$application,".txt",sep='')),"....done \n"))
nbpops <- length(spp)
if(!file.exists(file.path(general$main_path_gis, "HABITATS", "habitat_deltas_per_pop.csv"))){
# populate with 0 as default value
habitat_deltas_per_pop <- cbind.data.frame(landscape=rep(codes, each=nbpops), habitat_deltas_per_pop=0)
# harvest function parameter for habitat effect (if 0=> no effect)
write.table(habitat_deltas_per_pop, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("habitat_deltas_per_pop.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
} else{
habitat_deltas_per_pop <- read.table(file.path(general$main_path_gis, "HABITATS", "habitat_deltas_per_pop.csv"), header=TRUE, sep=";")
write.table(habitat_deltas_per_pop, file=file.path(general$main.path.ibm, paste("benthosspe_", general$application, sep=''),
paste("habitat_deltas_per_pop.dat", sep='')), col.names=TRUE, row.names=FALSE, quote=FALSE)
}
cat(paste(".....stored in", general$main.path.ibm, "/benthossspe \n"))
cat(paste(".....done\n"))