Skip to content

Commit

Permalink
clean up cal log outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcquil committed Jul 3, 2023
1 parent 3f0bec6 commit 2c68c7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 73 deletions.
17 changes: 0 additions & 17 deletions src/CohortBiomass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -719,23 +719,6 @@ private static double calculateWater_Limit(ActiveSite site, ICohort cohort, IEco
if (WaterLimit > 1.0) WaterLimit = 1.0;
if (WaterLimit < 0.01) WaterLimit = 0.01;


// write to the calibration log for testing purposes
if (PlugIn.ModelCore.CurrentTime > 0 && OtherData.CalibrateMode)
{
CalibrateLog.cwl_ratio_availwatertopet = Ratio_AvailWaterToPET;
CalibrateLog.cwl_watercontent = waterContent;
CalibrateLog.cwl_tmin = tmin;
CalibrateLog.cwl_h2oinputs = H2Oinputs;
CalibrateLog.cwl_pet = pet;
CalibrateLog.cwl_availablesw = availableSW;
CalibrateLog.cwl_moisturecurve2 = moisturecurve2;
CalibrateLog.cwl_moisturecurve3= moisturecurve3;
CalibrateLog.cwl_intcpt = intcpt;
CalibrateLog.cwl_slope = slope;

}

//PlugIn.ModelCore.UI.WriteLine("Intercept={0}, Slope={1}, WaterLimit={2}.", intcpt, slope, WaterLimit);
return WaterLimit;
}
Expand Down
56 changes: 0 additions & 56 deletions src/metadata/CalibrateLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ public class CalibrateLog
public static double availableWaterTranspiration; // (availableWaterMax + priorAvailableWaterMin) / 2.0;
public static double transpiration;

//KM checking on the calculate_soilwater growth limit function --- fuck
public static double cwl_ratio_availwatertopet;
public static double cwl_watercontent;
public static double cwl_tmin;
public static double cwl_h2oinputs;
public static double cwl_pet;
public static double cwl_availablesw;
public static double cwl_moisturecurve2;
public static double cwl_moisturecurve3;
public static double cwl_intcpt;
public static double cwl_slope;


public static void WriteLogFile()
{
Expand Down Expand Up @@ -91,18 +79,6 @@ public static void WriteLogFile()
clog.AvailableSWFraction = availableSWFraction; // Fraction of available water allocated to the cohort
clog.AvailableWaterTranspiration = availableWaterTranspiration; // Total water available for transpiration in the cell
clog.Transpiration = transpiration;

// KM tracking soil water growth limitation function
clog.Cwl_ratio_availwatertopet = cwl_ratio_availwatertopet;
clog.Cwl_watercontent = cwl_watercontent;
clog.Cwl_tmin = cwl_tmin;
clog.Cwl_h2oinputs = cwl_h2oinputs;
clog.Cwl_pet = cwl_pet;
clog.Cwl_availablesw = cwl_availablesw;
clog.Cwl_moisturecurve2 = cwl_moisturecurve2;
clog.Cwl_moisturecurve3 = cwl_moisturecurve3;
clog.Cwl_intcpt = cwl_intcpt;
clog.Cwl_slope = cwl_slope;

Outputs.calibrateLog.AddObject(clog);
Outputs.calibrateLog.WriteToFile();
Expand Down Expand Up @@ -240,37 +216,5 @@ public static void WriteLogFile()
[DataFieldAttribute(Unit = "cm", Desc = "Transpiration", Format = "0.00")]
public double Transpiration { set; get; }

//KM added variables to track soil water growth function
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_ratio_availwatertopet", Format = "0.00")]
public double Cwl_ratio_availwatertopet { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_watercontent", Format = "0.00")]
public double Cwl_watercontent { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_tmin", Format = "0.00")]
public double Cwl_tmin { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_h2oinputs", Format = "0.00")]
public double Cwl_h2oinputs { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_pet", Format = "0.00")]
public double Cwl_pet { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_availablesw", Format = "0.00")]
public double Cwl_availablesw { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_moist2", Format = "0.00")]
public double Cwl_moisturecurve2 { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_moist3", Format = "0.00")]
public double Cwl_moisturecurve3 { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_intcpt", Format = "0.00")]
public double Cwl_intcpt { set; get; }
// ********************************************************************
[DataFieldAttribute(Unit = "cm", Desc = "cwl_slope", Format = "0.00")]
public double Cwl_slope { set; get; }

}
}

0 comments on commit 2c68c7a

Please sign in to comment.