Add use_standard_grid option for CORDEX datasets#3059
Open
bouweandela wants to merge 25 commits into
Open
Conversation
Member
Author
|
Recipe for testing: Detailsdocumentation:
title: |
Example recipe that loads CORDEX-CMIP5 datasets.
description: |
This is an example recipe that loads CORDEX-CMIP5 datasets.
It computes the climatology for surface temperature (ts).
authors:
- andela_bouwe
maintainer:
- andela_bouwe
preprocessors:
preprocessor:
extract_region:
start_longitude: 0
end_longitude: 2
start_latitude: 50
end_latitude: 52
diagnostics:
land_area_fraction_europe:
additional_datasets:
- dataset: ALADIN53
driver: CNRM-CERFACS-CNRM-CM5
ensemble: r1i1p1
institute: CNRM
rcm_version: v1
- dataset: ALADIN63
driver: CNRM-CERFACS-CNRM-CM5
ensemble: r1i1p1
institute: CNRM
rcm_version: v2
variables:
sftlf:
project: CORDEX
mip: fx
domain: EUR-11
exp: historical
timerange: 2003/2005
# preprocessor: preprocessor
use_standard_grid: true
scripts:
plot:
plot_folder: '{plot_dir}'
plot_filename: '{plot_type}_{real_name}_{alias}_{mip}'
facet_used_for_labels: 'alias'
script: monitor/multi_datasets.py
plots:
map:
# plot_func: pcolor
show_stats: false
land_area_fraction_south_pole:
additional_datasets:
- institute: DMI
driver: ICHEC-EC-EARTH
ensemble: r3i1p1
dataset: HIRHAM5
rcm_version: v1
variables:
sftlf:
project: CORDEX
mip: fx
domain: ANT-44
exp: historical
timerange: 2003/2005
use_standard_grid: true
scripts:
plot:
plot_folder: '{plot_dir}'
plot_filename: '{plot_type}_{real_name}_{alias}_{mip}'
facet_used_for_labels: 'alias'
script: monitor/multi_datasets.py
plots:
map:
show_stats: false
projection: SouthPolarStereo |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3059 +/- ##
==========================================
+ Coverage 96.16% 96.18% +0.01%
==========================================
Files 270 271 +1
Lines 15831 15905 +74
==========================================
+ Hits 15224 15298 +74
Misses 607 607 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…coordinate systems in a single cube
Member
Author
|
Code for testing from esmvalcore.dataset import Dataset
import iris.quickplot
import matplotlib.pyplot as plt
ds = Dataset(
short_name="sftlf",
mip="fx",
project="CORDEX",
domain="EUR-11",
dataset="ALADIN63",
driver="CNRM-CERFACS-CNRM-CM5",
institute="CNRM",
exp="historical",
ensemble="r1i1p1",
rcm_version="v2",
timerange="2001/2002",
use_standard_grid=True,
)
cube = ds.load()
# Plot the data
iris.quickplot.pcolormesh(cube, coords=["projection_x_coordinate", "projection_y_coordinate"])
# Plot coastlines
plt.gca().coastlines()
# To plot individual points:
# iris.quickplot.points(cube, s=1, c=cube.data, coords=["projection_x_coordinate", "projection_y_coordinate"])
# To plot geographical coordinates:
# iris.quickplot.pcolormesh(cube, coords=["longitude", "latitude"])
# To plot grid boxes and points:
# iris.plot.points(cube[:2, :3], coords=["longitude", "latitude"])
# iris.plot.outline(cube[:2, :3], coords=["longitude", "latitude"])
plt.show() |
8 tasks
use_standard_grid option for CORDEX datasets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an option to specify
use_standard_grid: truefor CORDEX datasets to replace the grid by the standard CORDEX grid. Works for rotated pole coordinates and, if the grid mapping is correct, for Lambert conformal coordinates as well.Also includes a fix for the units of ALADIN53
sftlfandts.Closes #2840
Closes #2036
Link to documentation: https://esmvaltool--3059.org.readthedocs.build/projects/ESMValCore/en/3059/recipe/overview.html#cordex-datasets
Backward incompatible change
Replacing the grid by a standard grid is no longer done automatically if grid differences are small, but needs to be enabled on a per-dataset basis by adding
use_standard_grid: trueto the dataset in the recipe (or default extra facets for the CORDEX project to make it permanent).Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
Changes are backward compatibleTo help with the number pull requests: