@@ -157,15 +157,22 @@ void CarbonScalers::calcScalers(int aGCAMYear, double *aELMArea, double *aELMPFT
157
157
std::vector<int >& aYears, std::vector<std::string>& aRegions, std::vector<std::string>& aLandTechs, std::vector<double >& aAboveScalers,
158
158
std::vector<double >& aBelowScalers, std::string aBaseNPPFileName, std::string aBaseHRFileName, std::string aBasePFTWtFileName,
159
159
int & aNumScalars) {
160
+
161
+ // Open the coupling log
162
+ ILogger& coupleLog = ILogger::getLogger ( " coupling_log" );
163
+ coupleLog.setLevel ( ILogger::NOTICE );
164
+
165
+ coupleLog << " In calcScalers" << endl;
166
+
160
167
// First, read spatial data
161
168
readBaseYearData (aBaseNPPFileName, aBaseHRFileName, aBasePFTWtFileName);
162
-
169
+
163
170
// first copy the area into the local array, expanded to all pfts
164
171
// this is because the area needs to be zeroed out also for outliers
165
172
// an outlier may be for one pft in a cell, but not for another
166
173
for (int z=0 ; z < mNumPFT ; z++) {
167
174
for (int i=0 ; i < (mNumLat *mNumLon ); i++) {
168
- mELMArea [(z*mNumLat *mNumLon )+i] = aELMArea[(z* mNumLat * mNumLon )+ i];
175
+ mELMArea [(z*mNumLat *mNumLon )+i] = aELMArea[i];
169
176
}
170
177
}
171
178
@@ -515,7 +522,7 @@ void CarbonScalers::excludeOutliers( double *aELMNPP, double *aELMHR) {
515
522
int length = mNumLat * mNumLon * mNumPFT ;
516
523
std::vector<double > scaledNPP (aELMNPP+0 , aELMNPP+length);
517
524
std::vector<double > scaledHR (aELMHR+0 , aELMHR+length);
518
-
525
+
519
526
// Calculate raw scalars
520
527
std::transform (scaledNPP.begin (), scaledNPP.end (), mBaseNPPVector .begin (), scaledNPP.begin (), std::divides<double >());
521
528
std::transform (scaledHR.begin (), scaledHR.end (), mBaseHRVector .begin (), scaledHR.begin (), std::divides<double >());
0 commit comments