I need to do some calculations with a NetCDF file. So I have two variables with following dimensions and sizes:
A [time | 1] x [lev | 12] x [lat | 84] x [lon | 228]
B [lev | 12]
What I need is to produce a new array, C
, that is shaped as (1,12,84,228)
where B
contents are propagated to all dimensions of A
.
Usually, this is easily done in NCL with the conform function. I am not sure what is the equivalent of this in Python.
Thank you.