View source: R/atlantisfmsy_simurestart.R
atlantisfmsy_restart | R Documentation |
In case of an interruption of atlantisfmsy_simu
,
this function will restart the Fmsy estimation protocol where it was
stopped. It will first look if all the condition to run the simulations are
met, then look for the last value of F simulated, and then restart the
function atlantisfmsy_simu
.
atlantisfmsy_restart( func_grp, folder_path, model_path, exe_name, fmax, last_run = NULL, batch_file = NULL )
func_grp |
The code of the Atlantis functional group for which Fmsy will be estimated. |
folder_path |
The working directory: where the Fmsy simulations will be run and stored. |
model_path |
The directory of the calibrated model (containing all the
parameters files and one bach file. Forcing files can be stored in a direct
parent directory of model_path). WARNING: Only working if the forcing
folder is in the main model directory |
exe_name |
The name of the atlantis executable you used (ex: atlantismain, atlantisNew). |
fmax |
The maximal value of F the simulation is going to test in y-1.
WARNING: only work if |
last_run |
The name of the output file of the last simulation run before
|
batch_file |
The name of the batch/shell file with extension you are using
to run your model. If not provided, the function will search for the unique
batch file in your |
fmsy
The dataframe containing all the values of F (sum of mFC
parameter value in y-1) tested and the average yearly catch of the 5 last
years of simulation. As well, a message with the Fmsy value for the
Atlantis functional group considered is printed and all the simulation
necessary to estimate the Fmsy are stored in the folder_path.
This doesn't work if the files have been transfered to another computer
because the date of file creation change and this date is used to determine
the last simulated F value (see atlantis_lastsimu
). If it is
the case, you have to specify a value in the parameter last_run
.
atlantis_fgrpon
checking if the functional group is
active, atlantis_paraselect
for parameters file selection,
atlantis_openfile
to open a parameters file and select a
parameter, atlantis_lastsimu
to find the last F value tested,
atlantisfmsy_completion
to check if Fmsy has been reached,
atlantisfmsy_simu
to run the simulation to find the Fmsy,
str_split_fixed
to split a chain of characters,
ex_number
to extract number from a chain of
characters, nc_open
to open netCDF4 files,
ncvar_get
to extract variables from netCDF4 files,
nc_close
to close netCDF4 files,
write.table
to write table on the drive, and
read.table
to open table stored in text files (.txt,
.csv ...).
atlantisfmsy_restart("COD", "C:/Atlantis/AtlantisEEC", "C:/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantismain", 4) atlantisfmsy_restart("COD", "/home/Atlantis/AtlantisEEC", "/home/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantisNew", 4) atlantisfmsy_restart("COD", "C:/Atlantis/AtlantisEEC", "C:/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantismain", 4, "MSY_COD_F012.nc", "runAtlantis.bat") atlantisfmsy_restart("COD", "/home/Atlantis/AtlantisEEC", "/home/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantisNew", 4, "MSY_COD_F012.nc", "runAtlantis.sh") ## Not run: atlantisfmsy_restart("COD", "C:/Atlantis/AtlantisEEC", "C:/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantismain", 10) ## End(Not run) ## Not run: atlantisfmsy_restart("COD", "/home/Atlantis/AtlantisEEC", "/home/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantisNew", 10) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.