Skip to contents

uses PPrey values to determine Trophic level

Usage

est_trophic_level_from_params(
  prm_biol =
    "C:/Users/andrew.beet/Documents/myWork/githubRepos/neus-atlantis/currentVersion/at_biology.prm",
  fgs =
    "C:/Users/andrew.beet/Documents/myWork/githubRepos/neus-atlantis/currentVersion/neus_groups.csv",
  plottl = F
)

Arguments

prm_biol

Character String. Path to biology prm file (Atlantis)

fgs

Character String. Name of groups.csv file

plottl

Boolean. Plot the Trophic level to window. Default = F

Value

list

trophiclevel

dataframe. Species, year, trophic level

figuretl

ggplot2 object. trophic level bar plot by species

Details

Need to process detailed diet data frirst linux command line

zip up file

gzip -k neus_outputDetailedDietCheck.txt

then remove zeros and save ans another zip

zcat neus_outputDetailedDietCheck.txt.gz | awk 'NR > 1s=0; for (i=6;i<=NF;i++) s+=$i; if (s!=0)print' | gzip > DetDiet.gz

strip headers from original file

zcat neus_outputDetailedDietCheck.txt.gz | head -n1 | gzip > DetDietHead.gz

concatenate them

cat DetDietHead.gz DetDiet.gz > DetDiet2.gz