# NOT RUN {
# Example which generates an initial values object from an internal North Sea model but
# does not attempt to save it back to the Parameters folder of the model setup. Just
# run for 1 year in this example:
model <- e2e_read("North_Sea", "2003-2013")
results <- e2e_run(model, nyears=1)
new_initial <- e2e_extract_start(model,results,csv.output=FALSE)
new_initial
# Dummy example to illustrate the process of saving initial values
# data back into the model Param folder:
# Assumes that the model setup is held in models.path="Folder/Models". Replace this
# with your own relative path to your user library of models:
# model <- e2e_read("Modelname","Variantname",models.path="Folder/Models",model.ident="new")
# results <- e2e_run(model, nyears=30)
# new_initial <- e2e_extract_start(model,results,csv.output=TRUE)
# The new initial values file will be written back into Folder/Models/Param with
# the identitifer "new"
# }
Run the code above in your browser using DataLab