Is there a preprocessor to apply vertical regridding? I'd like to regrid the vertical layers of a model transect to match the observational data vertical structure.
Is this possible at the moment?
Cheers!
Yes, with these lines in the preprocessor:
extract_levels:
levels:
scheme: linear
levels can be either a list of hard-coded target levels, a dataset name (whose vertical coordinate will be used as target) or reference_dataset (equivalent to dataset name for the reference dataset).
Brilliant, thanks!
Note that levels can also be a group of levels defined in a cmor table.
Hi @mattiarighi, how do set the extract levels to match a reference dataset? @ytakano3 is trying this at the moment.
Try something like:
Of course reference_dataset needs to be defined in the variable dict:
https://github.com/ESMValGroup/ESMValTool/blob/1eaa7d6f22fb6f66477125219d6ce20623842cfe/esmvaltool/recipes/recipe_perfmetrics_CMIP5.yml#L520-L531
HI @mattiarighi ,
thanks for the help with this.
We're looking at this now, but it looks like the extract_levels is hardwired to look for air_pressure as the z-coordinate in the get_reference_levels function. This is probably a bug. Any ideas?
Well, it's not a bug, it's rather a missing feature :smile:
It was implemented only for atmospheric variables, but I guess it can be easily changed to work with any vertical coordinate.
fix in #867
Most helpful comment
Yes, with these lines in the preprocessor:
levelscan be either a list of hard-coded target levels, a dataset name (whose vertical coordinate will be used as target) orreference_dataset(equivalent to dataset name for the reference dataset).