-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_manage_scripts.r
42 lines (37 loc) · 2.29 KB
/
1_manage_scripts.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
# set 'path.nm' to user's working directory
path.nm <- '/users/noaa/papers/dhk/2022_propRec/3mar/mar23/'
setwd(paste(path.nm,sep=''))
library(dplyr) # used in '3_fshry.r'
library(data.table) # used in '8_contour_amlrsrv.r' and '10_contour_fsh_481.r'
juv.l <- 30 # krill length in mm defined as <= juveniles
# krill juv.l of 30, 35, 38, 40, 44 can be run without code modification
nareas <- 1 # no. sampling strata, must be 1 or 4
nlegs <- 1 # no. sampling legs, must be 1 or 2
nages <- 7 # number of age classes
site.nm <- c('COPA','CS')
geo <- c('481S','481N')
if(!dir.exists(paste('plots_',juv.l,'mm',sep=''))){
dir.create('propRec_csvs')
dir.create(paste('plots_',juv.l,'mm',sep=''))
}
path.s <- paste(path.nm,'r-scripts/',sep='')
path.dat <- paste(path.nm,'data/',sep='')
path.out <- paste(path.nm,'propRec_csvs/',sep='')
source(paste(path.s,'2_amlr_srv.r',sep='')) # amlr survey lengths, densities
# 'haul.lens.scaled': scaled to numbers captured
# 'haul.len.meas':unscaled measurements
# 'haul.len.dens': scaled to numbers captured and haul volume
source(paste(path.s,'2_amlr_srv2_dens.r',sep='')) # amlr 'propRec', 'alyr', 'haul.len.meas'
source(paste(path.s,'3_fshry.r',sep='')) # fishery Kmv data access awaiting CCAMLR approval
source(paste(path.s,'4_lter_adelie.r',sep='')) # Palmer adelies ('ade')
source(paste(path.s,'5_LTER_trwl.r',sep='')) # LTER trawls
rm(list= ls()[!(ls() %in% c('path.dat','path.out','path.nm','site.nm','haul.len.meas','geo',
'rec.prop.lter','i.mo','propRec.amlr','alyr','ade.m1.m','ade.m2.m',
'sam','ade','Kmv','fshry','yrs','yal.lens.meas','nages','nlegs',
'yal.lens.scaled','oc.srv.meas','oc.srv','nareas','juv.l','path.s',
'haul.len.scaled','lter.pRec','sqkm.all'))]) # save files for plotting
source(paste(path.s,'6_amlr_peng.r',sep='')) # AERD penguins
source(paste(path.s,'7_plot_propRec.r',sep='')) # plot proportional recruitments
source(paste(path.s,'8_contour_amlrsrv.r',sep='')) # survey contours
source(paste(path.s,'9_bivariate.r',sep='')) # propRec means X SDs all data sources
source(paste(path.s,'10_contour_fsh_481.r',sep=''))