CMSY - Linbojun99/faofishingreport GitHub Wiki

CMSY++资源评估 · CMSY++

本包内置官方CMSY++代码、神经网络和用户手册(Froese et al. 2021, 2023),用于主要物种的仅基于渔获量的资源评估。The official CMSY++ code, neural network and user guide are bundled.

详细说明 Full guide:CMSY++资源评估(English)

⚠️ 免责说明与来源 · Disclaimer and source

CMSY++由Rainer Froese等人开发(Froese et al. 2021, 2023)。**本包与CMSY++的作者无关联,也未得到其认可。**本包内置的是作者发布的2021年3月版原始文件(GEOMAR OceanRep,记录52147,CC BY 4.0),同样的代码也发布在GitHub:https://github.com/SISTA16/cmsyPlusPlus。cmsy_run()运行的是它的副本,修改都列在每个运行文件夹的code_changes.csv中(操作系统设置、不自动安装R包),不改变方法本身。方法上的问题请咨询CMSY++的作者;本包运行时的问题请提交到faofishingreport的Issues。FAO数据只有渔获量,评估结果仅供参考,需由使用者自行核对和解释。

CMSY++ was developed by Rainer Froese and colleagues. faofishingreport is not affiliated with or endorsed by the authors of CMSY++. The package bundles their unmodified March 2021 release (GEOMAR OceanRep 52147, CC BY 4.0), also on GitHub at https://github.com/SISTA16/cmsyPlusPlus; cmsy_run() runs a copy with the changes listed in code_changes.csv, which leave the method unchanged. Results from FAO catch data are indicative; users are responsible for checking and interpreting them.

1. 准备 · Set up

cmsy_setup()          # 安装R包,下载并打开匹配的JAGS安装程序
cmsy_system()         # 检查R、JAGS和R包
cmsy_jags_versions()  # 各R版本对应的JAGS和rjags版本
系统 System R版本 JAGS安装程序 Installer
Windows 4.5或4.6 JAGS-4.3.2.exe
Windows 4.2至4.4 JAGS-4.3.1.exe
macOS 4.3及以后 JAGS-4.3.2.pkg
macOS 4.2 JAGS-4.3.1.pkg
Linux 任意 any 包管理器(如apt-get install jags)

以上均与CRAN上的rjags 4配合使用。JAGS 5.0.0(jags = "latest")需要rjags 5-3(从SourceForge安装)。All work with rjags 4 from CRAN.

2. 一键评估 · One call

res <- cmsy_area("Atlantic, Northeast", top = 10)   # 渔获量最大的10个物种
res <- cmsy_area("Atlantic, Northeast", species = c("Gadus morhua", "大西洋鳕", "COD"))

结果按渔区保存在cmsy_areas/<渔区>/:输入文件、各种群的运行结果、图表(分析图、管理图、Kobe图等)、预测和表格。Results are saved per area in cmsy_areas/<area>/.

3. 分步运行 · Step by step

步骤 Step 函数 Function
r先验 Priors cmsy_priors()
输入文件 Input cmsy_input()
设置 Settings cmsy_defaults()
运行 Run cmsy_run()
图表 Charts cmsy_plot()
MCMC 收敛 Convergence cmsy_mcmc()
预测 Forecast cmsy_forecast()
比较 Compare cmsy_compare()
表格 Tables cmsy_tables()
来源 Sources cmsy_sources()

4. 网站示例 · Examples on the website

CMSY++文章以东北大西洋(27区)渔获量最大的30个种群为例,并详细展示一个状态良好的种群(Northern prawn,Pandalus borealis)和一个过度捕捞的种群(毛鳞鱼)。The CMSY++ article uses the 30 main stocks of area 27, with a healthy (northern prawn) and an overfished stock (capelin) in detail.

5. 在报告中 · In the Word report

fao_report(27, cmsy = TRUE)评估前top_n个物种(或cmsy_top),报告最后一部分为资源评估,附录给出生物学参考点、先验及其来源;结果保存在报告旁的cmsy/中,可用cmsy = readRDS("cmsy/<area>/cmsy_result.rds")重复使用而不必重新运行。

6. 运行状态与设置 · Run status and settings

  • result$summary$run_status(0.7.0起):"ok"为运行完成;"partial"为主分析已保存结果、但之后的步骤(如回顾性分析)出错或超时;"failed"和"timeout"没有结果。exit列记录运行是怎样结束的,超时的进程会被终止。图表、预测、表格和报告使用"ok"和"partial"的结果。run_status is "ok", "partial" (main analysis saved, a later step failed or timed out), "failed" or "timeout"; exit says how the run ended.
  • sigmaR和ni在CMSY++16.R中有赋值但从未使用(模型的过程误差由先验itau2 ~ dgamma(4, 0.01)估计),因此cmsy_defaults()标为"not used",cmsy_run(settings = )不能修改。敏感性分析可改用CV.C等实际使用的设置。sigmaR and ni are set but never used by CMSY++16.R, so they cannot be changed.
  • B/k和r先验须同时给出上下限(CMSY++只在两者都给出时使用先验),B/k在0到1之间,中间年先验需要int.yr。B/k and r priors must be given as pairs of bounds.
  • 运行完成不等于评估经过核实:神经网络给出的B/k先验"may not be appropriate for your stock"(CMSY++用户手册),请逐个种群核对,必要时在cmsy_input(priors = )中自行设定。A finished run is not a validated assessment; check the B/k priors stock by stock.
⚠️ **GitHub.com Fallback** ⚠️