-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grid mapping definitions of CNRM-ALADIN64E1
#35
Comments
Hello Lars, thanks for pointing out this error, indeed it should be "lambert_conformal_conic", I will correct it |
Thanks! It's not a big issue for the evaluation overview, the rest of the grid definition (lon/lat) and bounds seem fine. |
@pierrenabat I can make a reasonable plot of import cartopy.crs as ccrs
import cartopy.feature as cf
import matplotlib.pyplot as plt
import xarray as xr
cnrm = xr.open_dataset("/mnt/CORDEX_CMIP6_tmp/sim_data/CORDEX/CMIP6/DD/EUR-12/CNRM-MF/ERA5/evaluation/r1i1p1f1/CNRM-ALADIN64E1/v1-r1/fx/orog/v20250116/orog_EUR-12_ERA5_evaluation_r1i1p1f1_CNRM-MF_CNRM-ALADIN64E1_v1-r1_fx.nc")
smhi = xr.open_dataset("/mnt/CORDEX_CMIP6_tmp/sim_data/CORDEX/CMIP6/DD/EUR-12/HCLIMcom-SMHI/ERA5/evaluation/r1i1p1f1/HCLIM43-ALADIN/v1-r1/fx/orog/v20241205/orog_EUR-12_ERA5_evaluation_r1i1p1f1_HCLIMcom-SMHI_HCLIM43-ALADIN_v1-r1_fx.nc")
# fix coordinates, see e.g. SMHI coordinates
cnrm['x'] = cnrm.x * 1000. + 100000.
cnrm['y'] = cnrm.y * 1000. + 100000.
transform = ccrs.LambertConformal(central_longitude=10.5, central_latitude=49.5,
false_easting=2924999.9999999995, false_northing=2924999.9999999986,
standard_parallels=(49.5, 49.5),
globe=None, cutoff=-30)
def plot(ds):
plt.figure(figsize=(10,8))
ax = plt.axes(projection=transform)
ax.gridlines(draw_labels=True, linewidth=0.5, color='gray',
xlocs=range(-180,180,10), ylocs=range(-90,90,5))
ds.orog.plot(ax=ax, transform=transform, cmap="terrain", vmin=-500, vmax=3000)
ax.coastlines(resolution='50m', color='black', linewidth=1)
ax.add_feature(cf.BORDERS)
plot(cnrm) As you can see, i used grid mapping definitions from @gnikulin: I'm no expert in lambert conformal grids, but to me it seems, that see, e.g., smhi.crs.attrs
|
For example:
@pierrenabat
The grid mapping name here should be
lambert_conformal_conic
, notlatitude_longitude
. This will not work with CF compliant tools.See also this comment
The text was updated successfully, but these errors were encountered: