Dataset name is:
“ERA5 hourly data on single levels from 1979 to present”
Metadata are here:
https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?tab=overview
Python script to download sample data, for two days in 2018, at highest temporal resolution (hourly):
import cdsapi
c = cdsapi.Client()
c.retrieve(
'reanalysis-era5-single-levels',
{
'format':'netcdf',
'product_type':'reanalysis',
'format':'netcdf',
'variable':'boundary_layer_height',
'year':'2018',
'month':'01',
'day':[
'01','02'
],
'time':[
'00:00','01:00','02:00',
'03:00','04:00','05:00',
'06:00','07:00','08:00',
'09:00','10:00','11:00',
'12:00','13:00','14:00',
'15:00','16:00','17:00',
'18:00','19:00','20:00',
'21:00','22:00','23:00'
],
'area':[49.393, -124.863, 24.391, -66.873],
'grid':[0.125,0.125]
},
'download2.nc')
According to metadata, the resolution for athmospheric variables is 0.25*0.25 degrees so this is what was chosen in the request.
library(stars, quietly = TRUE)
## Linking to GEOS 3.7.1, GDAL 2.4.0, PROJ 5.2.0
setwd("/home/michael/Dropbox/BGU/Allan_Just/p_16_sample_code_for_PBL_data_over_US/")
# Reading NetCDF file
r = read_stars("download2.nc")
# Checking contents
r
## stars object with 3 dimensions and 1 attribute
## attribute(s), summary of first 1e+05 cells:
## download2.nc [m]
## Min. : 9.256
## 1st Qu.: 161.453
## Median : 431.646
## Mean : 498.954
## 3rd Qu.: 765.617
## Max. :1977.288
## dimension(s):
## from to offset delta refsys point values
## x 1 464 -124.925 0.125 NA NA NULL [x]
## y 1 201 49.4535 -0.125 NA NA NULL [y]
## time 1 48 2018-01-01 UTC 1 hours POSIXct NA NULL
# Plot: Entire file
plot(r)
# Plot: First time step only
plot(r[, , , 1])