Skip to content

Commit

Permalink
Allow datasets without project in multi_datasets.py (#3552)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlunma authored Mar 21, 2024
1 parent 14d0aff commit d607060
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions esmvaltool/diag_scripts/monitor/multi_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,17 +2059,16 @@ def create_map_plot(self, datasets):
)
caption = (
f"Map plot of {dataset['long_name']} of dataset "
f"{dataset['dataset']} (project {dataset['project']})."
f"{dataset['alias']}."
)
else:
(plot_path, netcdf_paths) = (
self._plot_map_with_ref(plot_func, dataset, ref_dataset)
)
caption = (
f"Map plot of {dataset['long_name']} of dataset "
f"{dataset['dataset']} (project {dataset['project']}) "
f"including bias relative to {ref_dataset['dataset']} "
f"(project {ref_dataset['project']})."
f"{dataset['alias']} including bias relative to "
f"{ref_dataset['alias']}."
)
ancestors.append(ref_dataset['filename'])

Expand Down Expand Up @@ -2134,7 +2133,7 @@ def create_zonal_mean_profile_plot(self, datasets):
)
caption = (
f"Zonal mean profile of {dataset['long_name']} of dataset "
f"{dataset['dataset']} (project {dataset['project']})."
f"{dataset['alias']}."
)
else:
(plot_path, netcdf_paths) = (
Expand All @@ -2143,9 +2142,8 @@ def create_zonal_mean_profile_plot(self, datasets):
)
caption = (
f"Zonal mean profile of {dataset['long_name']} of dataset "
f"{dataset['dataset']} (project {dataset['project']}) "
f"including bias relative to {ref_dataset['dataset']} "
f"(project {ref_dataset['project']})."
f"{dataset['alias']} including bias relative to "
f"{ref_dataset['alias']}."
)
ancestors.append(ref_dataset['filename'])

Expand Down Expand Up @@ -2386,19 +2384,16 @@ def create_hovmoeller_z_vs_time_plot(self, datasets):
plot_func, dataset))
caption = (
f"Hovmoeller Z vs. time plot of {dataset['long_name']} "
f"of dataset "
f"{dataset['dataset']} (project {dataset['project']})."
f"of dataset {dataset['alias']}."
)
else:
(plot_path,
netcdf_paths) = (self._plot_hovmoeller_z_vs_time_with_ref(
plot_func, dataset, ref_dataset))
caption = (
f"Hovmoeller Z vs. time plot of {dataset['long_name']} "
f"of dataset "
f"{dataset['dataset']} (project {dataset['project']}) "
f"including bias relative to {ref_dataset['dataset']} "
f"(project {ref_dataset['project']})."
f"of dataset {dataset['alias']} including bias relative "
f"to {ref_dataset['alias']}."
)
ancestors.append(ref_dataset['filename'])

Expand Down Expand Up @@ -2464,7 +2459,7 @@ def create_hovmoeller_time_vs_lat_or_lon_plot(self, datasets):
)
caption = (
f"Hovmoeller plot of {dataset['long_name']} of dataset "
f"{dataset['dataset']} (project {dataset['project']})."
f"{dataset['alias']}."
)
else:
(plot_path, netcdf_paths) = (
Expand All @@ -2473,9 +2468,8 @@ def create_hovmoeller_time_vs_lat_or_lon_plot(self, datasets):
)
caption = (
f"Hovmoeller plot of {dataset['long_name']} of dataset "
f"{dataset['dataset']} (project {dataset['project']}) "
f"including bias relative to {ref_dataset['dataset']} "
f"(project {ref_dataset['project']})."
f"{dataset['alias']} including bias relative to "
f"{ref_dataset['alias']}."
)
ancestors.append(ref_dataset['filename'])

Expand Down

0 comments on commit d607060

Please sign in to comment.