Running using param. dict.#

[This notebook is distributed as part of OceanTracker’s source code oceantracker/tutorials_how_to/]

Notebook A) minimal example showed how to set parameters and run using the helper methods. Originally, the helper methods where added to offer a similar configuration interface to OpenDrift. Alternatively you can configure OceanTracker by either by:

  1. defining the parameters within a python dictionary {},

  2. creating a json file or by

  3. creating a yaml file

The json or yaml files follow the same structure as the python dictionary.

When using configuration files, we can easily run OceanTracker from the command line which comes in handy when we would like to e.g. run oceantracker on a webserver.

# Notes for debugging if the scripts below fail:
# * These scripts assume that you already installed oceantracker. If you didn't take a look at https://oceantracker.github.io/oceantracker/_build/html/info/installing.html
# * Paths in this directory are relative to the location of the ipython notebook.
#   I.e. On Linux or Mac, running a cell with "!ls" should return a list containing the notebook you are running.

# Checks if the hindcast data is available and downloads them if not
from oceantracker.util.download_data import download_hindcast_data_for_tutorials
download_hindcast_data_for_tutorials()
Hindcast data found locally at ./demo_hindcast

Using the parameter dictionary to run Oceantracker#

params = {
    # "global" parameters
    "output_file_base": "param_test1",  # name used as base for output files
    "root_output_dir": "output",  #  output is put in dir   'root_output_dir'/'output_file_base'
    "time_step": 120,  #  2 min time step as seconds
    # adding the reader to load the hydrodynamical model output
    "reader": dict(
        input_dir="./demo_hindcast/schsim3D",  # folder to search for hindcast files, sub-dirs will, by default, also be searched
        file_mask="demo_hindcast_schisim3D*.nc",  # the file mask of the hindcast files
    ),
    # add a list of release groups, the release locations from two points,
    # particle_release_groups are a list of one or more release groups
    # (ie locations where particles are released at the same times and locations)
    "release_groups": [
        {
            # "class_name": "PointRelease",
            # if no class_name is given, a PointRelease assumed
            "name": "my_release_point",  # optional name to refer to in code
            "points": [
                [1595000, 5482600],
                [1599000, 5486200],
            ],  # must be an N by 2 or 3 or list, convertible to a numpy array
            "release_interval": 3600,  # seconds between releasing particles
            "pulse_size": 10,  # number of particles released at each release_interval
        },
        {
            "class_name": "PolygonRelease",  # use a polygon release
            "points": [
                [1597682, 5489972],
                [1598604, 5490275],
                [1598886, 5489464],
                [1597917, 5489000],
                [1597300, 5489000],
                [1597682, 5489972],
            ],
            "release_interval": 7200,  # seconds between releasing particles
            "pulse_size": 20,  # number of particles released each release_interval
        },
    ],
    "velocity_modifiers": [
        # Here we add sinking velocity, in the form of a terminal velocity to represent
        # particles with a negative buoyency
        {
            "name": "fall_velocity",  # optional name
            "class_name": "TerminalVelocity",
            "value": -0.001,
            "variance": 0.0002,
        }
    ],
    "resuspension": {
        # This defines the critical friction velocity that is used to resuspend particles
        # that have settled on the bottom
        "critical_friction_velocity": 0.005
    },
}


# We write these parameters to disk for future use below
from oceantracker.util import json_util, yaml_util

json_util.write_JSON("./example_param_files/param_test1.json", params)
yaml_util.write_YAML("./example_param_files/param_test1.yaml", params)

### Show parameters in yaml format

yaml format has no brackets/braces and relies on tab indenting to nest items

# show the params in yaml format
import yaml
p = yaml_util.read_YAML('./example_param_files/param_test1.yaml')
print( yaml.dump(p))
output_file_base: param_test1
reader:
  file_mask: demo_hindcast_schisim3D*.nc
  input_dir: ./demo_hindcast/schsim3D
release_groups:
- name: my_release_point
  points:
  - - 1595000
    - 5482600
  - - 1599000
    - 5486200
  pulse_size: 10
  release_interval: 3600
- class_name: PolygonRelease
  points:
  - - 1597682
    - 5489972
  - - 1598604
    - 5490275
  - - 1598886
    - 5489464
  - - 1597917
    - 5489000
  - - 1597300
    - 5489000
  - - 1597682
    - 5489972
  pulse_size: 20
  release_interval: 7200
resuspension:
  critical_friction_velocity: 0.005
