Modifications to ensure that derived variables and forcings are dealt with correctly for both R and C++ cases.