This subroutine should be identical to the existing subroutine in pop model.
This subroutine should be identical to the existing subroutine in pop model.