Commit c23fb595 authored by PIOLLE's avatar PIOLLE
Browse files

new dataset for 2-dimensional WHALES files

parent a4b61e94
......@@ -31,7 +31,6 @@ class WHALESNCDataset(Dataset):
**kwargs)
def _transform(self):
self._std_dataset = self._std_dataset.squeeze('records')
self._std_dataset['time'].attrs['units'] = self.time_units
self._std_dataset = xr.decode_cf(self._std_dataset)
......@@ -39,7 +38,7 @@ class WHALESNCDataset(Dataset):
return super(WHALESNCDataset, self)._transform()
class SARALvTWHALESNCDataset(WHALESNCDataset):
class WHALES2DNCDataset(WHALESNCDataset):
def _transform(self):
# fix invalid times
......
......@@ -33,7 +33,7 @@ setup(
entry_points={
'cerbere.plugins': [
'WHALESNCDataset = cerberecontrib_whales.dataset.whalesncdataset:WHALESNCDataset',
'SARALvTWHALESNCDataset = cerberecontrib_whales.dataset.whalesncdataset:SARALvTWHALESNCDataset',
'WHALES2DNCDataset = cerberecontrib_whales.dataset.whalesncdataset:WHALES2DNCDataset',
'JASONWHALESNCDataset = cerberecontrib_whales.dataset.whalesncdataset:JASONWHALESNCDataset',
]
},
......
"""
Test class for cerbere WHALESNCDataset class, WHALES output from
Jason-2 SGDR products.
:copyright: Copyright 2020 Ifremer / Cersat.
:license: Released under GPL v3 license, see :ref:`license`.
.. sectionauthor:: Jeff Piolle <jfpiolle@ifremer.fr>
.. codeauthor:: Jeff Piolle <jfpiolle@ifremer.fr>
"""
import unittest
from tests.checker import Checker
class Jason2WHALESNCDatasetChecker(Checker, unittest.TestCase):
"""Test class for WHALESNCDataset files"""
def __init__(self, methodName="runTest"):
super(Jason2WHALESNCDatasetChecker, self).__init__(methodName)
@classmethod
def dataset(cls):
"""Return the mapper class name"""
return 'WHALES2DNCDataset'
@classmethod
def feature(cls):
"""Return the related feature class name"""
return 'Trajectory'
@classmethod
def test_file(cls):
"""Return the name of the test file for this test"""
return "JA2_GPS_2PdP092_017_20110101_000523_20110101_010136.nc"
@classmethod
def download_url(cls):
"""Return the URL of the data test repository where to get the test
files
"""
return "ftp://ftp.ifremer.fr/ifremer/cersat/projects/cerbere/test_data/"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment