🖥️ MITgcm tutorial#

This tutorial will show how to run a 3D simulation with output from the MITgcm model. The key thing about MITgcm is that its output is on a C-grid, which means that the U and V velocity components are not defined at the same location as the particle positions. Parcels has built-in functionality to deal with C-grid data. See also the Nemo tutorial for another example of C-grid data.

import matplotlib.pyplot as plt
import numpy as np

import parcels
import parcels.tutorial

ds_fields = parcels.tutorial.open_dataset(
    "MITgcm_example_data/mitgcm_UV_surface_zonally_reentrant"
)

We can use a combination of parcels.convert.mitgcm_to_sgrid() and parcels.FieldSet.from_sgrid_conventions() to read in the data. See below for an example.

ds_fset = parcels.convert.mitgcm_to_sgrid(
    fields={"U": ds_fields.UVEL, "V": ds_fields.VVEL}, coords=ds_fields
)
fieldset = parcels.FieldSet.from_sgrid_conventions(ds_fset)
INFO: Depth dimension appears to be decreasing upward (i.e., from positive to negative values). Swapping depth dimension to be increasing upward for Parcels simulation.

We can then run a simulation on this zonally re-entrant dataset as follows:

perc = np.arange(5, 100, 10)
lon_vals = np.percentile(fieldset.UV.grid.lon, perc)
lat_vals = np.percentile(fieldset.UV.grid.lat, perc)

X, Y = np.meshgrid(
    lon_vals,
    lat_vals,
)
Z = np.zeros_like(X)


def DeleteParticle(particles, fieldset):
    any_error = particles.state >= 50
    particles[any_error].state = parcels.StatusCode.Delete


pset = parcels.ParticleSet(fieldset=fieldset, x=X, y=Y, z=Z)

outputfile = parcels.ParticleFile(
    path="mitgcm_particles.parquet",
    outputdt=np.timedelta64(5000, "s"),
)

pset.execute(
    [parcels.kernels.AdvectionRK2, DeleteParticle],
    runtime=np.timedelta64(10, "D"),
    dt=np.timedelta64(1, "h"),
    output_file=outputfile,
)

Hide code cell output

INFO: Output files are stored in mitgcm_particles.parquet
   0%|          | [00:00<?, ?it/s]
