Soil C and N variables are changed to previous code which uses soil matrix. Added db.close at the end of the code to close to connections to databases to avoid getting an error of 'too many connections'.