parcels icon indicating copy to clipboard operation
parcels copied to clipboard

New and updated `reprs` for Variable, ParticleFile, Field, and ParticleSet

Open VeckoTheGecko opened this issue 4 months ago • 0 comments

New/updated reprs for:

  • Variable
  • ParticleFile
  • Field
  • ParticleSet

Samples:

Variable(name=test, dtype=<class 'numpy.float32'>, initial=0, to_write=False)

ParticleFile(name='file.zarr', particleset=<parcels.particleset.ParticleSet object at 0x15e6896a0>, outputdt=3600.0, chunks=None, create_new_zarrfile=False)

<Field>
    grid            : RectilinearZGrid(lon=array([ 0.00,  0.05,  0.11, ...,  0.89,  0.95,  1.00], dtype=float32), lat=array([ 0.00,  0.05,  0.11, ...,  0.89,  0.95,  1.00], dtype=float32), time=array([ 0.00]), time_origin=0, mesh='flat')
    extrapolate time: True
    time_periodic   : False
    gridindexingtype: 'nemo'
    to_write        : False

<ParticleSet>
    fieldset   : <parcels.fieldset.FieldSet object at 0x15faeb3b0>
    pclass     : False
    repeatdt   : None
    # particles: 15
    particles  : [P[2](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), P[3](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), P[4](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), P[5](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), P[6](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), P[7](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), P[8](lon=0.000000, lat=0.000000, depth=0.000000, time=0.000000), ...]

contributes to #1693

VeckoTheGecko avatar Oct 25 '24 09:10 VeckoTheGecko