root_output_dir: output
time_step: 120
velocity_modifiers:
- class_name: TerminalVelocity
  name: fall_velocity
  value: -0.001
  variance: 0.0002

Run OceanTracker from parameters#

There are several ways to run OceanTracker

  1. with python

    • using the oceantracker “helper”class (ot = OceanTracker())

    • or by defining all the paramters in a python dictionary that is then passed to oceantrackers run() method (see below)

  2. or without python

    • by running it directly from the command line using a json/yaml parameter file

Note: There are many ways to run the python code, eg. with IDE like Pycharm, Visual Studio Code. It can also, as we do here, be run in iPython notebooks. However the way notebooks are implemented can sometimes result in issues. E.g.: - errors when running Oceantracker a second time or other unexpected behavior, due to shared memory space. This can generally be fixed by reloading the kernel

# run oceantracker using param dict built in cells above
from oceantracker import main

case_info_file_name = main.run(params)
# case_info file is the name of a json file useful in plotting results
prelim: Starting package set up
helper:  Python version: 3.11.14 | packaged by conda-forge | (main, Oct 22 2025, 22:46:25) [GCC 14.3.0]
helper: ----------------------------------------------------------------------------------------------------
helper: OceanTracker version 0.5.2.55  starting setup helper "main.py":
helper: Strong warning >>> Parameter "output_file_base" is deprecated and will be deleted in future versions
                            hint: Use of "root_output_dir" and "output_file_base" will be removed in future versions, use
                                                            "run_output_dir" instead
                                            trace: merge_params_with_defaults (49) < _build_working_params (269) < _do_setup (129) < run
                                                            (39) < run (19) < run_code (3701) <        run_ast_nodes (3641) < run_cell_async (3400) <
                                                            _pseudo_sync_runner (128) < _run_cell (3178) < run_cell (3123) < run_cell (663) < do_execute
                                                            (458) <        execute_request (827) < execute_request (366) < dispatch_shell (471) <
                                                            shell_main (614) < _run (84) < _run_once (1936) < run_forever (608) <        start (211) <
                                                            start (758) <
helper: Strong warning >>> Parameter "root_output_dir" is deprecated and will be deleted in future versions
                            hint: Use of "root_output_dir" and "output_file_base" will be removed in future versions, use
                                                            "run_output_dir" instead
                                            trace: merge_params_with_defaults (49) < _build_working_params (269) < _do_setup (129) < run
                                                            (39) < run (19) < run_code (3701) <        run_ast_nodes (3641) < run_cell_async (3400) <
                                                            _pseudo_sync_runner (128) < _run_cell (3178) < run_cell (3123) < run_cell (663) < do_execute
                                                            (458) <        execute_request (827) < execute_request (366) < dispatch_shell (471) <
                                                            shell_main (614) < _run (84) < _run_once (1936) < run_forever (608) <        start (211) <
                                                            start (758) <
helper: Started
helper: Output is in dir "/home/ls/projects/oceantracker_dev/oceantracker/tutorials_how_to/output/param_test1"
                            hint: see for copies of screen output and user supplied parameters, plus all other output
helper: Note >>> to help with debugging, parameters as given by user  are in "raw_user_params.json"
helper: ----------------------------------------------------------------------------------------------------
helper: Numba setup: applied settings, max threads = 32, physical cores = 32
                            hint:  cache code = False, fastmath= False
helper: ----------------------------------------------------------------------------------------------------
loading oceantracker read files
helper:                     - Built OceanTracker package tree,        0.693 sec
helper:                     - Built OceanTracker sort name map,       0.000 sec
helper:     - Done package set up to setup ClassImporter,     0.693 sec
setup: ----------------------------------------------------------------------------------------------------
setup:  OceanTracker version 0.5.2.55
setup: Starting user param. runner at 2026-01-27T11:29:01.791032
setup: ----------------------------------------------------------------------------------------------------
setup:      - Start  field group manager and readers setup
setup:      - Found input dir "./demo_hindcast/schsim3D"
setup:      - Detected reader class_name = "oceantracker.reader.SCHISM_reader.SCHISMreader"
setup:      - Starting grid setup
setup:              - built node to triangles map,    0.571 sec
setup:              - built triangle adjacency matrix,        0.147 sec
setup:              - found boundary triangles,       0.000 sec
setup:              - built domain and island outlines,       0.785 sec
setup:              - calculated triangle areas,      0.000 sec
setup:      - Finished grid setup
setup: --- Hindcast info ----------------------------------------------------------------------------------
setup: Hydro-model is "3D", type "SCHISMreader"
                            hint: Files found in dir and sub-dirs of "./demo_hindcast/schsim3D"
