The "Non-existent key .." error suggests that something is wrong in the effluent model (defractionation).
I don't quite understand what do you mean by:
[quote]I changed the AD block which I had taken from UCT_PWM_SA template to the one that is included in ASM1Temp block library[/quote]
I guess you have changed the Instance, from PWM_SA to ASM1Temp, right?
In this case, you also need to recreate both the influent (fractionation) and the effluent (defractionation) models to match the new state vector.
Another option may be that the ".out_1.COD" is used in the scope of a Calculator Variable (are you using one of the tutorials?) in which case you may by-pass the error by simply deleting the Calculator Variable.