Same comment as before on the loop limits:

`calloc(Nbands, sizeof(double))`

allocates memory for `Nbands` elements. Since `temp.GlAreaFract[Nbands]` refers to the `Nbands+1` element (the first element has the index [0]), there is no memory allocated for it. I think it is used in the `<= Nbands` loop, which would address unallocated memory. In C there is no check for this and you'll likely end up with an error, often in the form of unexpected behavior.