setup: Geographic coords = "False"
setup: Hindcast start: 2017-01-01T00:30:00  end:  2017-01-01T23:30:00
setup: time step = 0 days 1 hrs 0 min 0 sec, number of time steps= 24
setup: grid bounding box = [1589789.000 5479437.000] to [1603398.000 5501640.000]
setup: has:  A_Z profile=True,  bottom stress=False, regrid to sigma=True
setup: vertical grid type = "LSC", using vertical grid  "Sigma"
setup: ----------------------------------------------------------------------------------------------------
setup:      - Built barycentric-transform matrix,     0.218 sec
setup:      - Loading reader fields ['tide', 'water_depth', 'water_velocity']
setup:      - Finished field group manager and readers setup,         3.187 sec
setup: ----------------------------------------------------------------------------------------------------
setup:      - Added 2 release group(s) and found run start and end times,     3.002 sec
setup:      - Starting initial setup of all classes
setup:              - Done initial setup of all classes,      0.004 sec
setup: ----------------------------------------------------------------------------------------------------
setup:      - Starting "param_test1",  duration: 0 days 23 hrs 0 min 0 sec
setup: From 2017-01-01T00:30:00 to  2017-01-01T23:30:00
setup: Time step 120.0 sec
setup: using: A_Z_profile = False, bottom_stress = False
setup: ----------------------------------------------------------------------------------------------------
setup:      -  Reading 24 time steps,  for hindcast time steps 00:23 into ring buffer offsets 000:023 ,  for run "None"
setup:                      -  read  24 time steps in  0.8 sec, from ./demo_hindcast/schsim3D
setup:      - Starting time stepping: 2017-01-01T00:30:00 to 2017-01-01T23:30:00
setup: duration  0 days 23 hrs 0 min 0 sec, time step=  0 days 0 hrs 2 min 0 sec
S:  - Opened tracks output and done written first time step in: "tracks_compact_000.nc",      0.082 sec
S: 0000: 00%:H0000b00-01 Day +00 00:00 2017-01-01 00:30:00: Rel:40   : Active:40     Move:40     Bottom:0     Strand:0      Dead:0     Out:   0 Buffer: 5%  step time = 6275.1 ms
S: 0030: 04%:H0001b01-02 Day +00 01:00 2017-01-01 01:30:00: Rel:60   : Active:60     Move:60     Bottom:0     Strand:0      Dead:0     Out:   0 Buffer: 8%  step time =  5.7 ms
S: 0060: 09%:H0002b02-03 Day +00 02:00 2017-01-01 02:30:00: Rel:100  : Active:100    Move:100    Bottom:0     Strand:0      Dead:0     Out:   0 Buffer:13%  step time =  7.4 ms
S: 0090: 13%:H0003b03-04 Day +00 03:00 2017-01-01 03:30:00: Rel:110  : Active:110    Move:99     Bottom:1     Strand:10     Dead:0     Out:   0 Buffer:15%  step time =  7.0 ms
S: 0120: 17%:H0004b04-05 Day +00 04:00 2017-01-01 04:30:00: Rel:140  : Active:140    Move:115    Bottom:15    Strand:10     Dead:0     Out:   0 Buffer:19%  step time =  8.3 ms
S: 0150: 22%:H0005b05-06 Day +00 05:00 2017-01-01 05:30:00: Rel:150  : Active:150    Move:120    Bottom:20    Strand:10     Dead:0     Out:   0 Buffer:20%  step time =  8.0 ms
S: 0180: 26%:H0006b06-07 Day +00 06:00 2017-01-01 06:30:00: Rel:180  : Active:180    Move:151    Bottom:19    Strand:10     Dead:0     Out:   0 Buffer:25%  step time =  7.8 ms
S: 0210: 30%:H0007b07-08 Day +00 07:00 2017-01-01 07:30:00: Rel:190  : Active:190    Move:160    Bottom:20    Strand:10     Dead:0     Out:   0 Buffer:26%  step time =  7.5 ms
S: 0240: 35%:H0008b08-09 Day +00 08:00 2017-01-01 08:30:00: Rel:220  : Active:220    Move:191    Bottom:19    Strand:10     Dead:0     Out:   0 Buffer:30%  step time = 10.0 ms
S: 0270: 39%:H0009b09-10 Day +00 09:00 2017-01-01 09:30:00: Rel:240  : Active:240    Move:221    Bottom:19    Strand:0      Dead:0     Out:   0 Buffer:33%  step time =  6.4 ms
S: 0300: 43%:H0010b10-11 Day +00 10:00 2017-01-01 10:30:00: Rel:280  : Active:280    Move:237    Bottom:43    Strand:0      Dead:0     Out:   0 Buffer:38%  step time =  8.0 ms
S: 0330: 48%:H0011b11-12 Day +00 11:00 2017-01-01 11:30:00: Rel:300  : Active:300    Move:241    Bottom:59    Strand:0      Dead:0     Out:   0 Buffer:41%  step time =  6.4 ms
S: 0360: 52%:H0012b12-13 Day +00 12:00 2017-01-01 12:30:00: Rel:340  : Active:340    Move:266    Bottom:74    Strand:0      Dead:0     Out:   0 Buffer:47%  step time =  7.6 ms
S: 0390: 57%:H0013b13-14 Day +00 13:00 2017-01-01 13:30:00: Rel:360  : Active:360    Move:352    Bottom:7     Strand:1      Dead:0     Out:   0 Buffer:50%  step time =  6.4 ms
S: 0420: 61%:H0014b14-15 Day +00 14:00 2017-01-01 14:30:00: Rel:400  : Active:400    Move:393    Bottom:5     Strand:2      Dead:0     Out:   0 Buffer:55%  step time =  8.3 ms
S: 0450: 65%:H0015b15-16 Day +00 15:00 2017-01-01 15:30:00: Rel:410  : Active:410    Move:339    Bottom:7     Strand:64     Dead:0     Out:   0 Buffer:56%  step time =  6.9 ms
S: 0480: 70%:H0016b16-17 Day +00 16:00 2017-01-01 16:30:00: Rel:440  : Active:440    Move:342    Bottom:33    Strand:65     Dead:0     Out:   0 Buffer:61%  step time =  7.8 ms
S: 0510: 74%:H0017b17-18 Day +00 17:00 2017-01-01 17:30:00: Rel:450  : Active:450    Move:315    Bottom:64    Strand:71     Dead:0     Out:   0 Buffer:62%  step time =  6.3 ms
S: 0540: 78%:H0018b18-19 Day +00 18:00 2017-01-01 18:30:00: Rel:480  : Active:480    Move:385    Bottom:24    Strand:71     Dead:0     Out:   0 Buffer:66%  step time =  6.6 ms
S: 0570: 83%:H0019b19-20 Day +00 19:00 2017-01-01 19:30:00: Rel:490  : Active:490    Move:410    Bottom:9     Strand:71     Dead:0     Out:   0 Buffer:68%  step time =  6.1 ms
S: 0600: 87%:H0020b20-21 Day +00 20:00 2017-01-01 20:30:00: Rel:520  : Active:520    Move:440    Bottom:10    Strand:70     Dead:0     Out:   0 Buffer:72%  step time =  8.0 ms
S: 0630: 91%:H0021b21-22 Day +00 21:00 2017-01-01 21:30:00: Rel:540  : Active:540    Move:525    Bottom:13    Strand:2      Dead:0     Out:   0 Buffer:75%  step time =  6.5 ms
S: 0660: 96%:H0022b22-23 Day +00 22:00 2017-01-01 22:30:00: Rel:580  : Active:580    Move:487    Bottom:92    Strand:1      Dead:0     Out:   0 Buffer:80%  step time =  8.0 ms
S: 0690: 100%:H0022b22-23 Day +00 23:00 2017-01-01 23:30:00: Rel:600  : Active:600    Move:444    Bottom:156   Strand:0      Dead:0     Out:   0 Buffer:83%  step time =  7.5 ms
S: --- Closing all classes ----------------------------------------------------------------------------
S: Converting compact track files to rectangular format (to disable set reader param convert=False)
S:          - Finished "tracks_rectangular_000.nc",   0.080 sec
S:          - Conversion complete,    0.080 sec
S: Removing compact track files output after conversion
end: ----------------------------------------------------------------------------------------------------
end: Finished "param_test1"
end: Timings: total =  22.2 sec
end:                Setup                          0.87 s     3.9%
end:                Find initial horizontal cell   0.98 s     4.4%
end:                Reading hindcast               0.79 s     3.6%
end:                Find horizontal cell           1.51 s     6.8%
end:                Find vertical cell             1.12 s     5.1%
end:                Interpolate fields             1.22 s     5.5%
end:                Update custom particle prop.   0.00 s     0.0%
end:                Update statistics              0.00 s     0.0%
end:                Update event loggers           0.00 s     0.0%
end:                RK integration                 0.34 s     1.5%
end:                Releasing particles            0.04 s     0.2%
end:                Close down                     3.32 s    15.0%
end:                resuspension                   0.26 s     1.2%
end:                dispersion                     0.36 s     1.6%
end:                tracks_writer                  0.06 s     0.3%
end: ----------------------------------------------------------------------------------------------------
end: Finished "param_test1"
end:         started: 2026-01-27 11:29:00.916978, ended: 2026-01-27 11:29:23.098121
end: Computational time = 0:00:22.181154
end: Max. memory used 14.84 GB
end: --- Issues    (check above,  any errors repeated below) --------------------------------------------
end:   0 errors,    2 strong warnings,   0 warnings,   1 notes
---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

