Skip to content

Commit

Permalink
File convention WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisblake committed Aug 9, 2023
1 parent 9724c04 commit d11a699
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyaerocom/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import getpass
reimport getpass
import logging
import os
from configparser import ConfigParser
Expand Down
4 changes: 1 addition & 3 deletions pyaerocom/io/readgridded.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ class specifying details of the file naming convention for the model
VERT_ALT = {"Surface": "ModelLevel"}

def __init__(self, data_id=None, data_dir=None, file_convention="aerocom3"):

self._data_dir = None

#: data_id of gridded dataset
Expand Down Expand Up @@ -444,7 +443,6 @@ def _check_var_match_pattern(self, var_name):
if fnmatch.fnmatch(var_name, pattern):
vars_required = self.AUX_REQUIRES[pattern]
for addvar in vars_required:

if not "*" in addvar:
vars_found.append(addvar)
else:
Expand Down Expand Up @@ -696,6 +694,7 @@ def _update_file_convention(self, files):
FileNotFoundError
if none of the input files matches a registered convention.
"""
breakpoint()
for file in files:
try:
self.file_convention.from_file(os.path.basename(file))
Expand Down Expand Up @@ -1663,7 +1662,6 @@ def read_var(
)

if constraints is not None:

if isinstance(constraints, dict):
constraints = [constraints]
for constraint in constraints:
Expand Down
6 changes: 3 additions & 3 deletions pyaerocom/plugins/tropomi/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import xarray as xr

from pyaerocom import const
from pyaerocom.io.readgridded import ReadGriddedBase
from pyaerocom.io.readgridded import ReadGridded
from pyaerocom.stationdata import StationData
from pyaerocom.griddeddata import GriddedData

Expand All @@ -35,7 +35,7 @@
)


class ReadTropomiL3(ReadGriddedData):
class ReadTropomiL3(ReadGridded):
"""
Class to read processed TROPOMI data (homebrewed L3 data) for use in SESAM.
e.g., Tropospheric vertical column of nitrogen dioxide
Expand All @@ -50,4 +50,4 @@ def __init__(self, data_id=None, data_dir=None):
if data_dir is None:
data_dir = TMP_DATA_DIR
# raise Exception("Need a data_dir")
super.__init__()
super().__init__(data_dir=data_dir)

0 comments on commit d11a699

Please sign in to comment.