Simulation analysis#


This code assumes you named the VirtualFleet instance VFleet following the standard “Running a virtual fleet simulation”.

In order to look at the virtual floats trajectories you can read data directly from the output file:

ds = xr.open_zarr(VFleet.output)

You can quickly plot the last position of the floats:


You can extract a profile index from the trajectory file, after the VFleet simulation:


or create an Argo-like profile index:


or from any trajectory file using the utility function utilities.simu2index():

from virtualargofleet.utilities import simu2index, simu2csv
df = simu2index(xr.open_zarr("trajectory_output.zarr"))
# or to create the index file:
simu2csv("trajectory_output.zarr", index_file="output_ar_index_prof.txt")