Cell In[4], line 4
      1 # run oceantracker using param dict built in cells above
      2 from oceantracker import main
----> 4 case_info_file_name = main.run(params)
      5 # case_info file is the name of a json file useful in plotting results


File ~/projects/oceantracker_dev/oceantracker/oceantracker/main.py:19, in run(params)
     16 '''Run a single OceanTracker case using given parameters'''
     18 ot = OceanTrackerParamsRunner()
---> 19 case_info_files = ot.run(deepcopy(params))  # run on copy to preserve external state
     20 return case_info_files


File ~/projects/oceantracker_dev/oceantracker/oceantracker/oceantracker_params_runner.py:87, in OceanTrackerParamsRunner.run(self, user_given_params)
     85 ml.msg(f'{num_errors:3d} errors,  {len(el["strong_warning"]):3d} strong warnings, {len(el["warning"]):3d} warnings, {len(el["note"]):3d} notes', tabs=1)
     86 for v in ml.msg_lists['strong_warning']:
---> 87     ml.msg('Strong_warning >>>' + v['msg'], hint=v['hint'], caller=v['caller'], tabs=1)
     89 if  num_errors > 0:
     90     ml.msg(f'>>>>>>> Found {num_errors:2d} errors <<<<<<<<<<<<',
     91            hint='Look for first error above or below  or in  *_caseLog.txt and *_caseLog.err files, plus particle_prop_on_error.nc and and class_info_on_error.json')


