tracmass.GridFields#
- class tracmass.GridFields(*, kmt, dxdy, imt, jmt, km, timestep, reverse, iperio, jperio, i_offset=0, j_offset=0)[source]#
Bases:
objectStatic grid geometry and metadata for a TRACMASS run.
These fields are fixed for the lifetime of a run. The advection kernels close over a
GridFieldsinstance so thatkmtanddxdybecome XLA constants in the compiled graph.- Parameters:
- kmt#
Bottom-level index (integer), shape
(imt, jmt). A value of 0 indicates a land cell.- Type:
jnp.ndarray
- dxdy#
Horizontal cell area, shape
(imt, jmt).- Type:
jnp.ndarray
- timestep#
Duration between consecutive time levels.
- Type:
pd.Timedelta
- i_offset, j_offset
Position of this grid’s cell
(0, 0)in the adapter’s full (un-subset) grid — thesubseti1/j1, else 0. Particle positions are relative to this grid; the trajectory recorder adds the offsets so savedx/y/ia/jaare absolute.- Type:
- __init__(*, kmt, dxdy, imt, jmt, km, timestep, reverse, iperio, jperio, i_offset=0, j_offset=0)#
Methods
__init__(*, kmt, dxdy, imt, jmt, km, ...[, ...])Attributes