Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krystophny committed Nov 15, 2023
1 parent 80be523 commit 64a7d5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/libneo/mgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
from netCDF4 import Dataset

class MgridFile:
def __init__(self):
pass
def __init__(self, filename=None):
if filename:
self.read(filename)

def read(self, filename):
with Dataset(filename, "r") as f:
pass


def write(self, filename):
f = Dataset(filename, "w")
Expand Down
7 changes: 7 additions & 0 deletions tests/python_scripts/test_mgrid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from libneo.mgrid import MgridFile

def test_mgrid_read():
f = MgridFile('/proj/plasma/DATA/LHD/albert/vmec/makegrid_alternative/mgrid_lhd_nfp10.nc')
print(f)


0 comments on commit 64a7d5f

Please sign in to comment.