Skip to content

Commit

Permalink
working on basics for importing reader
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisblake committed Aug 8, 2023
1 parent 8166526 commit 9724c04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions pyaerocom/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class Config:
#: MEP name
MEP_NAME = "MEP"

# TROPOMI name
TROPOMI_NAME = "TROPOMI"

#: boolean specifying wheter EBAS DB is copied to local cache for faster
#: access, defaults to True
EBAS_DB_LOCAL_CACHE = True
Expand Down Expand Up @@ -193,7 +196,6 @@ class Config:
_LUSTRE_CHECK_PATH = "/project/aerocom/aerocom1/"

def __init__(self, config_file=None, try_infer_environment=True):

# Directories
self._outputdir = None
self._cache_basedir = None
Expand Down Expand Up @@ -278,7 +280,6 @@ def _basedirs_search_db(self):
return [self.ROOTDIR, self.HOMEDIR]

def _infer_config_from_basedir(self, basedir):

basedir = os.path.normpath(basedir)
for env_id, chk_sub in self._check_subdirs_cfg.items():
chkdir = os.path.join(basedir, chk_sub)
Expand Down
11 changes: 8 additions & 3 deletions pyaerocom/plugins/tropomi/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"value",
)

TMP_DATA_DIR = (

Check warning on line 33 in pyaerocom/plugins/tropomi/reader.py

View check run for this annotation

Codecov / codecov/patch

pyaerocom/plugins/tropomi/reader.py#L33

Added line #L33 was not covered by tests
"/lustre/storeB/project/fou/kl/sesam/archive/CSO-gridded/xEMEP__r01x01__qa08/NO2/2023/01"
)


class ReadTropomiL3(ReadGriddedData):

Check warning on line 38 in pyaerocom/plugins/tropomi/reader.py

View check run for this annotation

Codecov / codecov/patch

pyaerocom/plugins/tropomi/reader.py#L38

Added line #L38 was not covered by tests
"""
Expand All @@ -40,9 +44,10 @@ class ReadTropomiL3(ReadGriddedData):
_FILEMASK = "S5p_*.nc"
__version__ = "0.01"

Check warning on line 45 in pyaerocom/plugins/tropomi/reader.py

View check run for this annotation

Codecov / codecov/patch

pyaerocom/plugins/tropomi/reader.py#L44-L45

Added lines #L44 - L45 were not covered by tests

DATA_ID = ""
DATA_ID = const.TROPOMI_NAME

Check warning on line 47 in pyaerocom/plugins/tropomi/reader.py

View check run for this annotation

Codecov / codecov/patch

pyaerocom/plugins/tropomi/reader.py#L47

Added line #L47 was not covered by tests

def __init__(self, data_id=None, data_dir=None):
if data_dir is None:
raise Exception("Need a data_dir")
super.__init__(data)
data_dir = TMP_DATA_DIR

Check warning on line 51 in pyaerocom/plugins/tropomi/reader.py

View check run for this annotation

Codecov / codecov/patch

pyaerocom/plugins/tropomi/reader.py#L49-L51

Added lines #L49 - L51 were not covered by tests
# raise Exception("Need a data_dir")
super.__init__()

Check warning on line 53 in pyaerocom/plugins/tropomi/reader.py

View check run for this annotation

Codecov / codecov/patch

pyaerocom/plugins/tropomi/reader.py#L53

Added line #L53 was not covered by tests

0 comments on commit 9724c04

Please sign in to comment.