The documentation https://rasterio.readthedocs.io/en/latest/api/rasterio.merge.html says: "Input files are merged in their listed order using the reverse painter’s algorithm (default) or another method." And for the available methods predefined by rasterio: "first: reverse painting last: paint valid new on top of existing min: pixel-wise min of existing and new max: pixel-wise max of existing and new" You can also write your own function, for example for a median or average of the files. For your use case of removing clouds, you will probably not get good results from the predefined functions, a min for example would leave you without white clouds but with their dark shadows.