A global electric circuit model within a community climate model