Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/yaml/control_tempo_l2_hcho.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ plots:
data: ['tempo_l2_hcho_wrfchem_v4.2']
data_proc:
set_axis: True
vmax: 1e16
vmin: 0
vmax_plot: 1e16
vmin_plot: 0

plot_grp4:
type: 'taylor'
Expand Down
4 changes: 2 additions & 2 deletions examples/yaml/control_tempo_l2_no2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ plots:
data: ['tempo_l2_no2_wrfchem_v4.2']
data_proc:
set_axis: True
vmax: 1e15
vmin: 0
vmax_plot: 1e15
vmin_plot: 0

plot_grp4:
type: 'taylor'
Expand Down
31 changes: 18 additions & 13 deletions melodies_monet/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,8 @@ def plotting(self):
vmin = None
vmax = None
else:
vmin = None
vmax = None
vmin = grp_dict.get('data_proc', {}).get('vmin_plot', None)
vmax = grp_dict.get('data_proc', {}).get('vmax_plot', None)
# Select time to use as index.

# 2024-03-01 MEB needs to only apply if pandas. fails for xarray
Expand Down Expand Up @@ -2711,7 +2711,9 @@ def plotting(self):
print('Warning: vdiff_plot not specified for ' + obsvar + ', so default used.')
vdiff = None
else:
vdiff = None
vdiff = grp_dict.get('data_proc', {}).get('vdiff_plot', None)
vmax = grp_dict.get('data_proc', {}).get('vmin_plot', None)
vmin = grp_dict.get('data_proc', {}).get('vmax_plot', None)
# p_label needs to be added to the outname for this plot
outname = "{}.{}".format(outname, p_label)
splots.make_spatial_bias(
Expand Down Expand Up @@ -2751,9 +2753,9 @@ def plotting(self):
"outname": outname,
"domain_type": domain_type,
"domain_name": domain_name,
"vdiff": grp_dict["data_proc"].get("vdiff", None),
"vmax": grp_dict["data_proc"].get("vmax", None),
"vmin": grp_dict["data_proc"].get("vmin", None),
"vdiff": vdiff,
"vmax": vmax,
"vmin": vmin,
"nlevels": grp_dict["data_proc"].get("nlevels", None),
"fig_dict": fig_dict,
"text_dict": text_dict,
Expand All @@ -2772,16 +2774,19 @@ def plotting(self):
"ylabel": use_ylabel,
"domain_type": domain_type,
"domain_name": domain_name,
"vmax": grp_dict["data_proc"].get("vmax", None),
"vmin": grp_dict["data_proc"].get("vmin", None),
"vdiff": vdiff,
"vmax": vmax,
"vmin": vmin,
"fig_dict": fig_dict,
"text_dict": text_dict,
"debug": self.debug,
}
if isinstance(plot_kwargs["vmax"], str):
plot_kwargs["vmax"] = float(plot_kwargs["vmax"])
if isinstance(plot_kwargs["vdiff"], str):
plot_kwargs["vdiff"] = float(plot_kwargs["vdiff"])
if isinstance(plot_kwargs["vmin"], str):
plot_kwargs["vmin"] = float(plot_kwargs["vmin"])
if isinstance(plot_kwargs["vmax"], str):
plot_kwargs["vmax"] = float(plot_kwargs["vmax"])
xrplots.make_spatial_dist(**plot_kwargs)
plot_kwargs["varname"] = modvar
plot_kwargs["label"] = p.model
Expand Down Expand Up @@ -2835,9 +2840,9 @@ def plotting(self):
vmax = None
nlevels = None
else:
vmin = None
vmax = None
nlevels = None
vmin = grp_dict.get("data_proc", {}).get("vmin_plot", None)
vmin = grp_dict.get("data_proc", {}).get("vmax_plot", None)
nlevels = grp_dict.get("data_proc", {}).get("nlevels", None)
#Check if z dim is larger than 1. If so select, the first level as all models read through
#MONETIO will be reordered such that the first level is the level nearest to the surface.
# Create model slice and select time window for spatial plots
Expand Down