Yes. Everything Ross wrote. I'll add an addition consideration.
Ambient Temperature
is always a major factor, with solar. Especially the exterior conductors & the connection points.
For flexible cords, see Table 400.4, Table 400.5(A)(1), and Table 400.5(A)(2).
Read the notes at the bottom of the table, above.
"...where the ambient temperature is other than 30°C (86°F)."
ie the temp of the rooftop or the air under a solar panel, whichever greater.
Ampacities for ambient temperatures other than those shown in the ampacity tables shall be corrected in accordance with Table 310.15(B)(1) or Table 310.15(B)(2)
below, or shall be permitted to be calculated using Equation 310.15(B):
where:
I' = ampacity corrected for ambient temperature
I = ampacity shown in the tables
Tc = temperature rating of conductor (°C)
Ta' = new ambient temperature (°C)
Ta = ambient temperature used in the table (°C)
More simply, multiply your wire rating by the appropriate factor above.
As you can see in table 310.15(B)
(2)(a), the ampacity of conductors (with 75°C/167°F rating) installed on a cool 114° roof is further
derated to only 75% of its "rated" current carrying capacity.
*Additional derating for
Conduit Fill, Table 310.15(B)(3)(a) may also apply, in some circumstances.
This is the shortest description I can offer. Please, take a moment to read more about the Ampacities Tables here:
up.codes/ampacity-tables
(& keep scrolling down)