Skip to content

Commit

Permalink
Finding out why no data in output WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisblake committed Jul 19, 2023
1 parent 6cb4302 commit cf9b70f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
11 changes: 8 additions & 3 deletions pyaerocom/aeroval/coldatatojson_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def run(self, files):
for file in files:
logger.info(f"Processing: {file}")
coldata = ColocatedData(file)
self.process_coldata(coldata)
self.process_coldata(
coldata
) # Lb: possibly want a flag in the coldata objects which processes the profile coldata objects for viz
converted.append(file)
return converted

Expand Down Expand Up @@ -160,10 +162,12 @@ def process_coldata(self, coldata: ColocatedData):

use_country = True if regions_how == "country" else False

data = _init_data_default_frequencies(coldata, freqs)
data = _init_data_default_frequencies(
coldata, freqs
) # LB: Here not all coldata has nans but data is all nans for all freqs

if annual_stats_constrained:
data = _apply_annual_constraint(data)
data = _apply_annual_constraint(data) # LB: maybe this is setting everything to nans

if not diurnal_only:
logger.info("Processing statistics timeseries for all regions")
Expand All @@ -189,6 +193,7 @@ def process_coldata(self, coldata: ColocatedData):
ts_file, stats_ts, obs_name, var_name_web, vert_code, model_name, model_var
)

breakpoint()
logger.info("Processing heatmap data for all regions")
hm_all = _process_heatmap_data(
data,
Expand Down
10 changes: 9 additions & 1 deletion pyaerocom/colocateddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,15 @@ def rename_variable(self, var_name, new_var_name, data_source, inplace=True):

@staticmethod
def _aerocom_savename(
obs_var, obs_id, mod_var, mod_id, start_str, stop_str, ts_type, filter_name, vertical_layer
obs_var,
obs_id,
mod_var,
mod_id,
start_str,
stop_str,
ts_type,
filter_name,
vertical_layer=None, # LB: testing this because I don't want this to be required
):
if (
not vertical_layer is None
Expand Down

0 comments on commit cf9b70f

Please sign in to comment.