'ValueError: arguments without labels along dimension 'rows' cannot be aligned because they have different dimension sizes: {2400, 1200}
My objective is to convert the radiance parameter to reflectance from the sentinel three slstr data.
The formula that I am applying is:
relfectance = pi*radiance/solar_radiance/cos(solar_zenith_angle)
The data contains multiple files in netCDF format. It contains S1-S6 radiance and quality data and S7-S9 BT data. It also consists of geometry files that contains solar zenith angles.
I am using xarray to read these files.
For instance, I am using S6 radiance data to store radiance: radiance = S6_radiance['S6_radiance_an']
S6 quality data to store solar irradiance: solar_irradiance = S6_quality['solar_irradiance_an']
cosine_zenith = np.cos(geometry['solar_zenith_tn']
when I substitute the data in the formula: reflectance = pi*radiance/solar_irradiance/cosine_zenith
It gives me an error. It says:
ValueError: arguments without labels along dimension 'rows' cannot be aligned because they have different dimension sizes: {2400, 1200}
The dimensions are:
radiance.dims = ('rows', 'columns')
radiance.shape = (2400, 3000)
solar_irradiance.dims = ('detectors',)
solar_irradiance.shape = (4,)
cosine_zenith.dims = ('rows', 'columns')
cosine_zenith.shape = (1200, 130)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
