README.md

Project Status Build Status

ReactiveAtlantis

ReactiveAtlantis is a R-package builded using the Shiny package as the main platform for the reactive programming approach.

ReactiveAtlantis has several tools that were created to help in the tuning, parameterization and analysis of the processes and parameters most often modified during the calibration of Atlantis (e.g. growth rate, predation, recruitment, Audzijonyte et al. 2017. Among the processes performed by this package are: Visualization and analysis of the input, output and initial conditions of an Atlantis model. Interactive modification of Atlantis configuration files. Simulation of new parameters to help in the calibration on an Atlantis model. Execution of a model skill assessment, to evaluate the performance of the model to reflect the observed data.

Getting Started

These instructions will give you access to use the R-package ReactiveAtlantis. If you have some problem for your installation, please let me know and I will try to solve it as soon as possible.

Prerequisites and installation

What things you need to install To run ReactiveAtlantis on R.

# install packages
install.packages('devtools')   ## you need to do this step just once
# running
library("devtools")
install_github('Atlantis-Ecosystem-Model/ReactiveAtlantis', force=TRUE, dependencies=TRUE)
library("ReactiveAtlantis")

Running ReactiveAtlantis

Compare outputs and Biomass visualization

nc.current  <- 'your_current_output.nc'
nc.old      <- 'your_previous_output.nc'
grp.csv     <- 'your_groups_definition_file.csv'
bgm.file    <- 'your_spatial_configuration_file.bgm'
cum.depths  <- c(0, 20, 50, 150, 250, 400, 650, 1000, 4300) ## This should be the cummulative depth of your model
## individual file
compare(nc.current, nc.out.old = NULL, grp.csv, bgm.file, cum.depths)
## compare to previuos run
compare(nc.current, nc.old, grp.csv, bgm.file, cum.depths)

Predation analysis from the Atlantis output

biom        <- 'your_BiomIndx.txt'
diet.file   <- 'your_DietCheck.txt'
bio.age     <- 'your_AgeBiomIndx.txt' ## optional file. just if you want to check the predation by age
grp.csv     <- 'your_groups_definition_file.csv'
## Predation by Age
predation(biom, grp.csv, diet.file, bio.age)
## No predation by Age
predation(biom, grp.csv, diet.file, bio.age = NULL)

Exploring predator-prey interactions from the initial conditions

prm.file    <- 'your_prm_file.prm'
nc.initial  <- 'your_initial_conditions.nc'
grp.csv     <- 'your_groups_definition_file.csv'
bgm.file    <- 'your_spatial_configuration_file.bgm'
cum.depths  <- c(0, 20, 50, 150, 250, 400, 650, 1000, 4300) ## This should be the cummulative depth of your model
feeding.mat(prm.file, grp.file, nc.initial, bgm.file, cum.depths)

Atlantis food web and trophic level composition

grp.csv     <- 'your_groups_definition_file.csv'
prm.file    <- 'your_prm_file.prm'
diet.file   <- 'your_DietCheck.txt'
food.web(diet.file, grp.file)
## optional you can explore the food web by polygon
food.web(diet.file, grp.file, diet.file.bypol)
## diet.file.bypol Detailed diet check file, this can be obtained as an extra output from Atlantis "DetailedDietCheck.txt". To get this file from Atlantis turn on the option "flagdietcheck" on the Run.prm file.

Growth of primary producers and limiting factors

nc.initial  <- 'your_initial_conditions.nc'
nc.current  <- 'your_current_output.nc'
grp.csv     <- 'your_groups_definition_file.csv'
prm.file    <- 'your_prm_file.prm'
growth.pp(nc.initial, grp.csv, prm.file, nc.current)

Analysis of recruitment and primary production

nc.initial  <- 'your_initial_conditions.nc'
nc.current  <- 'your_current_output.nc'
yoy.file    <- 'your_yoy_file.txt'
grp.csv     <- 'your_groups_definition_file.csv'
prm.file    <- 'your_prm_file.prm'
recruitment.cal(nc.initial, nc.current, yoy.file, grp.file, prm.file)

Harvest outputs and model skill assessment

catch.nc             <- 'your_output_CATCH.nc'
ext.catch.total      <- 'external_catch_time_serie.csv'
ext.catch.by.fleet   <- 'external_catch_time_serie_by_fleets.csv'
cum.depths  <- c(0, 20, 50, 150, 250, 400, 650, 1000, 4300) ## This should be the cummulative depth of your model
fsh.csv     <- 'your_fisheries_definition_file.csv'
bgm.file    <- 'your_spatial_configuration_file.bgm'
grp.csv     <- 'your_groups_definition_file.csv'
catch(grp.csv, fsh.csv, catch.nc, ext.catch.total, ext.catch.total)

Authors

License

This project is licensed under GPL3



Atlantis-Ecosystem-Model/ReactiveAtlantis documentation built on April 16, 2024, 6:27 a.m.