TypeError: string indices must be integers, not 'str'
../../_images/E_run_using_parameter_dictionaries_8_2.png
# plot animation of results
from oceantracker.plot_output.plot_tracks import animate_particles
from oceantracker.read_output.python import load_output_files
from IPython.display import HTML  # show animation in note book

# read particle track data into a dictionary using case_info_file_name
tracks = load_output_files.load_track_data(case_info_file_name)

ax = [1591000, 1601500, 5479500, 5491000]  # area to plot
# animate particles
anim = animate_particles(
    tracks,
    axis_lims=ax,
    title="Fall vel.,  test",
    show_dry_cells=True,
    show_grid=True,
    show=False,
)  # use ipython to show video, rather than matplotlib plt.show()

# this line only used in note books, in python scripts use show = True above and set movie file name
# this is slow to build!
HTML(anim.to_html5_video())  # this is slow to build!
Merging rectangular track files
     Reading rectangular track file "tracks_rectangular_000.nc"
../../_images/E_run_using_parameter_dictionaries_9_2.png

Run from command line#

Run without coding from command lin bu using a parameter file pre-built in a text editor.

From within an activated oceantracker conda environment, run command line below.

On Windows, do this within an anaconda/miniconda prompt window with an activated environment.

eg. run “run_oceantracker.py” script in the oceantracker/oceantracker directory with command

python  ../oceantracker/run_oceantracker.py ./example_param_files/param_test1.json

