Closed svniemeijer closed 4 years ago
For now this can be worked around by removing the angle weight variables (e.g. performing a exclude(latitude_bounds_weight,longitude_bounds_weight,latitude_weight,longitude_weight)
) directly after performing a bin()
operation.
Fixed in 78fa55b4bfd9df9692c708d17849b50f81a1634f
A better approach is to actually squash the time dimension for the lat/lon variables before performing the bin()
operation:
squash(time, (latitude,longitude,latitude_bounds,longitude_bounds));bin()
This approach is the preferred approach since the squash operation will raise errors if you try to merge grids with different lat/lon axis (whereas performing a bin() first would just average the axis values.
This error appears if, for instance, you try to merge daily gridded averages (i.e. the result of a bin_spatial + temporal bin of daily orbits) into a monthly gridded average. The problem is in the dual usage of 'weight' variables for both spatial binning and angle variables.