DFT+Hubbard
Use Hubbard_occ instead of upf(nt)%oc(n) to check the occupations of the atomic orbitals. Hubbard_occ can be set from the input file. This could allow one e.g. to replace zero occupations by some small numbers and let the code to apply +U to the empty states.