!python  ../oceantracker/run_ot_cmd_line.py ./example_param_files/param_test1.json
prelim:     Starting package set up
helper:      Python version: 3.11.14 | packaged by conda-forge | (main, Oct 22 2025, 22:46:25) [GCC 14.3.0]
helper: ----------------------------------------------------------------------
helper: OceanTracker version 0.5.2.55  starting setup helper "main.py":
helper: >>> Strong warning: Parameter "output_file_base" is deprecated and will be deleted in future versions
helper:     hint: Use of "root_output_dir" and "output_file_base" will be removed in future versions, use "run_output_dir" instead
helper:       in: Bulding working params build_working_params> Settings> > merge_params_with_defaults
helper: >>> Strong warning: Parameter "root_output_dir" is deprecated and will be deleted in future versions
helper:     hint: Use of "root_output_dir" and "output_file_base" will be removed in future versions, use "run_output_dir" instead
helper:       in: Bulding working params build_working_params> Settings> > merge_params_with_defaults
helper: Started
helper: Output is in dir "/home/ls/projects/oceantracker_dev/oceantracker/tutorials_how_to/output/param_test1"
helper:     hint: see for copies of screen output and user supplied parameters, plus all other output
helper:     >>> Note: to help with debugging, parameters as given by user  are in "raw_user_params.json"
helper: ----------------------------------------------------------------------
helper: Numba setup: applied settings, max threads = 32, physical cores = 32
helper:     hint:  cache code = False, fastmath= False
helper: ----------------------------------------------------------------------
loading oceantracker read files
helper:       - Built OceanTracker package tree,      1.221 sec
helper:       - Built OceanTracker sort name map,     0.000 sec
helper:   - Done package set up to setup ClassImporter,       1.221 sec
setup: ----------------------------------------------------------------------
setup:  OceanTracker version 0.5.2.55
setup:     Starting user param. runner at 2026-01-22T14:12:10.520572
setup: ----------------------------------------------------------------------
setup:   - Start  field group manager and readers setup
setup:   - Found input dir "./demo_hindcast/schsim3D"
setup:   - Detected reader class_name = "oceantracker.reader.SCHISM_reader.SCHISMreader"
setup:   - Starting grid setup
setup:     - built node to triangles map,     0.852 sec
setup:     - built triangle adjacency matrix,         0.189 sec
setup:     - found boundary triangles,        0.000 sec
setup:     - built domain and island outlines,        1.231 sec
setup:     - calculated triangle areas,       0.000 sec
setup:   - Finished grid setup
setup: --- Hindcast info ----------------------------------------------------
setup:     Hydro-model is "3D", type "SCHISMreader"
setup:         hint: Files found in dir and sub-dirs of "./demo_hindcast/schsim3D"
setup:         Geographic coords = "False"
setup:         Hindcast start: 2017-01-01T00:30:00  end:  2017-01-01T23:30:00
setup:           time step = 0 days 1 hrs 0 min 0 sec, number of time steps= 24
setup:           grid bounding box = [1589789.000 5479437.000] to [1603398.000 5501640.000]
setup:           has:  A_Z profile=True,  bottom stress=False, regrid to sigma=True
setup:           vertical grid type = "LSC", using vertical grid  "Sigma"
setup: ----------------------------------------------------------------------
setup:   - Built barycentric-transform matrix,        0.327 sec
setup:   - Loading reader fields ['tide', 'water_depth', 'water_velocity']
setup:   - Finished field group manager and readers setup,    4.467 sec
setup: ----------------------------------------------------------------------
setup:   - Added 2 release group(s) and found run start and end times,        4.542 sec
setup:   - Starting initial setup of all classes
setup:     - Done initial setup of all classes,       0.003 sec
setup: ----------------------------------------------------------------------
setup:   - Starting "param_test1",  duration: 0 days 23 hrs 0 min 0 sec
setup:       From 2017-01-01T00:30:00 to  2017-01-01T23:30:00
setup:       Time step 120.0 sec
setup:         using: A_Z_profile = False, bottom_stress = False
setup: ----------------------------------------------------------------------
setup:   -  Reading 24 time steps,  for hindcast time steps 00:23 into ring buffer offsets 000:023 ,  for run "None"
setup:       -  read  24 time steps in  1.1 sec, from ./demo_hindcast/schsim3D
setup:   - Starting time stepping: 2017-01-01T00:30:00 to 2017-01-01T23:30:00
setup:     duration  0 days 23 hrs 0 min 0 sec, time step=  0 days 0 hrs 2 min 0 sec
S:   - Opened tracks output and done written first time step in: "tracks_compact_000.nc",     0.146 sec
S: 0000: 00%:H0000b00-01 Day +00 00:00 2017-01-01 00:30:00: Rel:40   : Active:40     Move:40     Bottom:0     Strand:0      Dead:0     Out:   0 Buffer: 5%  step time = 9370.5 ms
S: 0030: 04%:H0001b01-02 Day +00 01:00 2017-01-01 01:30:00: Rel:60   : Active:60     Move:60     Bottom:0     Strand:0      Dead:0     Out:   0 Buffer: 8%  step time =  7.1 ms
S: 0060: 09%:H0002b02-03 Day +00 02:00 2017-01-01 02:30:00: Rel:100  : Active:100    Move:99     Bottom:1     Strand:0      Dead:0     Out:   0 Buffer:13%  step time =  9.0 ms
S: 0090: 13%:H0003b03-04 Day +00 03:00 2017-01-01 03:30:00: Rel:110  : Active:110    Move:99     Bottom:1     Strand:10     Dead:0     Out:   0 Buffer:15%  step time =  8.7 ms
S: 0120: 17%:H0004b04-05 Day +00 04:00 2017-01-01 04:30:00: Rel:140  : Active:140    Move:117    Bottom:13    Strand:10     Dead:0     Out:   0 Buffer:19%  step time = 13.5 ms
S: 0150: 22%:H0005b05-06 Day +00 05:00 2017-01-01 05:30:00: Rel:150  : Active:150    Move:119    Bottom:20    Strand:11     Dead:0     Out:   0 Buffer:20%  step time =  8.6 ms
S: 0180: 26%:H0006b06-07 Day +00 06:00 2017-01-01 06:30:00: Rel:180  : Active:180    Move:150    Bottom:19    Strand:11     Dead:0     Out:   0 Buffer:25%  step time =  7.6 ms
S: 0210: 30%:H0007b07-08 Day +00 07:00 2017-01-01 07:30:00: Rel:190  : Active:190    Move:160    Bottom:20    Strand:10     Dead:0     Out:   0 Buffer:26%  step time =  8.0 ms
S: 0240: 35%:H0008b08-09 Day +00 08:00 2017-01-01 08:30:00: Rel:220  : Active:220    Move:190    Bottom:20    Strand:10     Dead:0     Out:   0 Buffer:30%  step time = 12.5 ms
S: 0270: 39%:H0009b09-10 Day +00 09:00 2017-01-01 09:30:00: Rel:240  : Active:240    Move:220    Bottom:20    Strand:0      Dead:0     Out:   0 Buffer:33%  step time =  8.4 ms
S: 0300: 43%:H0010b10-11 Day +00 10:00 2017-01-01 10:30:00: Rel:280  : Active:280    Move:241    Bottom:39    Strand:0      Dead:0     Out:   0 Buffer:38%  step time = 12.2 ms
S: 0330: 48%:H0011b11-12 Day +00 11:00 2017-01-01 11:30:00: Rel:300  : Active:300    Move:241    Bottom:59    Strand:0      Dead:0     Out:   0 Buffer:41%  step time =  7.4 ms
S: 0360: 52%:H0012b12-13 Day +00 12:00 2017-01-01 12:30:00: Rel:340  : Active:340    Move:262    Bottom:78    Strand:0      Dead:0     Out:   0 Buffer:47%  step time =  9.3 ms
S: 0390: 57%:H0013b13-14 Day +00 13:00 2017-01-01 13:30:00: Rel:360  : Active:360    Move:347    Bottom:10    Strand:3      Dead:0     Out:   0 Buffer:50%  step time =  7.3 ms
S: 0420: 61%:H0014b14-15 Day +00 14:00 2017-01-01 14:30:00: Rel:400  : Active:400    Move:389    Bottom:8     Strand:3      Dead:0     Out:   0 Buffer:55%  step time = 13.6 ms
S: 0450: 65%:H0015b15-16 Day +00 15:00 2017-01-01 15:30:00: Rel:410  : Active:410    Move:334    Bottom:10    Strand:66     Dead:0     Out:   0 Buffer:56%  step time = 12.0 ms
S: 0480: 70%:H0016b16-17 Day +00 16:00 2017-01-01 16:30:00: Rel:440  : Active:440    Move:338    Bottom:36    Strand:66     Dead:0     Out:   0 Buffer:61%  step time = 10.4 ms
S: 0510: 74%:H0017b17-18 Day +00 17:00 2017-01-01 17:30:00: Rel:450  : Active:450    Move:304    Bottom:76    Strand:70     Dead:0     Out:   0 Buffer:62%  step time = 10.5 ms
S: 0540: 78%:H0018b18-19 Day +00 18:00 2017-01-01 18:30:00: Rel:480  : Active:480    Move:390    Bottom:20    Strand:70     Dead:0     Out:   0 Buffer:66%  step time = 10.0 ms
S: 0570: 83%:H0019b19-20 Day +00 19:00 2017-01-01 19:30:00: Rel:490  : Active:490    Move:407    Bottom:13    Strand:70     Dead:0     Out:   0 Buffer:68%  step time =  7.4 ms
S: 0600: 87%:H0020b20-21 Day +00 20:00 2017-01-01 20:30:00: Rel:520  : Active:520    Move:437    Bottom:13    Strand:70     Dead:0     Out:   0 Buffer:72%  step time = 15.9 ms
S: 0630: 91%:H0021b21-22 Day +00 21:00 2017-01-01 21:30:00: Rel:540  : Active:540    Move:522    Bottom:15    Strand:3      Dead:0     Out:   0 Buffer:75%  step time = 13.0 ms
S: 0660: 96%:H0022b22-23 Day +00 22:00 2017-01-01 22:30:00: Rel:580  : Active:580    Move:496    Bottom:81    Strand:3      Dead:0     Out:   0 Buffer:80%  step time =  9.9 ms
S: 0690: 100%:H0022b22-23 Day +00 23:00 2017-01-01 23:30:00: Rel:600  : Active:600    Move:466    Bottom:134   Strand:0      Dead:0     Out:   0 Buffer:83%  step time = 11.1 ms
S: --- Closing all classes ----------------------------------------------
S: Converting compact track files to rectangular format (to disable set reader param convert=False)
S:     hint: reading from dir /home/ls/projects/oceantracker_dev/oceantracker/tutorials_how_to/output/param_test1
S:     - Finished "tracks_rectangular_000.nc",        0.097 sec
S:     - Conversion complete,         0.097 sec
S: Removing compact track files output after conversion
end: ----------------------------------------------------------------------
end: Finished "param_test1"
end:     Timings: total =  32.1 sec
end:         Setup                          1.37 s    4.3%
end:         Find initial horizontal cell   1.41 s    4.4%
end:         Reading hindcast               1.10 s    3.4%
end:         Find horizontal cell           2.44 s    7.6%
end:         Find vertical cell             1.57 s    4.9%
end:         Interpolate fields             1.75 s    5.4%
end:         Update custom particle prop.   0.00 s    0.0%
end:         Update statistics              0.00 s    0.0%
end:         Update event loggers           0.00 s    0.0%
end:         RK integration                 0.47 s    1.5%
end:         Releasing particles            0.07 s    0.2%
end:         Close down                     4.57 s   14.3%
end:         resuspension                   0.38 s    1.2%
end:         dispersion                     0.86 s    2.7%
end:         tracks_writer                  0.08 s    0.2%
end: ----------------------------------------------------------------------
end: Finished "param_test1",  started: 2026-01-22 14:12:09.147411, ended: 2026-01-22 14:12:41.206441
end:       Computational time = 0:00:32.059040
end:       Max. memory used 110.99 GB
end: --- Issues    (check above,  any errors repeated below) --------------
end:     0 errors,    2 strong warnings,   0 warnings,   1 notes
end:   Strong_warning >>>Parameter "output_file_base" is deprecated and will be deleted in future versions
end:       hint: Use of "root_output_dir" and "output_file_base" will be removed in future versions, use "run_output_dir" instead
end:         in: Bulding working params build_working_params> Settings> > merge_params_with_defaults
end:   Strong_warning >>>Parameter "root_output_dir" is deprecated and will be deleted in future versions
end:       hint: Use of "root_output_dir" and "output_file_base" will be removed in future versions, use "run_output_dir" instead
end:         in: Bulding working params build_working_params> Settings> > merge_params_with_defaults
end: --- Successful completion: output in "None" --------------------------


Options when running at command line#

These allow

  • redefining the input and output dirs given within parameter file, which may have been built for a different location

  • limiting the run duration or the number of parallel cases during testing

the full arguments are below

!python ../oceantracker/run_ot_cmd_line.py -h
prelim:     Starting package set up
usage: run_ot_cmd_line.py [-h] [--input_dir INPUT_DIR]
                          [--run_output_dir RUN_OUTPUT_DIR]
                          [--processors PROCESSORS] [--duration DURATION]
                          [--cases CASES] [-debug]
                          param_file

positional arguments:
  param_file            json or yaml file of input parameters

options:
  -h, --help            show this help message and exit
  --input_dir INPUT_DIR
                        overrides dir for hindcast files given in param file
  --run_output_dir RUN_OUTPUT_DIR
                        overrides root output dir given in param file
  --processors PROCESSORS
                        overrides number of processors in param file
  --duration DURATION   in seconds, overrides model duration in seconds of all
                        of cases, useful in testing
  --cases CASES         only runs first "cases" of the case_list, useful in
                        testing
  -debug                gives better error information, but runs slower, eg
                        checks Numba array bounds