Using CORDEX data when grid doesn't align to expected domain grid #3176
Unanswered
mo-acottrel
asked this question in
New to ESMValTool
Replies: 1 comment 1 reply
-
Hi @mo-acottrel 👋 and welcome to ESMValTool! 😁 I know @nhsavage did some work on regridding for CORDEX at the last workshop; @nhsavage, is this an issue you have experienced previously? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm working with CORDEX data but am getting an error for some cordex models, I think due to the grid of the CORDEX cube not matching the expected grid for the domain.
For example, with these cubes:
2023-05-11 16:15:57,772 UTC [84600] ERROR esmvalcore.preprocessor:353 Failed to run preprocessor function 'fix_metadata' on the data
[<iris 'Cube' of precipitation_flux / (kg m-2 s-1) (time: 1826; grid_latitude: 167; grid_longitude: 143)>,
<iris 'Cube' of precipitation_flux / (kg m-2 s-1) (time: 1826; grid_latitude: 167; grid_longitude: 143)>]
loaded from original input file(s)
[LocalFile('/project/champ/data/cordex/output/SAM-44/MPI-CSC/MPI-M-MPI-ESM-LR/rcp85/r1i1p1/REMO2009/v1/day/pr/v20160902/pr_SAM-44_MPI-M-MPI-ESM-LR_rcp85_r1i1p1_MPI-CSC-REMO2009_v1_day_20410101-20451231.nc'),
LocalFile('/project/champ/data/cordex/output/SAM-44/MPI-CSC/MPI-M-MPI-ESM-LR/rcp85/r1i1p1/REMO2009/v1/day/pr/v20160902/pr_SAM-44_MPI-M-MPI-ESM-LR_rcp85_r1i1p1_MPI-CSC-REMO2009_v1_day_20460101-20501231.nc')]
Then the following error is generated:
File "/opt/scitools/conda/environments/esmvaltool-2.8.0/lib/python3.10/site-packages/esmvalcore/cmor/fix.py", line 149, in fix_metadata
cube_list = fix.fix_metadata(cube_list)
File "/opt/scitools/conda/environments/esmvaltool-2.8.0/lib/python3.10/site-packages/esmvalcore/cmor/_fixes/cordex/cordex_fixes.py", line 193, in fix_metadata
self._fix_rotated_coords(cube, domain, domain_info)
File "/opt/scitools/conda/environments/esmvaltool-2.8.0/lib/python3.10/site-packages/esmvalcore/cmor/_fixes/cordex/cordex_fixes.py", line 144, in _fix_rotated_coords
self._check_grid_differences(old_coord, new_coord)
File "/opt/scitools/conda/environments/esmvaltool-2.8.0/lib/python3.10/site-packages/esmvalcore/cmor/_fixes/cordex/cordex_fixes.py", line 114, in _check_grid_differences
diff = np.max(np.abs(old_coord.points - new_coord.points))
ValueError: operands could not be broadcast together with shapes (143,) (146,)
main_log_debug.txt
Is there currently a way to use such CORDEX data in ESMValTool? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions