Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions atlantis/PreRules.am
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,26 @@ endif
# AM_CFLAGS += -D SS3_LINK_ENABLED -I$(top_srcdir)/atSS3Link/include
#endif

if RASSESS_LINK_ENABLED
AM_CFLAGS += -D RASSESS_LINK_ENABLED

# NOTE: nested if statments
# For the R links
# A working R installation is required.
# R must have been built with the '--enable-R-shlib' option enabled to provide the R shared library
# Ensure the R_HOME environment variable is set appropriately
#
# R_HOME = $(shell R RHOME)
# on Ubuntu Linux

if OS_LINUX
R_HOME = /usr/lib/R
R_BASE = /usr/lib/R
R_BASE = /usr/lib/R
R_HOME = /usr/lib/R
endif
# on OS X

if OS_MACOS
R_BASE = /Library/Frameworks/R.framework/Resources
R_HOME = /Library/Frameworks/R.framework/Resources
R_BASE = /Library/Frameworks/R.framework/Resources
R_HOME = /Library/Frameworks/R.framework/Resources
endif

AM_CFLAGS += -I$(R_BASE)/include -I/usr/share/R/include
LIBS += -L$(R_BASE)/lib -lR
endif
if RASSESS_LINK_ENABLED
AM_CFLAGS += -D RASSESS_LINK_ENABLED
AM_CFLAGS += -I$(R_BASE)/include -I/usr/share/R/include
LIBS += -L$(R_BASE)/lib -lR
endif
1 change: 1 addition & 0 deletions atlantis/atecology/atprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,7 @@ void Calculate_Catch(MSEBoxModel *bm, BoxLayerValues *boxLayerInfo, FILE *llogfp
if (FunctGroupArray[guild].isVertebrate == TRUE) {
FunctGroupArray[guild].SizeNumCaught[cohort][nf][bm->current_box] += bm->FishingResults[nf][CatchAtAge_result_id];
FunctGroupArray[guild].SizeNumDiscard[cohort][nf][bm->current_box] += bm->FishingResults[nf][DiscardsAtAge_result_id];
FunctGroupArray[guild].SizeCaught[cohort][nf][bm->current_box] += bm->FishingResults[nf][Catch_result_id];
}
} else {
bm->RecCatch[bm->current_box][guild][nf] += bm->FishingResults[nf][Catch_result_id];
Expand Down
5 changes: 4 additions & 1 deletion atlantis/atlantisUtil/atUtilGroupIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ int Util_Read_Functional_Group_XML(MSEBoxModel *bm, char *fileName, FILE *llogfp
FunctGroupArray[i].X_RS = Util_Alloc_Init_1D_Double(FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].RAssessSpringSurvey = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].RAssessAutumnSurvey = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);

FunctGroupArray[i].RAssessSpringSurveySize = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].RAssessAutumnSurveySize = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].min_wgt = Util_Alloc_Init_1D_Double(FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].max_wgt = Util_Alloc_Init_1D_Double(FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].rolling_wgt = Util_Alloc_Init_2D_Double(bm->K_rolling_cap_num + 1, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
Expand Down Expand Up @@ -1289,6 +1290,8 @@ void Free_Functional_Group_Memory(MSEBoxModel *bm) {
free4d(FunctGroupArray[i].boxPopRatio);
free2d(FunctGroupArray[i].RAssessSpringSurvey);
free2d(FunctGroupArray[i].RAssessAutumnSurvey);
free2d(FunctGroupArray[i].RAssessSpringSurveySize);
free2d(FunctGroupArray[i].RAssessAutumnSurveySize);
free1d(FunctGroupArray[i].min_wgt);
free1d(FunctGroupArray[i].max_wgt);
free2d(FunctGroupArray[i].rolling_wgt);
Expand Down
3 changes: 3 additions & 0 deletions atlantis/atlantisUtil/include/atFunctGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ typedef struct {
double ***SizeCaught; /**< Sampled catch - size in catch */
double **RAssessSpringSurvey; /**< Spring survey abundance - for RAssess */
double **RAssessAutumnSurvey; /**< Autumn survey abundance - for RAssess */
double **RAssessSpringSurveySize; /**< Spring survey size - for RAssess */
double **RAssessAutumnSurveySize; /**< Autumn survey size - for RAssess */


/* Used in tracking informaiton for calcualting system cap in fisheries */
double *min_wgt;
Expand Down
Loading