If in doubt, best to have junction box at the top if possible. One manufacturer says:
"The correct order to orient the module is vertical with the junction box on the higher side of it. The reason for this is that the breather port in the junction box, must be mounted facing downwards and not be exposed to any rain."