I struggled with the same problem for a few hours due to a lack of helpful answers online.
This line:
self.file[var] = self.file[var].where(self.not_rectangle, other=val)
was giving an error similar to yours:
indexes along dimension 'lsmlat' are not equal
I solved it by adding the extension .data in my definition of self.rectangle:
self.rectangle = self._landmask_file.landmask_diff.data
I hope this helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.