Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wdata wdata
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wdatawdata
  • Issues
  • #6

Closed
Open
Created Jun 02, 2021 by Gabriel Wlazłowski@gabrielwOwner

abscissa

I have a draft implementation of wdata which works as follows:

import numpy as np
from wdata import io
Nxyz = (5, 6)
x = np.linspace(0, 1, Nxyz[0])            # Equally spaced
y = np.exp(np.linspace(0, 1, Nxyz[1]))    # Unequally spaced
xyz = np.meshgrid(x, y, indexing="ij", sparse=True)
t = np.exp(np.linspace(0, 2, 4))
data = io.WData(prefix="test1", data_dir='tmp', xyz=xyz, t=t)
data.save(force=True)
$ tree tmp
tmp
|-- test1.wtxt
|-- test1__t.wdat
`-- test1__y.wdat
$ cat tmp/test1.wtxt
# Generated by wdata.io: [2021-05-31 09:14:20 UTC+0000 = 2021-05-31 02:14:20 PDT-0700]

nx               5    # Lattice size in x direction
ny               6    #             ... y ...
dx            0.25    # Spacing in x direction
dy         varying    #        ... y ...
prefix       test1    # datafile prefix: <prefix>_<var>.<format>
datadim          2    # Block size: 1:Nx, 2:Nx*Ny, 3:Nx*Ny*Nz
cycles           4    # Number Nt of frames/cycles per dataset
t0             1.0    # Time value of first frame
dt         varying    # Time interval between frames
x0             0.0    # First point in x lattice
y0             1.0    # First point in y lattice

The abscissa for t and y are implicitly stored as _t and _y.

Assignee
Assign to
Time tracking