Reversible and irreversible magnetocaloric effect in the NdBa2Cu3O7 superconductor in relation to specific heat and magnetization