Closed bascrezee closed 4 years ago
Indeed the wrapping around of the --> the problem seems to be in the lat_bnds (!) more info to followlon
coordinate seems to be a problem, as mentioned in the linked issue.
e.g. for cds-era5-monthly (area_weighted
regridding fails):
lon_bnds =
-0.125, 0.125,
0.125, 0.375,
For CDS-SATELLITE-SOIL-MOISTURE (area_weighted
regridding works):
lon_bnds =
0, 0.25,
0.25, 0.5,
The original data (RAWOBS
) do not have any bounds, they are added during CMORization.
I checked in the documentation that the lon_bnds
are correct, and indeed they are consistent with the figure showing the tiles. However, a special comment is written that a view in terms of 'point data' is preferred over the 'tiled data':
"However, the ECMWF interpolation software does not conserve area integrals, so this visualisation can be misleading. We recommend you conceptualise ERA5 data as in (a)."
@JaroCamphuijsen @bouweandela did you try out the area_weighted
regridder on ERA5 already?
The problem here is not in ESMValCore, but rather in the CMORization of the data (which is part of ESMValTool). Therefore I will close this issue and create a new one (this afternoon) in the ESMValTool repository.
Although I did not check if the issue occurs for ERA5 (I don't have the data at the moment), I would guess it does. Let me first describe the problem.
Regridding with area_weighted
fails with this message:
File "/iris/experimental/regrid.py", line 680, in regrid_area_weighted_rectilinear_src_and_grid
raise ValueError("The horizontal grid coordinates of both the source "
ValueError: The horizontal grid coordinates of both the source and grid cubes must have contiguous bounds.
The problem is in the swapping of latitude in the CMORization. When swapping the latitude
, the latitude bounds
(2D) are swapped along both axes. This makes the latitude
axis non-contiguous. It is therefore important to first swap the latitudes, and then guess the bounds, in order for the bounds to be contiguous. See https://github.com/ESMValGroup/ESMValTool/pull/1338/commits/f55e0a90de05f033e07179c0f474b82f3b1a27bd#diff-7632d35343f0a13f17c6a0b5c8922c62R86 for how I fixed this for ERA-Interim/Land. Maybe @mattiarighi can check as well.
@bascrezee Is this issue still open? I just tested with ERA5 data and there it seems to work fine:
# ESMValTool
# recipe_python.yml
---
documentation:
description: |
Example recipe that plots the mean precipitation and temperature.
authors:
- andela_bouwe
- righi_mattia
maintainer:
- schlund_manuel
references:
- acknow_project
projects:
- esmval
- c3s-magic
datasets:
- {dataset: ERA5, project: native6, tier: 3, version: 1, type: reanaly}
preprocessors:
preprocessor1:
regrid:
target_grid: 1x1
scheme: area_weighted
diagnostics:
diagnostic1:
description: Air temperature and precipitation Python tutorial diagnostic.
themes:
- phys
realms:
- atmos
variables:
tas:
preprocessor: preprocessor1
mip: Amon
start_year: 1990
end_year: 1990
scripts:
script1:
script: examples/diagnostic.py
quickplot:
plot_type: pcolormesh
If I remember correctly, this issue has been solved by https://github.com/ESMValGroup/ESMValTool/pull/1471. So can be closed.
The preprocessor function
regrid
with argumentscheme = 'area_weighted'
fails on several observational datasets. The error thrown is:Please find below the recipe, including one dataset for which everything works fine. This bug is possibly related to: https://github.com/SciTools/iris/issues/2061
Recipe:
I will do my best to look further into this, but any help is greatly appreciated!