Integration time: 2000-01-02 00:00:00   0%|          | [00:00<?, ?it/s]
Integration time: 2000-01-02 00:00:00   0%|          | [00:00<?, ?it/s]
Integration time: 2000-01-02 00:00:00   1%|          | [00:00<01:09, 12272.88it/s]
Integration time: 2000-01-02 01:23:20   1%|          | [00:00<01:09, 12272.88it/s]
Integration time: 2000-01-02 01:23:20   1%|          | [00:00<00:55, 15444.20it/s]
Integration time: 2000-01-02 02:46:40   1%|          | [00:00<00:55, 15444.20it/s]
Integration time: 2000-01-02 02:46:40   2%|▏         | [00:00<00:50, 16832.05it/s]
Integration time: 2000-01-02 04:10:00   2%|▏         | [00:01<00:50, 16832.05it/s]
Integration time: 2000-01-02 04:10:00   2%|▏         | [00:01<00:47, 17684.03it/s]
Integration time: 2000-01-02 05:33:20   2%|▏         | [00:01<00:47, 17684.03it/s]
Integration time: 2000-01-02 05:33:20   3%|▎         | [00:01<00:50, 16452.68it/s]
Integration time: 2000-01-02 06:56:40   3%|▎         | [00:01<00:50, 16452.68it/s]
Integration time: 2000-01-02 06:56:40   3%|▎         | [00:01<00:48, 17194.36it/s]
Integration time: 2000-01-02 08:20:00   3%|▎         | [00:02<00:48, 17194.36it/s]
Integration time: 2000-01-02 08:20:00   4%|▍         | [00:02<00:46, 17708.01it/s]
Integration time: 2000-01-02 09:43:20   4%|▍         | [00:02<00:46, 17708.01it/s]
Integration time: 2000-01-02 09:43:20   5%|▍         | [00:02<00:45, 18024.22it/s]
Integration time: 2000-01-02 11:06:40   5%|▍         | [00:02<00:45, 18024.22it/s]
Integration time: 2000-01-02 11:06:40   5%|▌         | [00:02<00:45, 18062.32it/s]
Integration time: 2000-01-02 12:30:00   5%|▌         | [00:02<00:45, 18062.32it/s]
Integration time: 2000-01-02 12:30:00   6%|▌         | [00:02<00:44, 18309.66it/s]
Integration time: 2000-01-02 13:53:20   6%|▌         | [00:03<00:44, 18309.66it/s]
Integration time: 2000-01-02 13:53:20   6%|▋         | [00:03<00:43, 18457.30it/s]
Integration time: 2000-01-02 15:16:40   6%|▋         | [00:03<00:43, 18457.30it/s]
Integration time: 2000-01-02 15:16:40   7%|▋         | [00:03<00:43, 18568.51it/s]
Integration time: 2000-01-02 16:40:00   7%|▋         | [00:03<00:43, 18568.51it/s]
Integration time: 2000-01-02 16:40:00   8%|▊         | [00:03<00:42, 18654.91it/s]
Integration time: 2000-01-02 18:03:20   8%|▊         | [00:03<00:42, 18654.91it/s]
Integration time: 2000-01-02 18:03:20   8%|▊         | [00:03<00:42, 18675.89it/s]
Integration time: 2000-01-02 19:26:40   8%|▊         | [00:04<00:42, 18675.89it/s]
Integration time: 2000-01-02 19:26:40   9%|▊         | [00:04<00:42, 18672.90it/s]
Integration time: 2000-01-02 20:50:00   9%|▊         | [00:04<00:42, 18672.90it/s]
Integration time: 2000-01-02 20:50:00   9%|▉         | [00:04<00:41, 18674.73it/s]
Integration time: 2000-01-02 22:13:20   9%|▉         | [00:04<00:41, 18674.73it/s]
Integration time: 2000-01-02 22:13:20  10%|▉         | [00:04<00:41, 18684.28it/s]
Integration time: 2000-01-02 23:36:40  10%|▉         | [00:05<00:41, 18684.28it/s]
Integration time: 2000-01-02 23:36:40  10%|█         | [00:05<00:41, 18651.35it/s]
Integration time: 2000-01-03 01:00:00  10%|█         | [00:05<00:41, 18651.35it/s]
Integration time: 2000-01-03 01:00:00  11%|█         | [00:05<00:41, 18620.25it/s]
Integration time: 2000-01-03 02:23:20  11%|█         | [00:05<00:41, 18620.25it/s]
Integration time: 2000-01-03 02:23:20  12%|█▏        | [00:05<00:41, 18621.25it/s]
Integration time: 2000-01-03 03:46:40  12%|█▏        | [00:05<00:41, 18621.25it/s]
Integration time: 2000-01-03 03:46:40  12%|█▏        | [00:05<00:40, 18625.12it/s]
Integration time: 2000-01-03 05:10:00  12%|█▏        | [00:06<00:40, 18625.12it/s]
Integration time: 2000-01-03 05:10:00  13%|█▎        | [00:06<00:40, 18620.35it/s]
Integration time: 2000-01-03 06:33:20  13%|█▎        | [00:06<00:40, 18620.35it/s]
Integration time: 2000-01-03 06:33:20  13%|█▎        | [00:06<00:40, 18651.20it/s]
Integration time: 2000-01-03 07:56:40  13%|█▎        | [00:06<00:40, 18651.20it/s]
Integration time: 2000-01-03 07:56:40  14%|█▍        | [00:06<00:39, 18630.78it/s]
Integration time: 2000-01-03 09:20:00  14%|█▍        | [00:06<00:39, 18630.78it/s]
Integration time: 2000-01-03 09:20:00  14%|█▍        | [00:06<00:39, 18715.51it/s]
Integration time: 2000-01-03 10:43:20  14%|█▍        | [00:07<00:39, 18715.51it/s]
Integration time: 2000-01-03 10:43:20  15%|█▌        | [00:07<00:39, 18763.13it/s]
Integration time: 2000-01-03 12:06:40  15%|█▌        | [00:07<00:39, 18763.13it/s]
Integration time: 2000-01-03 12:06:40  16%|█▌        | [00:07<00:38, 18830.17it/s]
Integration time: 2000-01-03 13:30:00  16%|█▌        | [00:07<00:38, 18830.17it/s]
Integration time: 2000-01-03 13:30:00  16%|█▌        | [00:07<00:38, 18787.25it/s]
Integration time: 2000-01-03 14:53:20  16%|█▌        | [00:07<00:38, 18787.25it/s]
Integration time: 2000-01-03 14:53:20  17%|█▋        | [00:07<00:38, 18788.29it/s]
Integration time: 2000-01-03 16:16:40  17%|█▋        | [00:08<00:38, 18788.29it/s]
Integration time: 2000-01-03 16:16:40  17%|█▋        | [00:08<00:38, 18776.19it/s]
Integration time: 2000-01-03 17:40:00  17%|█▋        | [00:08<00:38, 18776.19it/s]
Integration time: 2000-01-03 17:40:00  18%|█▊        | [00:08<00:37, 18784.33it/s]
Integration time: 2000-01-03 19:03:20  18%|█▊        | [00:08<00:37, 18784.33it/s]
Integration time: 2000-01-03 19:03:20  19%|█▊        | [00:08<00:37, 18778.67it/s]
Integration time: 2000-01-03 20:26:40  19%|█▊        | [00:09<00:37, 18778.67it/s]
Integration time: 2000-01-03 20:26:40  19%|█▉        | [00:09<00:37, 18829.11it/s]
Integration time: 2000-01-03 21:50:00  19%|█▉        | [00:09<00:37, 18829.11it/s]
Integration time: 2000-01-03 21:50:00  20%|█▉        | [00:09<00:36, 18810.03it/s]
Integration time: 2000-01-03 23:13:20  20%|█▉        | [00:09<00:36, 18810.03it/s]
Integration time: 2000-01-03 23:13:20  20%|██        | [00:09<00:36, 18838.15it/s]
Integration time: 2000-01-04 00:36:40  20%|██        | [00:09<00:36, 18838.15it/s]
Integration time: 2000-01-04 00:36:40  21%|██        | [00:09<00:36, 18873.92it/s]
Integration time: 2000-01-04 02:00:00  21%|██        | [00:10<00:36, 18873.92it/s]
Integration time: 2000-01-04 02:00:00  21%|██▏       | [00:10<00:36, 18652.39it/s]
Integration time: 2000-01-04 03:23:20  21%|██▏       | [00:10<00:36, 18652.39it/s]
Integration time: 2000-01-04 03:23:20  22%|██▏       | [00:10<00:36, 18597.86it/s]
Integration time: 2000-01-04 04:46:40  22%|██▏       | [00:10<00:36, 18597.86it/s]
Integration time: 2000-01-04 04:46:40  23%|██▎       | [00:10<00:35, 18616.26it/s]
Integration time: 2000-01-04 06:10:00  23%|██▎       | [00:10<00:35, 18616.26it/s]
Integration time: 2000-01-04 06:10:00  23%|██▎       | [00:10<00:35, 18759.98it/s]
Integration time: 2000-01-04 07:33:20  23%|██▎       | [00:11<00:35, 18759.98it/s]
Integration time: 2000-01-04 07:33:20  24%|██▎       | [00:11<00:35, 18774.53it/s]
Integration time: 2000-01-04 08:56:40  24%|██▎       | [00:11<00:35, 18774.53it/s]
Integration time: 2000-01-04 08:56:40  24%|██▍       | [00:11<00:34, 18779.58it/s]
Integration time: 2000-01-04 10:20:00  24%|██▍       | [00:11<00:34, 18779.58it/s]
Integration time: 2000-01-04 10:20:00  25%|██▍       | [00:11<00:34, 18815.46it/s]
Integration time: 2000-01-04 11:43:20  25%|██▍       | [00:11<00:34, 18815.46it/s]
Integration time: 2000-01-04 11:43:20  25%|██▌       | [00:11<00:34, 18839.40it/s]
Integration time: 2000-01-04 13:06:40  25%|██▌       | [00:12<00:34, 18839.40it/s]
Integration time: 2000-01-04 13:06:40  26%|██▌       | [00:12<00:33, 18821.93it/s]
Integration time: 2000-01-04 14:30:00  26%|██▌       | [00:12<00:33, 18821.93it/s]
Integration time: 2000-01-04 14:30:00  27%|██▋       | [00:12<00:33, 18794.46it/s]
Integration time: 2000-01-04 15:53:20  27%|██▋       | [00:12<00:33, 18794.46it/s]
Integration time: 2000-01-04 15:53:20  27%|██▋       | [00:12<00:33, 18773.80it/s]
Integration time: 2000-01-04 17:16:40  27%|██▋       | [00:13<00:33, 18773.80it/s]
Integration time: 2000-01-04 17:16:40  28%|██▊       | [00:13<00:33, 18790.40it/s]
Integration time: 2000-01-04 18:40:00  28%|██▊       | [00:13<00:33, 18790.40it/s]
Integration time: 2000-01-04 18:40:00  28%|██▊       | [00:13<00:32, 18796.81it/s]
Integration time: 2000-01-04 20:03:20  28%|██▊       | [00:13<00:32, 18796.81it/s]
Integration time: 2000-01-04 20:03:20  29%|██▉       | [00:13<00:32, 18825.28it/s]
Integration time: 2000-01-04 21:26:40  29%|██▉       | [00:13<00:32, 18825.28it/s]
Integration time: 2000-01-04 21:26:40  30%|██▉       | [00:13<00:32, 18801.63it/s]
Integration time: 2000-01-04 22:50:00  30%|██▉       | [00:14<00:32, 18801.63it/s]
Integration time: 2000-01-04 22:50:00  30%|███       | [00:14<00:32, 18816.46it/s]
Integration time: 2000-01-05 00:13:20  30%|███       | [00:14<00:32, 18816.46it/s]
Integration time: 2000-01-05 00:13:20  31%|███       | [00:14<00:31, 18743.83it/s]
Integration time: 2000-01-05 01:36:40  31%|███       | [00:14<00:31, 18743.83it/s]
Integration time: 2000-01-05 01:36:40  31%|███▏      | [00:14<00:31, 18736.65it/s]
Integration time: 2000-01-05 03:00:00  31%|███▏      | [00:14<00:31, 18736.65it/s]
Integration time: 2000-01-05 03:00:00  32%|███▏      | [00:14<00:31, 18649.18it/s]
Integration time: 2000-01-05 04:23:20  32%|███▏      | [00:15<00:31, 18649.18it/s]
Integration time: 2000-01-05 04:23:20  32%|███▏      | [00:15<00:31, 18625.08it/s]
Integration time: 2000-01-05 05:46:40  32%|███▏      | [00:15<00:31, 18625.08it/s]
Integration time: 2000-01-05 05:46:40  33%|███▎      | [00:15<00:31, 18625.20it/s]
Integration time: 2000-01-05 07:10:00  33%|███▎      | [00:15<00:31, 18625.20it/s]
Integration time: 2000-01-05 07:10:00  34%|███▎      | [00:15<00:30, 18696.54it/s]
Integration time: 2000-01-05 08:33:20  34%|███▎      | [00:15<00:30, 18696.54it/s]
Integration time: 2000-01-05 08:33:20  34%|███▍      | [00:15<00:30, 18735.72it/s]
Integration time: 2000-01-05 09:56:40  34%|███▍      | [00:16<00:30, 18735.72it/s]
Integration time: 2000-01-05 09:56:40  35%|███▍      | [00:16<00:30, 18780.19it/s]
Integration time: 2000-01-05 11:20:00  35%|███▍      | [00:16<00:30, 18780.19it/s]
Integration time: 2000-01-05 11:20:00  35%|███▌      | [00:16<00:29, 18748.37it/s]
Integration time: 2000-01-05 12:43:20  35%|███▌      | [00:16<00:29, 18748.37it/s]
Integration time: 2000-01-05 12:43:20  36%|███▌      | [00:16<00:29, 18815.84it/s]
Integration time: 2000-01-05 14:06:40  36%|███▌      | [00:17<00:29, 18815.84it/s]
Integration time: 2000-01-05 14:06:40  36%|███▋      | [00:17<00:29, 18795.80it/s]
Integration time: 2000-01-05 15:30:00  36%|███▋      | [00:17<00:29, 18795.80it/s]
Integration time: 2000-01-05 15:30:00  37%|███▋      | [00:17<00:28, 18786.68it/s]
Integration time: 2000-01-05 16:53:20  37%|███▋      | [00:17<00:28, 18786.68it/s]
Integration time: 2000-01-05 16:53:20  38%|███▊      | [00:17<00:28, 18801.10it/s]
Integration time: 2000-01-05 18:16:40  38%|███▊      | [00:17<00:28, 18801.10it/s]
Integration time: 2000-01-05 18:16:40  38%|███▊      | [00:17<00:28, 18810.41it/s]
Integration time: 2000-01-05 19:40:00  38%|███▊      | [00:18<00:28, 18810.41it/s]
Integration time: 2000-01-05 19:40:00  39%|███▉      | [00:18<00:28, 18819.67it/s]
Integration time: 2000-01-05 21:03:20  39%|███▉      | [00:18<00:28, 18819.67it/s]
Integration time: 2000-01-05 21:03:20  39%|███▉      | [00:18<00:27, 18765.82it/s]
Integration time: 2000-01-05 22:26:40  39%|███▉      | [00:18<00:27, 18765.82it/s]
Integration time: 2000-01-05 22:26:40  40%|███▉      | [00:18<00:27, 18732.09it/s]
Integration time: 2000-01-05 23:50:00  40%|███▉      | [00:18<00:27, 18732.09it/s]
Integration time: 2000-01-05 23:50:00  41%|████      | [00:18<00:27, 18720.85it/s]
Integration time: 2000-01-06 01:13:20  41%|████      | [00:19<00:27, 18720.85it/s]
Integration time: 2000-01-06 01:13:20  41%|████      | [00:19<00:27, 18726.70it/s]
Integration time: 2000-01-06 02:36:40  41%|████      | [00:19<00:27, 18726.70it/s]
Integration time: 2000-01-06 02:36:40  42%|████▏     | [00:19<00:26, 18786.08it/s]
Integration time: 2000-01-06 04:00:00  42%|████▏     | [00:19<00:26, 18786.08it/s]
Integration time: 2000-01-06 04:00:00  42%|████▏     | [00:19<00:26, 18786.54it/s]
Integration time: 2000-01-06 05:23:20  42%|████▏     | [00:19<00:26, 18786.54it/s]
Integration time: 2000-01-06 05:23:20  43%|████▎     | [00:19<00:26, 18694.31it/s]
Integration time: 2000-01-06 06:46:40  43%|████▎     | [00:20<00:26, 18694.31it/s]
Integration time: 2000-01-06 06:46:40  43%|████▎     | [00:20<00:26, 18717.32it/s]
Integration time: 2000-01-06 08:10:00  43%|████▎     | [00:20<00:26, 18717.32it/s]
Integration time: 2000-01-06 08:10:00  44%|████▍     | [00:20<00:28, 17096.90it/s]
Integration time: 2000-01-06 09:33:20  44%|████▍     | [00:20<00:28, 17096.90it/s]
Integration time: 2000-01-06 09:33:20  45%|████▍     | [00:20<00:27, 17635.93it/s]
Integration time: 2000-01-06 10:56:40  45%|████▍     | [00:21<00:27, 17635.93it/s]
Integration time: 2000-01-06 10:56:40  45%|████▌     | [00:21<00:26, 17995.20it/s]
Integration time: 2000-01-06 12:20:00  45%|████▌     | [00:21<00:26, 17995.20it/s]
Integration time: 2000-01-06 12:20:00  46%|████▌     | [00:21<00:25, 18219.81it/s]
Integration time: 2000-01-06 13:43:20  46%|████▌     | [00:21<00:25, 18219.81it/s]
Integration time: 2000-01-06 13:43:20  46%|████▋     | [00:21<00:25, 18432.90it/s]
Integration time: 2000-01-06 15:06:40  46%|████▋     | [00:21<00:25, 18432.90it/s]
Integration time: 2000-01-06 15:06:40  47%|████▋     | [00:21<00:24, 18609.81it/s]
Integration time: 2000-01-06 16:30:00  47%|████▋     | [00:22<00:24, 18609.81it/s]
Integration time: 2000-01-06 16:30:00  47%|████▋     | [00:22<00:24, 18736.99it/s]
Integration time: 2000-01-06 17:53:20  47%|████▋     | [00:22<00:24, 18736.99it/s]
Integration time: 2000-01-06 17:53:20  48%|████▊     | [00:22<00:23, 18775.77it/s]
Integration time: 2000-01-06 19:16:40  48%|████▊     | [00:22<00:23, 18775.77it/s]
Integration time: 2000-01-06 19:16:40  49%|████▊     | [00:22<00:23, 18837.78it/s]
Integration time: 2000-01-06 20:40:00  49%|████▊     | [00:22<00:23, 18837.78it/s]
Integration time: 2000-01-06 20:40:00  49%|████▉     | [00:22<00:23, 18881.58it/s]
Integration time: 2000-01-06 22:03:20  49%|████▉     | [00:23<00:23, 18881.58it/s]
Integration time: 2000-01-06 22:03:20  50%|████▉     | [00:23<00:23, 18821.62it/s]
Integration time: 2000-01-06 23:26:40  50%|████▉     | [00:23<00:23, 18821.62it/s]
Integration time: 2000-01-06 23:26:40  50%|█████     | [00:23<00:22, 18792.07it/s]
Integration time: 2000-01-07 00:50:00  50%|█████     | [00:23<00:22, 18792.07it/s]
Integration time: 2000-01-07 00:50:00  51%|█████     | [00:23<00:22, 18788.40it/s]
Integration time: 2000-01-07 02:13:20  51%|█████     | [00:24<00:22, 18788.40it/s]
Integration time: 2000-01-07 02:13:20  52%|█████▏    | [00:24<00:22, 18777.28it/s]
Integration time: 2000-01-07 03:36:40  52%|█████▏    | [00:24<00:22, 18777.28it/s]
Integration time: 2000-01-07 03:36:40  52%|█████▏    | [00:24<00:22, 18765.98it/s]
Integration time: 2000-01-07 05:00:00  52%|█████▏    | [00:24<00:22, 18765.98it/s]
Integration time: 2000-01-07 05:00:00  53%|█████▎    | [00:24<00:21, 18793.59it/s]
Integration time: 2000-01-07 06:23:20  53%|█████▎    | [00:24<00:21, 18793.59it/s]
Integration time: 2000-01-07 06:23:20  53%|█████▎    | [00:24<00:21, 18872.42it/s]
Integration time: 2000-01-07 07:46:40  53%|█████▎    | [00:25<00:21, 18872.42it/s]
Integration time: 2000-01-07 07:46:40  54%|█████▍    | [00:25<00:21, 18820.18it/s]
Integration time: 2000-01-07 09:10:00  54%|█████▍    | [00:25<00:21, 18820.18it/s]
Integration time: 2000-01-07 09:10:00  54%|█████▍    | [00:25<00:21, 18656.63it/s]
Integration time: 2000-01-07 10:33:20  54%|█████▍    | [00:25<00:21, 18656.63it/s]
Integration time: 2000-01-07 10:33:20  55%|█████▍    | [00:25<00:20, 18700.87it/s]
Integration time: 2000-01-07 11:56:40  55%|█████▍    | [00:25<00:20, 18700.87it/s]
Integration time: 2000-01-07 11:56:40  56%|█████▌    | [00:25<00:20, 18741.32it/s]
Integration time: 2000-01-07 13:20:00  56%|█████▌    | [00:26<00:20, 18741.32it/s]
Integration time: 2000-01-07 13:20:00  56%|█████▌    | [00:26<00:20, 18730.08it/s]
Integration time: 2000-01-07 14:43:20  56%|█████▌    | [00:26<00:20, 18730.08it/s]
Integration time: 2000-01-07 14:43:20  57%|█████▋    | [00:26<00:19, 18798.74it/s]
Integration time: 2000-01-07 16:06:40  57%|█████▋    | [00:26<00:19, 18798.74it/s]
Integration time: 2000-01-07 16:06:40  57%|█████▋    | [00:26<00:19, 18737.76it/s]
Integration time: 2000-01-07 17:30:00  57%|█████▋    | [00:26<00:19, 18737.76it/s]
Integration time: 2000-01-07 17:30:00  58%|█████▊    | [00:26<00:19, 18741.98it/s]
Integration time: 2000-01-07 18:53:20  58%|█████▊    | [00:27<00:19, 18741.98it/s]
Integration time: 2000-01-07 18:53:20  58%|█████▊    | [00:27<00:19, 18728.90it/s]
Integration time: 2000-01-07 20:16:40  58%|█████▊    | [00:27<00:19, 18728.90it/s]
Integration time: 2000-01-07 20:16:40  59%|█████▉    | [00:27<00:18, 18841.32it/s]
Integration time: 2000-01-07 21:40:00  59%|█████▉    | [00:27<00:18, 18841.32it/s]
Integration time: 2000-01-07 21:40:00  60%|█████▉    | [00:27<00:18, 18790.97it/s]
Integration time: 2000-01-07 23:03:20  60%|█████▉    | [00:28<00:18, 18790.97it/s]
Integration time: 2000-01-07 23:03:20  60%|██████    | [00:28<00:18, 18752.22it/s]
Integration time: 2000-01-08 00:26:40  60%|██████    | [00:28<00:18, 18752.22it/s]
Integration time: 2000-01-08 00:26:40  61%|██████    | [00:28<00:18, 18743.98it/s]
Integration time: 2000-01-08 01:50:00  61%|██████    | [00:28<00:18, 18743.98it/s]
Integration time: 2000-01-08 01:50:00  61%|██████▏   | [00:28<00:17, 18684.45it/s]
Integration time: 2000-01-08 03:13:20  61%|██████▏   | [00:28<00:17, 18684.45it/s]
Integration time: 2000-01-08 03:13:20  62%|██████▏   | [00:28<00:17, 18647.30it/s]
Integration time: 2000-01-08 04:36:40  62%|██████▏   | [00:29<00:17, 18647.30it/s]
Integration time: 2000-01-08 04:36:40  62%|██████▎   | [00:29<00:17, 18725.30it/s]
Integration time: 2000-01-08 06:00:00  62%|██████▎   | [00:29<00:17, 18725.30it/s]
Integration time: 2000-01-08 06:00:00  63%|██████▎   | [00:29<00:17, 18722.48it/s]
Integration time: 2000-01-08 07:23:20  63%|██████▎   | [00:29<00:17, 18722.48it/s]
Integration time: 2000-01-08 07:23:20  64%|██████▎   | [00:29<00:16, 18737.50it/s]
Integration time: 2000-01-08 08:46:40  64%|██████▎   | [00:29<00:16, 18737.50it/s]
Integration time: 2000-01-08 08:46:40  64%|██████▍   | [00:29<00:16, 18781.29it/s]
Integration time: 2000-01-08 10:10:00  64%|██████▍   | [00:30<00:16, 18781.29it/s]
Integration time: 2000-01-08 10:10:00  65%|██████▍   | [00:30<00:16, 18750.92it/s]
Integration time: 2000-01-08 11:33:20  65%|██████▍   | [00:30<00:16, 18750.92it/s]
Integration time: 2000-01-08 11:33:20  65%|██████▌   | [00:30<00:15, 18706.24it/s]
Integration time: 2000-01-08 12:56:40  65%|██████▌   | [00:30<00:15, 18706.24it/s]
Integration time: 2000-01-08 12:56:40  66%|██████▌   | [00:30<00:15, 18708.20it/s]
Integration time: 2000-01-08 14:20:00  66%|██████▌   | [00:30<00:15, 18708.20it/s]
Integration time: 2000-01-08 14:20:00  67%|██████▋   | [00:30<00:15, 18740.05it/s]
Integration time: 2000-01-08 15:43:20  67%|██████▋   | [00:31<00:15, 18740.05it/s]
Integration time: 2000-01-08 15:43:20  67%|██████▋   | [00:31<00:15, 18758.91it/s]
Integration time: 2000-01-08 17:06:40  67%|██████▋   | [00:31<00:15, 18758.91it/s]
Integration time: 2000-01-08 17:06:40  68%|██████▊   | [00:31<00:14, 18772.38it/s]
Integration time: 2000-01-08 18:30:00  68%|██████▊   | [00:31<00:14, 18772.38it/s]
Integration time: 2000-01-08 18:30:00  68%|██████▊   | [00:31<00:14, 18752.85it/s]
Integration time: 2000-01-08 19:53:20  68%|██████▊   | [00:32<00:14, 18752.85it/s]
Integration time: 2000-01-08 19:53:20  69%|██████▉   | [00:32<00:14, 18735.15it/s]
Integration time: 2000-01-08 21:16:40  69%|██████▉   | [00:32<00:14, 18735.15it/s]
Integration time: 2000-01-08 21:16:40  69%|██████▉   | [00:32<00:14, 18788.52it/s]
Integration time: 2000-01-08 22:40:00  69%|██████▉   | [00:32<00:14, 18788.52it/s]
Integration time: 2000-01-08 22:40:00  70%|███████   | [00:32<00:13, 18796.68it/s]
Integration time: 2000-01-09 00:03:20  70%|███████   | [00:32<00:13, 18796.68it/s]
Integration time: 2000-01-09 00:03:20  71%|███████   | [00:32<00:13, 18822.25it/s]
Integration time: 2000-01-09 01:26:40  71%|███████   | [00:33<00:13, 18822.25it/s]
Integration time: 2000-01-09 01:26:40  71%|███████   | [00:33<00:13, 18799.38it/s]
Integration time: 2000-01-09 02:50:00  71%|███████   | [00:33<00:13, 18799.38it/s]
Integration time: 2000-01-09 02:50:00  72%|███████▏  | [00:33<00:12, 18819.96it/s]
Integration time: 2000-01-09 04:13:20  72%|███████▏  | [00:33<00:12, 18819.96it/s]
Integration time: 2000-01-09 04:13:20  72%|███████▏  | [00:33<00:12, 18837.16it/s]
Integration time: 2000-01-09 05:36:40  72%|███████▏  | [00:33<00:12, 18837.16it/s]
Integration time: 2000-01-09 05:36:40  73%|███████▎  | [00:33<00:12, 18817.68it/s]
Integration time: 2000-01-09 07:00:00  73%|███████▎  | [00:34<00:12, 18817.68it/s]
Integration time: 2000-01-09 07:00:00  73%|███████▎  | [00:34<00:12, 18944.87it/s]
Integration time: 2000-01-09 08:23:20  73%|███████▎  | [00:34<00:12, 18944.87it/s]
Integration time: 2000-01-09 08:23:20  74%|███████▍  | [00:34<00:11, 18993.07it/s]
Integration time: 2000-01-09 09:46:40  74%|███████▍  | [00:34<00:11, 18993.07it/s]
Integration time: 2000-01-09 09:46:40  75%|███████▍  | [00:34<00:11, 18871.11it/s]
Integration time: 2000-01-09 11:10:00  75%|███████▍  | [00:34<00:11, 18871.11it/s]
Integration time: 2000-01-09 11:10:00  75%|███████▌  | [00:34<00:11, 18821.02it/s]
Integration time: 2000-01-09 12:33:20  75%|███████▌  | [00:35<00:11, 18821.02it/s]
Integration time: 2000-01-09 12:33:20  76%|███████▌  | [00:35<00:11, 18893.68it/s]
Integration time: 2000-01-09 13:56:40  76%|███████▌  | [00:35<00:11, 18893.68it/s]
Integration time: 2000-01-09 13:56:40  76%|███████▋  | [00:35<00:10, 18913.24it/s]
Integration time: 2000-01-09 15:20:00  76%|███████▋  | [00:35<00:10, 18913.24it/s]
Integration time: 2000-01-09 15:20:00  77%|███████▋  | [00:35<00:10, 18962.64it/s]
Integration time: 2000-01-09 16:43:20  77%|███████▋  | [00:35<00:10, 18962.64it/s]
Integration time: 2000-01-09 16:43:20  78%|███████▊  | [00:35<00:10, 19026.76it/s]
Integration time: 2000-01-09 18:06:40  78%|███████▊  | [00:36<00:10, 19026.76it/s]
Integration time: 2000-01-09 18:06:40  78%|███████▊  | [00:36<00:09, 18948.34it/s]
Integration time: 2000-01-09 19:30:00  78%|███████▊  | [00:36<00:09, 18948.34it/s]
Integration time: 2000-01-09 19:30:00  79%|███████▊  | [00:36<00:09, 18871.47it/s]
Integration time: 2000-01-09 20:53:20  79%|███████▊  | [00:36<00:09, 18871.47it/s]
Integration time: 2000-01-09 20:53:20  79%|███████▉  | [00:36<00:09, 18869.35it/s]
Integration time: 2000-01-09 22:16:40  79%|███████▉  | [00:37<00:09, 18869.35it/s]
Integration time: 2000-01-09 22:16:40  80%|███████▉  | [00:37<00:09, 18880.35it/s]
Integration time: 2000-01-09 23:40:00  80%|███████▉  | [00:37<00:09, 18880.35it/s]
Integration time: 2000-01-09 23:40:00  80%|████████  | [00:37<00:08, 18880.17it/s]
Integration time: 2000-01-10 01:03:20  80%|████████  | [00:37<00:08, 18880.17it/s]
Integration time: 2000-01-10 01:03:20  81%|████████  | [00:37<00:08, 18965.87it/s]
Integration time: 2000-01-10 02:26:40  81%|████████  | [00:37<00:08, 18965.87it/s]
Integration time: 2000-01-10 02:26:40  82%|████████▏ | [00:37<00:08, 18910.61it/s]
Integration time: 2000-01-10 03:50:00  82%|████████▏ | [00:38<00:08, 18910.61it/s]
Integration time: 2000-01-10 03:50:00  82%|████████▏ | [00:38<00:08, 18960.51it/s]
Integration time: 2000-01-10 05:13:20  82%|████████▏ | [00:38<00:08, 18960.51it/s]
Integration time: 2000-01-10 05:13:20  83%|████████▎ | [00:38<00:07, 19024.08it/s]
Integration time: 2000-01-10 06:36:40  83%|████████▎ | [00:38<00:07, 19024.08it/s]
Integration time: 2000-01-10 06:36:40  83%|████████▎ | [00:38<00:07, 19007.54it/s]
Integration time: 2000-01-10 08:00:00  83%|████████▎ | [00:38<00:07, 19007.54it/s]
Integration time: 2000-01-10 08:00:00  84%|████████▍ | [00:38<00:07, 18989.73it/s]
Integration time: 2000-01-10 09:23:20  84%|████████▍ | [00:39<00:07, 18989.73it/s]
Integration time: 2000-01-10 09:23:20  84%|████████▍ | [00:39<00:07, 17495.25it/s]
Integration time: 2000-01-10 10:46:40  84%|████████▍ | [00:39<00:07, 17495.25it/s]
Integration time: 2000-01-10 10:46:40  85%|████████▌ | [00:39<00:07, 17916.65it/s]
Integration time: 2000-01-10 12:10:00  85%|████████▌ | [00:39<00:07, 17916.65it/s]
Integration time: 2000-01-10 12:10:00  86%|████████▌ | [00:39<00:06, 18229.63it/s]
Integration time: 2000-01-10 13:33:20  86%|████████▌ | [00:40<00:06, 18229.63it/s]
Integration time: 2000-01-10 13:33:20  86%|████████▌ | [00:40<00:06, 18534.22it/s]
Integration time: 2000-01-10 14:56:40  86%|████████▌ | [00:40<00:06, 18534.22it/s]
Integration time: 2000-01-10 14:56:40  87%|████████▋ | [00:40<00:06, 18448.62it/s]
Integration time: 2000-01-10 16:20:00  87%|████████▋ | [00:40<00:06, 18448.62it/s]
Integration time: 2000-01-10 16:20:00  87%|████████▋ | [00:40<00:05, 18631.85it/s]
Integration time: 2000-01-10 17:43:20  87%|████████▋ | [00:40<00:05, 18631.85it/s]
Integration time: 2000-01-10 17:43:20  88%|████████▊ | [00:40<00:05, 18764.69it/s]
Integration time: 2000-01-10 19:06:40  88%|████████▊ | [00:41<00:05, 18764.69it/s]
Integration time: 2000-01-10 19:06:40  89%|████████▊ | [00:41<00:05, 18879.56it/s]
Integration time: 2000-01-10 20:30:00  89%|████████▊ | [00:41<00:05, 18879.56it/s]
Integration time: 2000-01-10 20:30:00  89%|████████▉ | [00:41<00:04, 18890.85it/s]
Integration time: 2000-01-10 21:53:20  89%|████████▉ | [00:41<00:04, 18890.85it/s]
Integration time: 2000-01-10 21:53:20  90%|████████▉ | [00:41<00:04, 18824.56it/s]
Integration time: 2000-01-10 23:16:40  90%|████████▉ | [00:41<00:04, 18824.56it/s]
Integration time: 2000-01-10 23:16:40  90%|█████████ | [00:41<00:03, 22066.84it/s]
Integration time: 2000-01-11 00:40:00  90%|█████████ | [00:41<00:03, 22066.84it/s]
Integration time: 2000-01-11 02:03:20  91%|█████████ | [00:41<00:03, 22066.84it/s]
Integration time: 2000-01-11 03:26:40  91%|█████████▏| [00:41<00:03, 22066.84it/s]
Integration time: 2000-01-11 04:50:00  92%|█████████▏| [00:41<00:03, 22066.84it/s]
Integration time: 2000-01-11 06:13:20  93%|█████████▎| [00:41<00:02, 22066.84it/s]
Integration time: 2000-01-11 07:36:40  93%|█████████▎| [00:41<00:02, 22066.84it/s]
Integration time: 2000-01-11 09:00:00  94%|█████████▍| [00:41<00:02, 22066.84it/s]
Integration time: 2000-01-11 10:23:20  94%|█████████▍| [00:41<00:02, 22066.84it/s]
Integration time: 2000-01-11 11:46:40  95%|█████████▍| [00:41<00:01, 22066.84it/s]
Integration time: 2000-01-11 13:10:00  95%|█████████▌| [00:41<00:01, 22066.84it/s]
Integration time: 2000-01-11 14:33:20  96%|█████████▌| [00:41<00:01, 22066.84it/s]
Integration time: 2000-01-11 15:56:40  97%|█████████▋| [00:41<00:01, 22066.84it/s]
Integration time: 2000-01-11 17:20:00  97%|█████████▋| [00:41<00:01, 22066.84it/s]
Integration time: 2000-01-11 18:43:20  98%|█████████▊| [00:41<00:00, 22066.84it/s]
Integration time: 2000-01-11 20:06:40  98%|█████████▊| [00:41<00:00, 22066.84it/s]
Integration time: 2000-01-11 21:30:00  99%|█████████▉| [00:41<00:00, 22066.84it/s]
Integration time: 2000-01-11 22:53:20 100%|█████████▉| [00:41<00:00, 22066.84it/s]
Integration time: 2000-01-11 22:53:20 100%|██████████| [00:41<00:00, 20695.17it/s]

And make a simple plot of the particle trajectories:

df = parcels.read_particlefile("mitgcm_particles.parquet")

for traj in df.partition_by("particle_id", maintain_order=True):
    plt.plot(traj["x"], traj["y"], ".-")
plt.show()
../../_images/510b1abd0e79260883fe91836ff07e4087d1751aeb8f8a1b3a9f2167e78fcf5d.png