Combining two different data arrays from ERA5

I’m trying to combine the data arrays from the ERA5 Single Levels and Pressure Levels using xarray (both in netcdf) in hopes to compute for kinematic variables such as bulk shear, storm-relative helicity and even other thermodynamic variables.

They have the same time and space (spatial extent), except for the pressure level data which had pressure_level coordinate. I would like to ask for some help if there is a way to do such combination, particularly on combining the single-level wind components (including its respective ‘surface pressure’) with the pressure-level wind components?

Sample data are attached in this post for your convenience. (Data 1 and Data 2)

Unfortunately, I’m not versatile (i.e. I’m just novice) or not completely comfortable with the use of xarray. But what I’m thinking is that we can;

  1. “Broadcast” the pressure_level coordinate into a 3d array like those in geopotential, uwind components in pressure level etc.
  2. Combine single and pressure levels
  3. Do a lengthy for loop for computing thermodynamic (e.g. EL etc) and kinematic parameters (e.g. SRH)

Any help or minimum working example on this one is greatly appreciated.

Seems like more an xarray question? I am not an expert but this example with the google copy of ERA5 seems to combine (merge) single-level fields like u10 with pressure-level fields like geopotential height.

Yup, related to xarray stuff. Thanks for answering though! What I mean was combining both the u10 parameter with the uwind in pressure-level into a single data array.

e.g. [u10, 1000 hpa u wind, 975 hpa u wind, 950 hpa u wind … so on.]

1 Like