UCSB Physics CS31-36 is a six quarter (two academic year sequence). Ordinarily, an advanced student taking college courses should be fine, but the fact that frosh/soph physics courses order the topics differently at different schools may mean that if he later attends a non-UCSB school (or UCSB in non-CCS) that the courses he has taken at UCSB may not align exactly with the courses at the new school.
UCSB Earth Science 114 or Computer Science 138 are best thought of as elective courses; if he chooses one, he can choose whatever is more interesting to him, and which he can get into.
UCSB CS 138 seems to be open to computer science or computer engineering majors only; would be be able to get into the course?
https://www.cs.ucsb.edu/education/courses/cmpsc-138