Skip to content

Commit

Permalink
clean up recipe, all blocks running
Browse files Browse the repository at this point in the history
  • Loading branch information
lukruh committed Sep 5, 2023
1 parent db69135 commit 436f3b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 44 deletions.
8 changes: 0 additions & 8 deletions esmvaltool/diag_scripts/monitor/multi_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,17 +1237,12 @@ def _plot_hovmoeller_time_vs_lat_or_lon_with_ref(self, plot_func, dataset,
plot_data = plot_func(cube, **plot_kwargs)
axes_data.set_title(self._get_label(dataset), pad=3.0)
axes_data.set_ylabel('Time / Year')
if "latitude" in dim_coords_dat:
axes_data.set_xlabel('Latitude / °N')
elif "longitude" in dim_coords_dat:
axes_data.set_xlabel('Longitude / °E')
plt.gca().yaxis.set_major_locator(mdates.YearLocator())
plt.gca().yaxis.set_major_formatter(mdates.DateFormatter("%Y"))
if self.plots[plot_type]['show_y_minor_ticks']:
plt.gca().yaxis.set_minor_locator(mdates.MonthLocator())
if self.plots[plot_type]['show_x_minor_ticks']:
plt.gca().xaxis.set_minor_locator(AutoMinorLocator())
# self._add_stats(plot_type, axes_data, dim_coords_dat, dataset)

# Plot reference dataset (top right)
# Note: make sure to use the same vmin and vmax than the top left
Expand Down Expand Up @@ -1442,8 +1437,6 @@ def _get_multi_dataset_facets(datasets):
@staticmethod
def _get_reference_dataset(datasets, short_name):
"""Extract reference dataset."""
print("MEMEMME")
print(datasets)
ref_datasets = [d for d in datasets if
d.get('reference_for_monitor_diags', False)]
if len(ref_datasets) > 1:
Expand Down Expand Up @@ -1888,7 +1881,6 @@ def create_hovmoeller_time_vs_lat_or_lon_plot(self, datasets, short_name):

# Create a single plot for each dataset (incl. reference dataset if
# given)

for dataset in datasets:
if dataset == ref_dataset:
continue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,22 @@
# ESMValTool
#
# General instructions:
#
# (1) Copy the configuration file
# /work/bd1179/esmvaltool_hackathon/config/config-user.yml to
# $HOME/.esmvaltool/config-user.yml ($HOME is YOUR home directory) and modify
# the 'output_dir' key (we recommend your scratch directory /scratch/$USER/).
# (2) Copy all diagnostics in /work/bd1179/esmvaltool_hackathon/diag_scripts/
# to a location of your choice.
# (3) Copy this recipe to a location of your choice.
# (4) Modify the diagnostics paths in this recipe ('script: xxx.py') to point
# to your copy of the diagnostic scripts (see (2)).
# (5) Run ESMValTool by 'esmvaltool run /path/to/your/copy/of/this/recipe.yml.'
# (6) To re-run a single diagnostic wihtout invoking ESMValTool over and over,
# look for "To re-run this diagnostic ..." lines in the output log and
# copy-paste the relevant command to your shell, add a '-f' flag at the end
# and run it. Remember: if you change the recipe, you NEED to re-run the
# entire recipe!
#
---
documentation:
title: ICON Evaluation.
description: Evaluate ICON simulations with observational products.
authors:
- schlund_manuel


preprocessors:

zonal_mean: # this is an arbitrary name (used in the 'variables' section below)
regrid: # this is a predefined name (see https://docs.esmvaltool.org/projects/ESMValCore/en/latest/recipe/preprocessor.html)
zonal_mean:
regrid:
target_grid: 2x2
scheme:
reference: esmf_regrid.schemes:ESMFAreaWeighted
zonal_statistics:
operator: mean

meridional_mean: # this is an arbitrary name (used in the 'variables' section below)
regrid: # this is a predefined name (see https://docs.esmvaltool.org/projects/ESMValCore/en/latest/recipe/preprocessor.html)
meridional_mean:
regrid:
target_grid: 2x2
scheme:
reference: esmf_regrid.schemes:ESMFAreaWeighted
Expand All @@ -47,8 +26,7 @@ preprocessors:

diagnostics:

time_vs_lat_without_ref: # this is an arbitrary name
# Should create a single panel with a time vs. latitude contour plot
time_vs_lat_without_ref:
variables:
tas:
preprocessor: zonal_mean
Expand All @@ -57,19 +35,13 @@ diagnostics:
additional_datasets:
- {project: ICON, dataset: ICON, exp: icon-2.6.1_atm_amip_R2B5_r1v1i1p1l1f1}
scripts:
plot: # this is an arbitrary name
plot:
script: monitor/multi_datasets.py
plot_folder: '{plot_dir}'
plot_filename: '{plot_type}_{real_name}_{dataset}_{mip}'
plots:
hovmoeller_time_vs_lat_or_lon:
# common_cbar: true
# show_x_minor_ticks: true
# show_y_minor_ticks: true
# rasterize: true
plot_func: contourf
# plot_kwargs:
# levels: 20
common_cbar: true

time_vs_lat_with_ref:
variables:
Expand Down

0 comments on commit 436f3b5

Please sign in to comment.