Projections
[1]:
import earthkit.data as ekd
[2]:
efas = ekd.from_source("sample", "efas.grib")
efas.ls()
[2]:
| centre | shortName | typeOfLevel | level | dataDate | dataTime | stepRange | dataType | number | gridType | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | ecmf | dis06 | surface | 0 | 20221008 | 1200 | 0-6 | sfo | None | lambert_azimuthal_equal_area |
[3]:
projection = efas[0].projection()
print(projection)
+proj=laea +lon_0=10.000000 +lat_0=52.000000 +a=6378137.000000 +b=6356752.314000
[4]:
projection.to_proj_string()
[4]:
'+proj=laea +lon_0=10.000000 +lat_0=52.000000 +a=6378137.000000 +b=6356752.314000'
[5]:
projection.to_cartopy_crs()
[5]:
<cartopy.crs.LambertAzimuthalEqualArea object at 0x28e72eb10>
[6]:
print(projection.parameters)
print(projection.globe)
{'central_longitude': 10.0, 'central_latitude': 52.0}
{'semimajor_axis': 6378137.0, 'semiminor_axis': 6356752.314}
[7]:
era5 = ekd.from_source("sample", "test.grib")
era5.ls()
[7]:
| centre | shortName | typeOfLevel | level | dataDate | dataTime | stepRange | dataType | number | gridType | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | ecmf | 2t | surface | 0 | 20200513 | 1200 | 0 | an | 0 | regular_ll |
| 1 | ecmf | msl | surface | 0 | 20200513 | 1200 | 0 | an | 0 | regular_ll |
[8]:
projection = era5[0].projection()
print(projection)
+proj=longlat +datum=WGS84 +no_defs +type=crs
[9]:
projection.to_proj_string()
[9]:
'+proj=longlat +datum=WGS84 +no_defs +type=crs'
[10]:
projection.to_cartopy_crs()
[10]:
<cartopy.crs.PlateCarree object at 0x291dae650>
[11]:
print(projection.parameters)
{}