Skip to content
Snippets Groups Projects
Commit ec6012dd authored by Jacques Grelet's avatar Jacques Grelet
Browse files

rename test.tom to config.toml and move to root

parent 6e86ab8e
No related branches found
No related tags found
No related merge requests found
File moved
......@@ -425,7 +425,7 @@ if __name__ == "__main__":
parser.add_argument('-d', '--debug', help='display debug informations',
action='store_true')
parser.add_argument('-c', '--config', help="toml configuration file, (default: %(default)s)",
default='tests/test.toml')
default='config.toml')
parser.add_argument('-i', '--instrument', nargs='?', choices=['CTD','XBT','LADCP'],
help='specify the instrument that produce files, eg CTD, XBT, TSG, LADCP')
parser.add_argument('-k', '--keys', nargs='+', default=['PRES', 'TEMP', 'PSAL'],
......
......@@ -53,7 +53,7 @@ def processArgs():
parser.add_argument('--demo', nargs='?', choices=ti.keys(),
help='specify the commande line for instrument, eg CTD, XBT, TSG, LADCP')
parser.add_argument('-c', '--config', help="toml configuration file, (default: %(default)s)",
default='tests/test.toml')
default='config.toml')
parser.add_argument('-i', '--instrument', nargs='?', choices=ti.keys(),
help='specify the instrument that produce files, eg CTD, XBT, TSG, LADCP')
parser.add_argument('-r', '--roscop', nargs='?',
......
......@@ -7,10 +7,17 @@ import os
#plt.rcParams.update({'font.size': 20, 'figure.figsize': (10, 8)})
ncfiles = ['netcdf/OS_PIRATA-FR29_CTD.nc', 'netcdf/OS_PIRATA-FR29_XBT.nc','netcdf/OS_PIRATA-FR29_LADCP.nc']
for ncfile in ncfiles:
print(f"Read {ncfile}")
ds = xr.open_dataset(ncfile)
print(ds)
df = ds.to_dataframe()
print(df)
\ No newline at end of file
#ncfiles = ['netcdf/OS_PIRATA-FR29_CTD.nc', 'netcdf/OS_PIRATA-FR29_XBT.nc','netcdf/OS_PIRATA-FR29_LADCP.nc']
ncfiles = ['netcdf/OS_PIRATA-FR29_CTD.nc']
for file in ncfiles:
print(f"Read {file}")
# with automatically closes the dataset after use
with xr.open_dataset(file) as ds:
#print(type(ds.keys()))
for key in ds.keys():
print(f"{key} ", end='')
#print(ds[k])
#print(ds)
#print(ds['PROFILE'])
#df = ds.to_dataframe()
#print(df)
\ No newline at end of file
......@@ -12,7 +12,7 @@ class testConfig(unittest.TestCase):
def setUp(self):
"""Initialisation des tests."""
self.cfg = toml.load('tests/test.toml')
self.cfg = toml.load('config.toml')
self.glob = {'author': 'jgrelet IRD March 2019 PIRATA-FR29 cruise',
'debug': False, 'echo': True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment