Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add variable long names to provenance record in monitoring diagnostics #3222

Merged
merged 9 commits into from
Jun 16, 2023
1 change: 1 addition & 0 deletions esmvaltool/diag_scripts/monitor/monitor_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def record_plot_provenance(self, filename, var_info, plot_type, **kwargs):
prov = self.get_provenance_record(
ancestor_files=[var_info['filename']],
plot_type=plot_type,
schlunma marked this conversation as resolved.
Show resolved Hide resolved
long_names=[var_info[names.LONG_NAME]],
**kwargs,
)
provenance_logger.log(filename, prov)
Expand Down
4 changes: 4 additions & 0 deletions esmvaltool/diag_scripts/monitor/multi_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,7 @@ def create_timeseries_plot(self, datasets, short_name):
'authors': ['schlund_manuel'],
'caption': caption,
'plot_types': ['line'],
'long_names': [var_attrs['long_name']],
}
with ProvenanceLogger(self.cfg) as provenance_logger:
provenance_logger.log(plot_path, provenance_record)
Expand Down Expand Up @@ -1332,6 +1333,7 @@ def create_annual_cycle_plot(self, datasets, short_name):
'authors': ['schlund_manuel'],
'caption': caption,
'plot_types': ['seas'],
'long_names': [var_attrs['long_name']],
}
with ProvenanceLogger(self.cfg) as provenance_logger:
provenance_logger.log(plot_path, provenance_record)
Expand Down Expand Up @@ -1406,6 +1408,7 @@ def create_map_plot(self, datasets, short_name):
'authors': ['schlund_manuel'],
'caption': caption,
'plot_types': ['map'],
'long_names': [dataset['long_name']],
}
with ProvenanceLogger(self.cfg) as provenance_logger:
provenance_logger.log(plot_path, provenance_record)
Expand Down Expand Up @@ -1483,6 +1486,7 @@ def create_zonal_mean_profile_plot(self, datasets, short_name):
'authors': ['schlund_manuel'],
'caption': caption,
'plot_types': ['vert'],
'long_names': [dataset['long_name']],
}
with ProvenanceLogger(self.cfg) as provenance_logger:
provenance_logger.log(plot_path, provenance_record)
Expand Down